Unit Tests
Available only in self-hosted version
Description
Unit tests verify individual code units (e.g., methods or classes) in isolation from the rest of the system. They help detect errors early in development and ensure code changes don't break existing functionality.
JUnit Integration
GitFlic supports JUnit report integration, allowing you to view test results directly in the web interface.
Configuration Steps
- Add JUnit Reports to Project
Ensure your project generates JUnit XML reports, typically stored in: target/surefire-reports
(Maven)-
Or equivalent directory for your build system (e.g., Gradle)
-
Configure CI/CD Pipeline
Update your pipeline configuration file (gitflic-ci.yaml
) to publish JUnit reports:
artifacts: reports: junit: paths: - target/surefire-reports/*
-
View Reports
After successful test execution: - Overview: See aggregate results in the pipeline's "Tests" section
- Details: Navigate to individual jobs → "Tests" tab for:
- Test case tables
- Failure details
- Status filtering
Automatic translation!
This page has been automatically translated. The text may contain inaccuracies