Hi!
I am running xUnit tests successfully using continua-ci, but when I try to check the tab “UNIT TESTS” to check the individual results, it is completly empty, as if I had executed no tests at all.
What could be wrong in my setup?
Hi!
I am running xUnit tests successfully using continua-ci, but when I try to check the tab “UNIT TESTS” to check the individual results, it is completly empty, as if I had executed no tests at all.
What could be wrong in my setup?
Hi @tdestro,
The DotNet Test
action does not currently automatically import test results, although we have recently been developing this ability for the next version.
This should be available soon, but if you can’t wait, you can currently use the Import XUnit Tests
action to import the test results.
By default, the dotnet test
command line does not output detailed results to a file, so you will need to install a test adapter to log the results first. Use the NuGet Install
action to install the XunitXml.TestLogger
package to a folder in your workspace e.g. $Workspace$\XUnitTestAdapter
.
Then edit your DotNet Test
action and enter this same folder for the Test Adapter Path
. Also enter xunit;LogFilePath=TestOutput\Results.xml
into the Logger
field where TestOutput\Results.xml
is the location of the test results file under the working folder.
Follow the DotNet Test
action with an Import XUnit Tests
action and enter the test results file path in the XML Files
text area.
e.g.
Hi, @Sparky!
Thanks a lot for your prompt answer.
With your instructions I could put it all to work, so now I can see the “UNIT TESTS” tab with all information about the executed tests.
Thank you very much!