NAVDEMO / RunTests

5 stars 7 forks source link

XUnit file output pn AzureDevOps leads to wrong naming of tests #5

Closed kine closed 5 years ago

kine commented 5 years ago

May be it is bug on Azure DevOps (but than I will expect that it will be already reported somewhere or fixed at all), but when I run multiple codeunits with multiple tests, the result on Azure DevOps is "strange/wrong". May be it is just effect of incomplete/wrong file structure. I do not have real sample of xunit test file.

If I sort the results by "Test File", all tests have name based on the first test (but sorted by names?) in the collection/assembly (interesting is, that it doesn't take the OnRun method into the results at all). image

In all other sorting the names are still wrong, but it is not so visible that it is based on the first test in the collection/assembly.

kine commented 5 years ago

Just want to add, that the names are correct in the file itself. I think that it could be just because the test name is same for all methods. May be it must be unique - than I think that it will be good to combine the name as name of the collection + name of the method. I will try it if I will find the time...

kine commented 5 years ago

Ok, I have tested it and making the names unique works correctly.

freddydk commented 5 years ago

Approved your PR - and made the same change to PsTestFunctions (which will replace PsTestRunner with the next version of NavContainerHelper).