Skip to content

Using Framework First Steps

Catalin edited this page May 22, 2019 · 4 revisions

macOS

We're going to use a Maven archetype to generate a template framework that we can then go onto develop our suite within. You'll need to install Java (Version 8) and Maven (3.x). To do this you can use a package manager such as brew.

To check the tools are pathed using the following commands:

java -version
mvn -version

Navigate to a code directory on your machine that you wish to place your test suite. It does not and should not need to be under the main code path.

mvn archetype:generate -DarchetypeGroupId=com.nttdata -DarchetypeArtifactId=cinnamon-archetype

You will be prompted for a groupId, artifactId, version and package. Use similar values to the examples below.

Define value for property 'groupId': : mycompany
Define value for property 'artifactId': : mytestsuite
Define value for property 'version':  1.0-SNAPSHOT: :
Define value for property 'package':  mycompany: :

This will create a package folder containing a source tree and a single sanity test.

The following command will download the shared packages using Maven into your local cache.

NOTE: On an intermitent network this can sometimes fail due to package download failures. Be persistent.

mvn clean compile

NOTE: Current Tip Of Tree version requires a change in the pom.xml. Current version of cinnamon.version is set to 0.0.3 but this is not available yet. Change the settings to <cinnamon.version>0.0.2</cinnamon.version>

Once you have compiled the code. You will now need to start developing some tests.

To do this follow the steps in Single-Stepping-an-Example But instead of using AllTests use DevTests as the configuration to run.