aakash
aakash

Reputation: 21

Rerunning the tests from last halted point

After fighting hard with this problem I am finally putting this as query on the board:

In case we did not handle any exception or due to some other intermittent problem(which usually happens during automation) our test scripts execution got halted and till the time we had executed 80% of our scripts. Now I need to run all the tests again.

Please suggest how to solve this problem.

Thanks, Akashdeep Singhal

Upvotes: 1

Views: 44

Answers (2)

Stephen C
Stephen C

Reputation: 718826

Assuming that you are running the TestNG tests from the command line, you can so something like this:

$ java org.testng.TestNG -testclass org.test.MyTest

to run specific tests. You can also select by groups ... if you have defined some test groups.

For more details, refer to the TestNG documentation here.

Upvotes: 0

Eric Stein
Eric Stein

Reputation: 13682

  1. Make your code stable so it doesn't randomly throw exceptions
  2. Make your code stable so it handles intermittent problems correctly
  3. If you're running unit tests, make them reasonable unit tests - execution time should be minimal.
  4. If you're running integration tests, make sure you're only actually testing the boundaries between classes.

I think that's the best you're going to get with such a wide-open question.

Upvotes: 4

Related Questions