Skip to content

Latest commit

 

History

History
58 lines (38 loc) · 2.1 KB

readme_commandLine.md

File metadata and controls

58 lines (38 loc) · 2.1 KB

Back to Table Of Contents

Test run and debug with command line

To run tests, first, we have to be sure that all the packages are correctly downloaded from the pom

mvn clean install -DskipTests

Select the environment

When you want to run tests, you usually have to decide the environment you want to test. In the environment.properties file we have defined some environments, with the corresponding path.

If you don't specify the environment to test, the default one will be used (defined in pom.xml). Otherwise, we can change it by command line:

mvn test -Denvironment=anotherEnvironment

Back to the Top Of Page

Set the log level

The default log level for the output console log is 'INFO', but if you need a different level, you can change it with the command line:

mvn test -DlogLevel=DEBUG

The allowed values are: ERROR, WARN, INFO (default) , DEBUG, TRACE

The INFO level will show you only 'SUCCESS' if the test case is successful, otherwise 'FAILED' with the specific error message occurred.

Back to the Top Of Page

Run just the tests you need

You can choose to run specific test suites and/or test cases.

To do that you can use the heatTest system property, that contains the list of what you want to run, using the comma as separator.

For example, to run only specific test suites: mvn test -DheatTest="SUITE1,SUITE2"

To run a list of specific test cases (also belonging to different suites): mvn test -DheatTest="SUITE1.001,SUITE1.002,SUITE2.001"

Obviously you can match these examples and specify if you want to run some test suites and some test cases: DheatTest="SUITE1,SUITE2.001,SUITE2.002"

Back to the Top Of Page