JetBrains / TeamCity.VSTest.TestAdapter

Apache License 2.0
30 stars 14 forks source link

Attachments from single AttachmentSet should not be published into different artifact folders #41

Open dmitryDemchenko opened 3 years ago

dmitryDemchenko commented 3 years ago

We are using automated testframework producing .mht "run report". Custom TestAdapter "unpackes" .mht to folder (at this point main file - index.html - can be viewed with chrome), and then publishes each file as UriDataAttachment. After build pipeline completion "attachmets" at the "Tests" page contain index.html file but it can't be viewed as all referenced resources are unavailable.

Expected behaviour: all files of the same set are published to the same folder.

Observed behaviour: files are published to different folders irrespecting set grouping.

Code producing the issue: TeamCity.VSTest.TestLogger/Attachments.cs:73

artifactDir = ".teamcity/VSTest/" + testDirName + "/" + _idGenerator.NewId();

Suggestion: use _idGenerator.NewId() for every single attachment set, not for every UriDataAttachment.