Closed nigurr closed 5 years ago
Given that the functionality you're asking for already exists, even if it's in a different package, I'm not inclined to add any extra surface to Jasmine's existing interface and functionality. I would be happy to review a pull request to the documentation to document how to configure jasmine-reporters to output a Ant/JUnit xml file for consumption by various CI tools.
Closing this.
Issue:
Currently Azure DevOps and Circle CI/CD systems provide rich test experience. In order to get this experience/track test reporting, users has to explicitly generate test reports (currently supported format JUnit) by 3rd party plugins (Jasmine-Reporter) and publish test results.
Most of the popular open source projects aren't using 3rd party reporting plugins. To keep local development experience and CI/CD build experience similar, scripts to build/test are written to print test results to console (std_out). To get richer test experience in CI/CD pipeline, customers has to modify their scripts and often need to add 3rd party plugins. This is a steep learning and test reporting is one of the important data that should be easily available for open source github projects.
Proposal for solution(s):
Generate test results file based on environment variables: In this approach, test runners will generate test results file along with regular console output if an environment variable is set. CI/CD pipelines can set this variable to desired test output location where they can automatically publish test results by consuming test results file generated by test runners (Mocha, Jasmine, Jest, Pytest). This simple flag will make sure test runners are not going through any change in behavior in terms of execution or context they are running and users don't require go through any modification to their source/scripts.
Happy to listen to community feedback. Feel free to share other ideas if proposed solution is not feasible one.