allure-framework / allure-framework/allure-csharp
Incorrect display of tests structure when use common test project in multiple solutions
- Dominant language
- C#
- Stars
- 125
- Forks
- 76
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 18
Description
Hi team!
I have several solution like:
Solution.One
*****Project.One
*****TestProject.One
Solution.Two
*****Project.Two
*****TestProject.Two
Also I have common solution like
Solution.Common
*****CommonProject
*****CommonProject.Tests
CommonProject.Tests added to TestProject.One and TestProject.Two via project reference
TestProject.One project has 1 test
TestProject.Two project has 1 test
CommonProject.Tests project has 1 test
Once the tests are done I collect all allure files from allure-results directories of test projects into one common allure-results directory. And I generate and open report then.
I noticed that the actual number of tests is not equal to what is expected in allure report.
I expect to see the number of tests equal to 4.
But number of tests equal to 3.
I found out that tests structure is incorrect on package tab of report:
Expected like this:
TestProject
*****One
**********Tests 1
**********CommonProject.Tests 1
*****Two
**********Tests 1
**********CommonProject.Tests 1

Actual:
CommonProjects.Tests 1
TestProject
*****One.Tests 1
*****Two.Tests 1

Workaround:
In order to fix this issue I parse "*-result.json" files and add solution name to start of value of following properties:
historyId
fullName
labels["name": "package"] value
And then I collect files to generate report.
I have prepared a sample in archive to demonstrate this troble. Also i added json files of allure report there
[sample.zip](https://github.com/allure-framework/allure-csharp/files/12877305/sample.zip)
Contributor guide
Research direction
Reproduce the report using sample.zip and the collected allure-results from the three test projects. Compare the *-result.json files, focusing on historyId, fullName, and the package label, then verify that the generated report counts four tests and preserves the expected solution/project hierarchy.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100