user2618875
user2618875

Reputation: 890

Configure report generation HTML template in Maven Surefire Java for JUnit

I am working on Selenium automation using Java. I am using Maven automation and maven surefire dependency to generate HTML reports of JUnit tests. Default format looks great. But I want to configure HTML format and want Surefire to render my custom HTML format. I tried some options along with "mvn surefire-report:report-only" but those are not working.

mvn execution commands I am using are as follows:

Can you please guide me.

Upvotes: 4

Views: 1081

Answers (1)

Mohammad Faisal
Mohammad Faisal

Reputation: 5959

Run surefire-report:report maven goal on your project. This will generate an HTML file under {project_location}/target/site/surefire-report.html.

mvn surefire-report:report

See https://maven.apache.org/surefire/maven-surefire-plugin/usage.html for more details.

Upvotes: 1

Related Questions