I am attempting to run jasmine tests with resharper and phantomjs. I have downloaded and pointed resharper to the phantom js exe. Now I recieve this error:
If I run the testrunner without phantom it works fine. I don't want to open a browser every time i write tests though.
Related
I started to play with SpecFlow and the SpecFlow+ Runner. Now I want to stick with MsTest v2.
So I removed the SpecFlow runner packages and added SpecFlow.MsTest package to my project. It also contains MsTest.TestAdapter and MsTest.TestFramework.
Test Explorer in Visual Studio shows all tests, and I can also run all of them from there.
But on the Test output panel, I see some errors like:
Unable to fetch symbols for class: Name of my feature file
And also:
Unable to fetch source Information for test method: test method
Any ideas where these errors are coming from and how to remove them?
I'm trying to use my unit test for load testing as well. When I click 'Add...' button, visual studio prompts with a message 'There are no tests available to pick' (as shown in below image).
I can execute the unit test successfully from VS2017.
Without seeing the solution structure I can't really tell.
Make sure the web test is present in same project as the load test.
Also make sure the project which you have created inside the solution is indeed a "Web Performance and Load Test Project".
Can you do the following :
1) Rebuild Solution
2) Clean / Build Solution
3) Renamed the coded Web Test
4) Restarted Visual Studio
5) Restarted Computer.
I had tried all the way on the web.
But it still not listing NUnit in Tools -> Options -> SpecFlow test runner.
I install "NUnit Test Adapte" already.
I tried to attach NUnit but I can't find "NUnit" in available process.
Is I having wrong way to install NUnit? I downloaded the NUnit.zip and decompressed it in Program files.Did it need more steps to install it?And I also install the NUnit package in VS2013.
What's wrong did I done?Or what isn't done yet?
Please help me.
As the comment said, there are too many things that could be wrong. Here are a few suggestions you could try.
Verify feature files are being converted into tests.
How to Verify: In VS solution explorer, expand the feature file and you should see a feature.cs file.
Solution to fix: install the SpecFlow solution
Verify the test is a nunit test and not mstest
How to Verify: Open the feature.cs file and verify you see NUnit somewhere on that page and your scenario (no spaces) should have [TestAttribute] above it.
Solution to fix: Add nunit reference to the project & in the project's app.config Add NUnit as the provider
Verify NUnit Test Adapter is installed
How to Verify: Write a simple nunit test & see if it shows up in the test explorer window.
Solution to fix: Install it or you can always install SpecRun as an alternative. VS Test explorer should show your tests and they can be run from there.
Verify all your tests are mapped
How to Verify: Your tests should be black except where you have variables. Hitting F12 should go to definition.
Solution to fix: There can be a caching issue but for the most part, verify the regex is correct and make sure the step definition is visible to the feature file. That means it's either in the same project or is included in the app.config as a known step assembly.
I'm trying to run my unit test created via Visual Studio 2013 on my staging server.
I don't want to install Visual Studio there, not the Test Agent so I found a way to run them by copying some of the DLLs and EXEs needed.
Yes, I know it is a hack but I prefer this solution instead of the Test Agent to keep the staging environment completely clean.
Anyway, the test are correctly done, except for the fact that the vstest.discoveryengine.exe crashes with the following error:
failed to initialize client proxy: could not connect to vstest.discoveryengine.exe
Note: this crash doesn't prevent the successful completion of the tests, just an annoying popup to close any time by hand...
I tried to run my batch script as Administrator but no luck.
Have you got any hint on how to prevent vstest.discoveryengine.exe from starting or listing the existent tests?
Thank you very much
Best
cghersi
I found the solution by manually copying some other DLLs in my folder.
Perhaps someone is interested in my same scenario, so I prepared the complete solution here:
http://www.snip2code.com/Snippet/59304/How-to-run-unit-tests-created-with-MS-Vi
It perfectly works for me, and my staging environment is still perfectly clean!
Let me know if it works for you guys.
Thank you
I had recently installed VS 2010 on my local machine, and cannot seem to get Resharper 5.1 and the unit tests to work correctly.
Whenever I try and run Unit tests I get a "Build failed" with the test icon remaining gray, but with no info in the output window and no discernible reason why.
The Unit Tests run perfectly fine when doing a nant build.
Running a previous branch of the code on VS 2008 does not have this same issue as a result.
Any ideas?
Check your build configuration. If you're using a build configuration that is set to not build your test projects (like your release configuration) then the Resharper test runner will fail this way. The output looks like a perfectly successful build but if you inspect the output you'll find your tests are not in it.
Another symptom of this issue is if you set the test runner to not build as suggested above, next time you attempt to run the test it will be crossed out in the test runner.
Build configurations can be found in Build->Configuration Manager in Visual Studio.
If you change the build settings to 'never build' in the unit test sessions window, it works ok (providing you pre-build the dll using visual studio). It appears to be a Resharper bug.
In my case this did solve the issue:
http://www.shirmanov.com/2011/07/project-has-not-been-built-resharper.html
I had the UnitTests set "to not build" in my solution configuration.
The above mentioned article shows this very detailed.
In my case I was missing a DLL that was not added to the project. I added it, cleaned and build and everything was okay.
Verify in Visual Studio Configuration Manager that your test projects are marked to be build.