I have a visual studio project that contains a test studio web test. The test contains coded step.
The project builds. In Visual studio, I can run it either by
1) highlighting the test file (.tstest), then click on the green play icon to execute the test
2) Select visual studio Test menu, then run -> all test
Either way the test runs and passes.
However, when I try to run it from mstest using
%mstest /testcontainer:fullpath\TestStudioProject1.dll
I get "No test to execute".
What am I missing in the project?
8 Answers, 1 is accepted
Well, this command got me further -
%%mstest /testcontainer:fullpath\WebTest1.tstest
mstest can find the test, but fails to get the file for deployment item 'bin\TestStudioProject1.dll' specified by the test.
How can I specify that I need the dll deployed?
See if this KB article helps, starting with step 7. Make sure that you first navigate to the project's directory.
Let me know if you need further assistance.
Regards,
Cody
Telerik
I have followed all the steps still it is not working
In my case it is showing:
Loading C:\git\protective-my-hub\Protective.MyHub\UnitTest\bin\Debug\UnitTest.dll...
Starting execution...
No tests to execute.
plz help.. thank u in advance
To me it looks like you're trying to execute a .dll.
You should be trying to execute a *.tstest (a singular test) or *.vsmdi (a test list) in that MSTest command. At least, as far as I could understand the linked article above.
Based on the fact that you're using /testcontainer, I'll assume you're trying to execute a single test, in which case it should be the file path to the single test you want to run in that command, instead of to the .dll.
As pointed out by Aaron - try to execute a test not a dll file by following the directions in the article provided by Cody.
I hope that would help in this case.
Regards,
Nikolay Petrov
Progress Telerik
Thank you for contacting us.
When you Create a new test project with Test Studio it will automatically generate .tstest file and you will be able to execute it.
Let us know if you need further assistance.
Regards,
Vera
Progress Telerik