Integrating Jtest with GitLab allows you to run code analysis, collect code coverage data and test results with Parasoft Jtest and review results directly in GitLab.
To integrate with GitLab, modify your GitLab workflow to include a job that will:
For static analysis,
Run Jtest.
- 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 Jtest. 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 Jtest.
Use Saxon to convert Jtest unit tests report to xUnit format.
- Upload the transformed xUnit report.
When the pipeline completes, you can review the test results handled by Jtest in the Tests tab of the GitLab pipeline.
For coverage,
Run Jtest.
Use Saxon to convert Jtest 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 Jtest in the file diff view of the GitLab Merge requests.
You can find more details and example workflow configuration at https://gitlab.com/parasoft/jtest-gitlab.