You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: examples/junit/README.md
+7-3Lines changed: 7 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,8 @@
1
1
# **JUnit Test Evidence Example**
2
2
3
-
This repository provides a working example of a GitHub Actions workflow that automates Java Maven project testing using **JUnit**. It then attaches the resulting test report as signed, verifiable evidence to the package in **JFrog Artifactory**.
3
+
This repository provides a working example of a GitHub Actions workflow that automates the testing of a Java Maven project using JUnit. It then attaches the resulting consolidated test report as signed, verifiable evidence to the build information in JFrog Artifactory.
4
4
5
-
This workflow is an essential pattern for DevSecOps, creating a traceable, compliant, and secure software supply chain with comprehensive test coverage validation.
5
+
This workflow creates an essential quality gate,
6
6
7
7
### **Key Features**
8
8
@@ -117,6 +117,7 @@ Once the workflow completes successfully, you can navigate to your repository in
117
117
***Build and Deploy Maven Package:**
118
118
119
119
```bash
120
+
The workflow compiles and packages the Java application using Maven. It then uploads the resulting `.jar` file directly to Artifactory using the JFrog CLI and publishes the associated build information.
The workflow executes the standard Maven test lifecycle. The Surefire plugin runs all JUnit tests and generates XML reports. Additional Maven commands are run to create a user-friendly HTML site with the test results.
133
135
134
136
```bash
135
137
cd examples/junit/src
@@ -138,6 +140,7 @@ mvn site:site
138
140
```
139
141
140
142
***Consolidate Test Results:**
143
+
The XML reports generated by Maven are not ideal for evidence. This step runs custom shell scripts to merge all individual XML test reports into one, and then converts that consolidated report into a single `consolidated-test-report.json` file.
This final step uses `jf evd create --build-name` to attach the consolidated JSON test report to the **build information** that was published in the first step. This creates a verifiable link between the CI process and its resulting test quality.
156
160
157
161
```bash
158
162
jf evd create \
@@ -199,4 +203,4 @@ The workflow generates a consolidated JSON test report with the following struct
0 commit comments