How to auto run some script if some test in our test plan fail.
- 9 years ago
I see 2 solutions:
1. Add this logic into script. And run your tests from script instead of test items.
2. Use project or project suite variables as flags. Next test will just stop if flag was set. In this case logic should be added into existing tests. You can set flags inside OnLogError event handler. - 9 years ago
My solution to this was to use the on test start and on test stop event, it checks that the AUT is on the starting screen. All tests are written to start and stop on this screen. If it any test is not on the start screen, the event handlers restart the application.
You could also use the on log error event handler.
- 9 years ago
this is a usual dilemma faced by testers who start automate testing.
The way you should design will depend on what you need to test.For eg. in your example if TEST A failed (Opening application) there are no way of running TEST -B
how could you run other tests if application failed to open?..will it be pass second time if you do same?But in second case if you pass TEST A and failed TEST B (Add user) you can still run TEST C with some existing user.
I would rather design TEST C independent of TEST B (newly add user not used in TEST C)
So with the TEST DMy advice is make it simple. Design each test as much as independent.
So even TEST B fails your TEST C will run.
Also design a set of smoke tests (link) which runs b'for actual test run
In your eg TEST A and TEST E can be part of smoke tests.