testng builtin reports in testng

TestNG generates 2 types of HTML reports in output directory as mentioned below.
  • index.html
  • emailable-report.html
If you are using Maven as your build management tool, you will find these reports under target/surefire-reports directory. Here is the sample index.html report.Here is the sample emailable-report.html report.If you are using Gradle as your build management system, you can view reports in build/reports directory. Below image shows sample HTML report in Gradle build.Note that above report is generated by Gradle API. If you want to use the TestNG API to generate reports, you will have to use below code in your build.gradle file.
 
test {
    useTestNG() {
       useDefaultListeners = true
    }
    reports.html.enabled = false
}

After that if you execute test task, TestNG reports will be created under build/reports/tests directory. Below image shows how you can export the HTML report from IntelliJ IDEA IDE.

Web development and Automation testing

solutions delivered!!