Some tests failing depending where they are run
I have a web app for which I have created a large number of SOATest tests. When I run the tests locally on my PC they all run successfully. When I log onto the application server and run them there, they also run successfully. However when they are kicked off via script run the command line interface (Edge InPrivate mode) in Jenkins, the tests fail. Sometimes a large number of them fail and sometime just a few. When I go into SOATest 2025.2 on the application server, I see the errors in the Console and Quality Tasks so I know it is running the correct version of SOATest. I can then run the tests for the application successfully. In all cases, I am launching SOATest with the command line parameter to run Microsoft Edge in InPrivate mode.
Is there something I should look at to determine the cause of this? Is there a configuration setting to check or something else? I noticed that when it is going to fail, the tests can take a very long time to run.
Thanks!
Answers
-
You would have to make sense of the failure messages themselves. I would look at the first test failure that happened in the run, study the error message to understand what happened, and then consider what may have caused and how to resolve it. There are a lot of different things that can cause tests to fail including unstable locators, insufficient wait conditions, or inconsistent behavior of the web application itself. When elements are not being found on the page the tests take longer to execute because it can take a while for wait conditions to time out.
One thing that can be useful to troubleshoot failures is enabling screenshots in the HTML report. You can do this by passing
-J-Dcom.parasoft.tool.screenshot.Location=<embed>
to soatestcli. See Screenshots on failure for browser tests using Selenium WebDriver0