Skip to content

This framework uses TestNG to test the SpringBoot Maven Project

Notifications You must be signed in to change notification settings

vibssingh/SpringBoot_TestNG_Demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spring Boot with TestNG Integration

This is a sample application to demonstrate how to setup and run SpringBoot tests with TestNG.

1. This framework consists of:
   Springboot – 3.5.0
   Java 17
   TestNG – 7.10.2
   Maven – 3.9.6
   RestAssured – 5.4.0
  1. To run the tests through Maven command line, add the below dependency to surefire plugin:
<plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>${maven.surefire.plugin.version}</version>
        <configuration>
          <suiteXmlFiles>
            <suiteXmlFile>testng.xml</suiteXmlFile>
          </suiteXmlFiles>
        </configuration>
        <dependencies>
          <dependency>
            <groupId>org.apache.maven.surefire</groupId>
            <artifactId>surefire-testng</artifactId>
            <version>${maven.surefire.plugin.version}</version>
          </dependency>
        </dependencies>
      </plugin>
  1. Use the below command to run the tests through Maven
   mvn clean test
  1. This framework contains sample TestNG Reports under test-output folder - index.html and emailable-report.html

  2. Surefire Reports can be seen under target/surefire-reports. These reports are created when the tests are run through maven command.

About

This framework uses TestNG to test the SpringBoot Maven Project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages