NAVDEMO/RunTests

XUnit file output pn AzureDevOps leads to wrong naming of tests

Closed this issue · 3 comments

kine commented

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

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

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

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