Create a Maven project. Choose not “Create from archetype” in case you create a project in IntelliJ Idea.

Let’s say we work for the campany XYZ and this is going to be the Test Automation Framework for the Checkout Services.

Then your groupId and artifactId will look like this.

    <groupId>com.xyz.checkout</groupId>
    <artifactId>integration-tests</artifactId>

POM.XML

You also need to set spring-boot-starter-parent as a parent. Sometimes you have a choice to use another spring project as a parent. In most cases it works but I recommend to use spring-boot-starter-parent as a parent to avoid redundant dependencies and possible conflicts.

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.0.1.RELEASE</version>
    </parent>

Add 2 Spring Boot starters: spring-boot-starter, spring-boot-starter-test.

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-test</artifactId>
        <scope>test</scope>
    </dependency>

TestNG dependency

    <dependency>
        <groupId>org.testng</groupId>
        <artifactId>testng</artifactId>
        <version>6.8.5</version>
    </dependency>

JUnit is already included into Spring Boot.

Find the minimal required pom.xml in posts below

Back to the top