-
Notifications
You must be signed in to change notification settings - Fork 8
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
Problem with enforcing reportName as function #14
Comments
The current implementation doesn't accept defining the sonarqubeReporter: {
reportName: (metadata) => {
return 'headlesschrome.xml';
}
} Does it look good to you? |
will test and let you know, thank you |
As karma allows you to run your tests in multiple browsers, I thought defining the report name dinamically would be a good idea. It was just after I had published the first version that I noticed this wildcard problem. At that time, as there were already some projects using this npm package, I decided to keep the callback function to avoid a breaking change. Actually, it would be easy to change the code to accept both: dynamic (callback function) and static (a file name) |
I can confirm this works. |
I have found that SonarQube.testExecution.reportPath does not accept wildcards, so i can't set SonarQube.testExecution.reportPath to './reports/*.xml' as I get this error:
"ERROR: Error during SonarQube Scanner execution ERROR: Error during parsing of generic test execution report '/reports/*.xml'. Look at the SonarQube documentation to know the expected XML format. ERROR: Caused by: /reports/*.xml (No such file or directory)
So, instead I attempted to specify 'reportName' not as a function, but as a filename:
sonarqubeReporter: {
basePath: './', // test files folder
filePattern: '**/*spec.ts', // test files glob pattern
encoding: 'utf-8', // test files encoding
outputFolder: './reports', // report destination
legacyMode: false, // report for Sonarqube < 6.2 (disabled)
reportName: 'headlesschrome.xml'
},
After which, the run fails with:
If I can't determine the name of the report statically (as the current name of the file is: headlesschrome.74.0.3729.linux.0.0.0.xml), and I can't report the filename dynamically, how am I meant to work around this?
The text was updated successfully, but these errors were encountered: