Code Coverage VSMDI on Visual Studio 2012 says "There is no test with specified Id" - visual-studio-2012

I have a solution that is still using VSMDI files.
Running tests are still fine, but when I try to Analyze Code Coverage on the selected test, It shows "Empty results generated".
Looking at the Output Log from Tests, it says
"There is no test with specified Id {09c3a333-1a28-27bf-2d79-8f6aa8fe5e3a}."
From what I see, the Id mentioned is the Test Id in VSMDI file
Does anybody why this happen ?

Related

Android Studio Unit Tests With Coverage Showing 0% On Everything

I'm trying to check my unit test coverage, all my tests are passing, but when I run the tests with 'Run Tests With Coverage' by right clicking on my test file, when it completes, everything comes back as 0%?
Looks like it's supposed to just work reading https://developer.android.com/studio/test/index.html and can't find anything saying why it would be returning 0% for everything?
Is there some hidden setting I'm missing to get this working?
Go to Run->Edit Configuration->Code coverage.
Add your package/class for which you want to run tests, in Packages and classes to record coverage data section.
Also, check Enable coverage in test folders option.
Click Apply and Ok. Re-run your tests with coverage.

TFS Test - mstest log output - final test results

A couple of days ago our vs2012 mstest started producing two logs of test results in the one session, the initial "Results Top Level Tests" then Final Test Results:" "Results Top Level Tests"
As we parse the file, naturally we came undone with two lots of results.
Why is their two lots of results and - or how was this triggered ?
What is "Final Test Results" about?
(the console output from mstest is piped to a file)
Thanks
Based on my test, the issue should be caused by the test cases or the test processes which have something wrong. And the "Final Test Results" will appear there.
Simply say, when the message "Final Test Results" appears, that means maybe there are something wrong with the configuration of your test project or test processes.
So, please check and debug the test cases, processes, environments etc...
Firstly make sure the tests running without any error within local Visual Studio.
Reference:
MSTest hangs when used from command line
MSTest.exe command-line options

TFS 2012 Code Coverage Generated But Not Displayed In Report or Build Summary

I'm trying to get Code Coverage results to display in the Build Summary and TFS Build Summary Reports. I have included a .testsettings file in my CI build to instrument the assemblies I am interested in.
This is what I see in the Build Summary (not showing the actual names):
0 error(s), 332 warning(s)
name1.sln ('publish;build' target(s)) - 0 error(s), 15 warning(s), View Log File
name2.sln - 0 error(s), 184 warning(s), View Log File
testsolution.sln - 0 error(s), 133 warning(s), View Log File
3 projects/solutions compiled
1 test run completed - 100% pass rate
No Code Coverage Results
Now, this "No Code Coverage Results" is confusing to me. If I download the test results, the code coverage appears in there. Also, I am able to view the data.coverage file on our build server. I've been searching for the past two days on Google and stack overflow, but have not found any solutions that have worked for me. Does anyone have an advice on how to get this working?
We are using TFS 2012, VS 2012, and running tests using MSTest.
Firstly, edit the build definition and set Type of run settings to be CodeCoverageEnabled.
Then be sure "Enable Code Coverage" option is selected on the Add/Edit Test Run dialog. Save the build definition, and run again.
Additionally, it is worth for you to have a check on Ralph Jansen's reply in this link: TFS 2013 - No Code Coverage Results

How to create a TFS report in Excel showing tests passed and failed per build from tests results published via mstest.exe

Here's what we'd like to do:
A build completes successfully in TFS 2012
Once complete a separate command line process runs tests via vstest.console.exe generating TRX files.
Once all tests have completed those tests/TRXs are published against the target build that just completed using mstest.exe
Once complete we are able to see those published results in Team Explorer - Builds - View Builds for the target build. Under Summary you can see 100 test runs completed for all 100 tests published against it.
At this point we want to open Excel, connect to the TFS Cube and create an Excel report showing a pass/fail pie chart for the target build.
Can someone advise what Cube data to use. We've already tried a few things without success.
Thank you.
We were able to find the target Cube data. Thank you.
Filters - ''
Columns - Outcome, Test Result Executed By
Rows - Build, Test Run ID, Test Run Title, Test Run State
Values - Result Count

nUnit Test Runner - Test stays in "Not run" if it takes over a certain amount of time

We have some Selenium tests built with nUnit that take quite a while to complete. We are finding that they stay in the "Not run tests" grouping even though they should pass.
After some initial investigation we found that if we remove some long running steps the tests will pass correctly but as soon as we shove a sleep in the code that waits for a couple of minutes the problem comes back.
We are using Visual Studio 2012 with the nUnit Test Runner extension as shown here: http://nunit.org/index.php?p=vsTestAdapter&r=2.6.2
Is there some hidden timeout in nUnit or the test runner that we need to change to get our tests (no matter how long they take) to pass or is there some other problem at work here?

Resources