Integrating dotTEST with GitLab allows you to run code analysis, collect code coverage data and test results with Parasoft dotTEST and review results directly in GitLab.
To integrate with GitLab, modify your GitLab workflow to include a job that will:
For static analysis,
Run dotTEST.
- Upload the results in the GitLab-specific SAST format.
- Upload the reports in other formats (XML, HTML, etc.).
To ensure that the result are displayed, you must properly configure analysis with dotTEST. In particular, you must be sure to configure the SAST report format. When the pipeline completes, you can review the results in the Security tab of the GitLab pipeline and on GitLab's Vulnerability Report.
For unit tests,
- Run dotTEST.
- Use Saxon to convert dotTEST unit tests report to xUnit format.
- Upload the transformed xUnit report.
When the pipeline completes, you can review the test results handled by dotTEST in the Tests tab of the GitLab pipeline.
For coverage,
- Run dotTEST.
- Use Saxon to convert dotTEST coverage report to Cobertura format.
- Upload the transformed Cobertura coverage report.
After the pipeline triggered by a merge request completes, you can review the code coverage data collected by dotTEST in the file diff view of the GitLab Merge requests.
You can find more details and example workflow configuration at https://gitlab.com/parasoft/dottest-gitlab.