0

setUp: To save time starting/closing browser, logging in/out, I've started grouping regression tests in common classes. I know there are other ways to do this, this one made most sense for our current goals/challenges.

problem: Should one of the tests not be able to find an element, or have some issue that does not cause a failure, the next test kicks off with no output to the user.

whatIWant: If every line in a test cannot be completed, I want to know. The next test can kick off, that's great, I'd just like to know that one of my tests in the class did not complete.

This is what the regression test class looks like

  • What don't you set up an access token procedure and run your tests headless, so you don't have to deal with test dependency? – João Farias Nov 26 '19 at 19:42
  • This is front end automation, I need the browser. – QAPal Nov 27 '19 at 0:33
1

You can use soft asserts from TestNG.

Do some soft asserts with meaningful messages and at the and check them.

Soft assert will not fail your test until you are explicitly call the assertAll()

Create a SoftAssert object that you will use and at the end just call assertAll()

This is not a good practice, and you should consider other techniques if you want faster UI tests.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.