简体   繁体   中英

Selenium tests(in C#) failing when run from the command line but not VS

I'm having an issue with some Selenium tests I have written using C# in visual studio. When I run them(MSTest) from from VS they all pass fine, however if I run the tests from the command line some fail. I've tried a few times and it seems as though the tests fail at random as the number that fail and the individual tests that fail are different each time, this confuses me!. As things stand the tests are failing on our build server and I need to figure out the issue. Any ideas or suggestions would be greatly appreciated!

The tests are executed faster in VS than in the IDE if you are trying to assert elements of the page that has not been loaded yet. Try adding more pauses or increase the time paused in you test cases.

Is there any pattern to where the test fails although it seems random?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM