Search code examples
selenium-webdriver

Selenium Tests for running less than 1 second


I'm trying to do some test maintenance but the tests are not running, Visual studio says it's running for less than 1 milisecond.

The Error message in the test run summeray at the bottom of visual studio
Other

I've double checked the debug setting, I've also tried starting a new instance and running the migrators. It's not just one or two test this is happening with all of them so I don't think it has to do with one specific test.


Solution

  • You have more than one solution, it works with different people I collected them from many sources:

    #method1. Unable autodetect run settings file:

    The way: select: test from visual studio menu > select: configure run settings > Unselect: autodetect runsettings files method 1

    #method2. Check the unit tests files: The way: select: test from visual studio menu > select: debug > select: windows > click on output... method2(1)

    after clicking on output, the output window will appear > click on the arrow next to debug and change it into Text(the last choice) method2(2)

    #method3 Ensure the access modifier of the class is "public" instead of "internal":

    The way: https://www.tutorialspoint.com/access-modifiers-in-python-public-private-and-protected

    #method4. Install (MSTest.TestAdapter): Install Link: MSTest.TestAdapter install link

    More methods:

    1. developers website solution
    2. github discussion about the same issue