I want to know how files without the before () again and again.

Consider i am writing case for GMail

  1. login.java : Which contains complete of the login page
  2. inbox.java : Which contains complete testing of the inbox
  3. spam.java : Which contains complete testing of the spam folder page
  4. label.java : Which contains complete testing of create/edit/deleting of labels

Now every file contains a before class which has

  1. calling the browser
  2. input username and password
  3. clicking the submit button
    and after class which logs out

Using TestNG when I run, every time it will login, test for the particular file and logs out

It needs to run like this:
It should login, then test the inbox, spam and label then logs out.

Is it the right way to execute? Or is there a solution for this?

Source link https://sqa.stackexchange.com/questions/16983/how-to-run-multiple-test--without-running-before-and-after-class-again-and


Please enter your comment!
Please enter your name here