I am trying to get our Unit Tests to execute through the Bamboo CI.
I managed to take one of the dll containing the tests and adding that as a single MSTest Runner Task inside a second job as part of my main Plan.
This managed to run and output the MSTest output file (whatever.trx) to the TEST tab.
Problem is that I would now have to create a mstest task for each dll that needs testing (they in different unit test project folders) and then display their results.
Is there a different approach that I can take to running all the tests in one run and displaying them?
If you want to test multiple dlls using the same MSTest Runner Task, you need to produce a Test Metadata file and specify its location in the task configuration.
The MSTestRunner is just a wrapper around the mstest.exe executable provided by Visual Studio, so its worth reading about mstest.exe and the testmetadata switch.
From the MSTest.exe documentation:
You can use the /testmetadata option to run tests in multiple test containers.
The test metadata file is created for your solution when you create test lists using the Test Manager window. This file contains information about all the tests listed in the Test Manager window. These are all the tests that exist in all test projects in your solution.
You can change the test metadata file only by making changes that are reflected in the Test Manager window, such as creating or deleting tests, or changing a test's properties.<th align="left">Note</th>
Because the test container contains tests that you can run, you must not specify both the /testcontainer and /testmetadata options in a single command line. Doing this would be ambiguous and would produce an error.
The test metadata file is an XML file that is created in the solution folder. This file is shown in Solution Explorer under the Solution Items node. A test metadata file has the extension .vsmdi, and is associated with the Test Manager window; that is, if you double-click a .vsmdi file in Windows Explorer, the file opens Visual Studio, and its contents. All the tests in a solution's test projects are displayed in the Test Manager window.
When you use the /testmetadata option, it is recommended that you indicate specific tests to run by using the /test option or the /testlistoption, or both.
I'm happy to announce that Bamboo 7.1 has been released and it’s overflowing with awesome new features. Top-voted issues First and foremost, a bunch of JAC top voted issues has been delivered - y...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events