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
Related
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
I have a series of Google Unit Tests that are launched via a bat file. Some of these tests are broken and a window appears when they run:
Microsoft Visual C++ Debug Library
Debug Error!
... Info about error
This window waits for a user to press Abort, Retry, Ignore. Of course, this halts my test. Currently, I delete the broken tests before I run the batch. I want a way to force this window to abort or ignore - so I don't need to skip the broken tests.
This problem is similar to; however, I cannot write to reg keys
How do I disable the 'Debug / Close Application' dialog on Windows Vista?
Update: My manager says this window might not appear if this project was in release. Trying to do that now. However, if there is a solution besides changing my project to release, I would appreciate it! :D
That's what you get from a failed assert() in the source code. Useful to debug the test. But actually running unit tests against code that was compiled in the Debug configuration is not useful. Your customer isn't going to run the Debug build either.
Only test the Release build, that disables those assert() calls as well.
Sometimes after I start the rspec tests, I realized that I wanted to change something; and if it's a long run I would love to be able to stop it in the middle, change whatever it was, and rerun the tests. Would someone tell me if that is possible and if it is, how to do it?
One can stop the RSpec test in the middle by pressing ctrl-C twice.
As #zetetic said, press Control-C. Or, if you're running from an IDE, click the stop button for the test (not the server or other code you're testing!)
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.
Simple question, when the test is done executing, does the Start item in the Run menu become enabled again ? I see it disabled for a period while my test is running and then become enabled again. I ask because I've been running Jmeter for 3 days and don't see the tests completing but see start become re-enabled.
Cheers
There will be an indicator at the right corner. When the execution is going on there will be green signal shown at this location when it gets completed the green notificatuion is not shown....
The only thing I've seen that seems to be a clear indicator that tests have completed is that when you start a test by clicking the green "Start" button, the button becomes grayed out, and looks disabled. It re-enables when the tests have stopped.
So just look at the Play button's state for an indicator of whether or not the test is still running.