Pester icon indicating copy to clipboard operation
Pester copied to clipboard

cosmetic issue with the generated nunit output as the test-case name is built with a "." rather than a " "

Open Vaevictus opened this issue 5 years ago • 7 comments

When using the -CI flag, the testreport.xml that is generated is imported fine into azure devops, but the testnames do look strange. The "describe" text and "It" text are concatenated with a . rather than a space

e.g. <test-case description="should have managedRuntime set to v4.0" name="The SymbologyServer application pool.should have managedRuntime set to v4.0"

Vaevictus avatar May 10 '20 17:05 Vaevictus

Are you reporting this as a regression from v4 or just a general concern? I just looked at the v4 report and it uses the same thing to join the path to the test. Using just a space would make it very difficult to figure out where the Describe description ends and where It description starts. So I don't think this is a regression. But we can talk about ways to do this better in 5.2.

nohwnd avatar May 11 '20 07:05 nohwnd

Hi, I am reporting this only as a general cosmetic issue and not as a regression, I never tried the CI piece with v4

Vaevictus avatar May 11 '20 12:05 Vaevictus

image

Vaevictus avatar May 11 '20 12:05 Vaevictus

Gotcha, hopefully when I migrate to Nunit 3 format which has the semantics described better maybe I can find a property that would be better suited for the whole path.

nohwnd avatar May 11 '20 12:05 nohwnd

NUnit3 has better attributes:

  • name (expanded testname)
  • fullname (expanded path incl test)
  • classname (path to parent)
  • methodname (test name)

The problem though is that AzDo, ReportUnit etc only show the name-attribute, even in the details-view AFAIK.

So will probably have to use path in name for Nunit3 also unless you want to see "does not throw" on every test without a way to know which block and/or testcase/foreach it was on.

fflaten avatar Jul 16 '22 13:07 fflaten

Yeah that would suck. I tried it as well with azdo and I guess we don't have any other option now than putting the full path in the name, and filing a bug to azdo.

nohwnd avatar Aug 11 '22 06:08 nohwnd

and filing a bug to azdo.

@nohwnd Do you know where to report by any chance?

fflaten avatar Apr 04 '23 19:04 fflaten