Skip to content

Commit

Permalink
chore: added surefire html report
Browse files Browse the repository at this point in the history
  • Loading branch information
UzaeirAzhar committed Sep 25, 2024
1 parent 0061e5a commit 589ed52
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 3 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,14 @@ jobs:
- name: Build & Install
run: mvn -B install -DskipTests --no-transfer-progress

- name: Run Maven test
- name: Run Maven Integration Tests
run: xvfb-run -a mvn test -Pintegration-tests

- name: Generate HTML Report
run: xvfb-run -a mvn surefire-report:report-only

- name: Upload Test Reports
uses: actions/upload-artifact@v3
with:
name: test-reports
path: target/site/surefire-report.html
36 changes: 34 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,14 @@
</properties>

<dependencies>
<!-- Dependencies (same as before) -->
<!-- Playwright Dependency -->
<dependency>
<groupId>com.microsoft.playwright</groupId>
<artifactId>playwright</artifactId>
<version>1.46.0</version>
</dependency>

<!-- JUnit 5 Dependencies -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
Expand All @@ -41,6 +42,7 @@
<scope>test</scope>
</dependency>

<!-- Logging (SLF4J and Logback) -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
Expand All @@ -67,7 +69,7 @@
</configuration>
</plugin>

<!-- Maven Surefire Plugin to run the tests -->
<!-- Maven Surefire Plugin to run the tests and generate XML reports -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
Expand All @@ -78,8 +80,38 @@
<headless>${headless}</headless>
<browser>${browser}</browser>
</systemPropertyVariables>
<reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
</configuration>
</plugin>

<!-- Maven Surefire Report Plugin to generate HTML reports -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>3.0.0-M3</version>
<configuration>
<outputDirectory>${project.build.directory}/surefire-reports</outputDirectory>
</configuration>
</plugin>

<!-- Maven Site Plugin with Doxia to generate the site and avoid the verbatim() error -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.12.1</version>
<dependencies>
<dependency>
<groupId>org.apache.maven.doxia</groupId>
<artifactId>doxia-core</artifactId>
<version>1.11.1</version>
</dependency>
<dependency>
<groupId>org.apache.maven.doxia</groupId>
<artifactId>doxia-sink-api</artifactId>
<version>1.11.1</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>

Expand Down

0 comments on commit 589ed52

Please sign in to comment.