Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Placeholders in reports are not working #164

Open
karoukastro opened this issue Mar 16, 2022 · 3 comments
Open

New Placeholders in reports are not working #164

karoukastro opened this issue Mar 16, 2022 · 3 comments

Comments

@karoukastro
Copy link

karoukastro commented Mar 16, 2022

[hash] is working fine but I'd like to move to the one of the new placeholders [testsuitesTitle], [rootSuiteTitle], [suiteFilename] or [suiteName]. I just changed [hash] to [suiteFilename] but it is not replacing correctly. And I tried with all the others placeholders with same result. Am I missing some other configuration?
Versions:
"cypress": "^9.4.1",
"cypress-mochawesome-reporter": "^3.0.0",
"cypress-multi-reporters": "^1.5.0",
"junit-report-merger": "^3.0.5",
"mocha": "^9.2.2",
"mocha-junit-reporter": "^2.0.2"

image

@nicosuerohynds
Copy link

I can also replicate this problem with "cypress": "^12.2.0"

@AlexGuironnetRTE
Copy link

Hello,
I think these placeholders are only available starting from version 2.2.0 of mocha-junit-reporter. I'm running into the same issue using cypress 12.4.1, but I'm not sure which version of mocha-junit-reporter is bundled with cypress.

@mistic100
Copy link

I am on 2.2.1 and it does not work.

I think the problem is that the suite 0 is the Root suite and does not have a file attribute

reportFilename = reportFilename.replace('[suiteFilename]', testsuites[0]?.testsuite[0]?._attr?.file ?? 'suiteFilename');

Even if this is replaced by testsuites[1] there needs to be some cleanup of the property as, at least on Windows, the file contains the absolute path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants