My problem is that my unit tests fails from time to time. Most of the times it is successful.
I would like to run it X amount of times or just repeat the test case until it fails.
What I can do is to just click on the test and rerun it once more even though it has been successful run, but that is time consuming.
I have had a look in Visual Studio in "Test Explorer" and Resharper "Unit Test Session", but I can find a smart way to rerun all test until it fails.
Is there another way?
Best Regards,
Hans
I see you mention you have ReSharper - in the Resharper unit test session window you can select the test you are interested in, then click the drop-down next to the Run button and there is a "Run Unit Tests Until Fail" option
Also, see here
Related
As a test engineer we always find the lack of info in the Test Runs tab too confusing and useless when it should be one of the most important tab in order to know which test runs are related to which tests builds, test plans, creators, etc
However I can´t find a way to add more columns or info like in the test plan tab. Is there any way to fix this?
No, you can’t add additional columns to test run in Test>Runs tab, you need to check those information in the summary of a test. (Double click a test run> Test results> double click a test)
There is a user voice that you can vote: Additional columns for test run in test > Runs tab
I'm using WebStorm 2017.2.2 to develop and run some mocha tests.
All is going pretty well, but the tests never finish. It gets done with running all of my test files, then just sits there spinning saying "Running Tests."
If I hover over the red box, it shows a tooltip that says: Stop 'Full Tests' (⌘F2). It also shows "Stop Process" at the bottom of the IDE. So, I click it, and the red box turns into a skull.
Now, if I hover over the skull, it shows a tooltip that says: Stop 'Full Tests' (⌘F2) (same as before). It also shows "Kill Process" (different) at the bottom of the IDE. So, I click it, and the IDE stops saying "Running Tests" and now says "Test Results."
How do I configure WebStorm so that it automatically ties up those loose ends when it reaches the end of my test suite?
To answer this, the mocha docs state that autoexit is not a feature in v4, basically something is stopping the tests from exiting, to revert back to the v3+ way of exiting when your tests pass, use the arg --exit in your test configs under Extra mocha options
https://boneskull.com/mocha-v4-nears-release/#mochawontforceexit
I'm using Visual Studio 2010 SP1. When I run "All Tests in Solution", I get code coverage results to show up just fine. However, when I run a subset of tests using "Tests in Current Context", I only see "Cannot find any coverage data (.coverage or .coveragexml) files. Check test run details for possible errors."
A Google search shows that others do get code coverage results when running a subset of tests. Is there a configuration I'm missing somewhere?
I think I figured out the reason for this, but it still doesn't make complete sense. If I run the tests in the current context by going to "Test -> Debug -> Tests in Current Context", it doesn't work (code coverage is not generated). However, if I do "Test -> Run -> Tests in Current Context", then it works. So far so good, it kind of makes sense that it would only work when not in Debug mode.
But the strange part is if I use the keyboard shortcut for "Test -> Run -> Tests in Current Context" (Ctrl-R, T), it does not work. So I have to run it from the menu instead of using the keyboard shortcut, otherwise it says no code coverage was generated.
In VS2010, if I click on
Test->Run->All Tests in Solution (CTRL+R,A)
All of my tests will run and I'll be able to see what tests passed and what tests failed.
If I use the shortcut (Ctrl+R,A), then it will break when an exception is thrown.
Why is this experience different? How can I run all my tests through no matter what without going to the menu bar?
The chord "CTRL-R, A" executes
Test->Run->All Tests in Solution (CTRL+R,A)
The chord "CTRL-R, CTRL-A" executes
Test->Debug->All Tests in Solution (CTRL+R,CTRL-A)
So the fact is that you aren't using the shortcut you think you are.
I have a few lists of tests that I setup for a project that builds to a website. I have a bunch of unit tests and integration tests that runs before deploying the site. I have one user that clicks on the failed build in Build explorer but the Test results(that I can see-all test) that appears below that is empty.
If I click on it I can see a complete list of tests that passed as well as the test that failed. In the "Test Results" window at the bottom there is a drop down list to choose the(it looks like environment??) and when they choose "System#SERVERNAME SERVERTIME" it does not show the list that I can see if I am logged in. It seems to be a permission issue but where?
Thank you
Jack