Without going into Maven in depth, let’s start our first JUnit test with Maven.
- Download and install Maven if you haven’t done yet.
- Open up a command prompt (Windows) or a terminal (*uix or Mac), browse to a working directory to setup the project, and execute the following command.
mvn archetype:generate -DgroupId=com.test.api -DartifactId=apitest -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false
Project will be created as below:
CD to created project and enter "mvn test" command
It will download the required jars and Build the project and run the tests.
Now open IntelliJ and import the project pointing to POM file.
Comments
Post a Comment