How to Run - TestlumFramework/Testlum GitHub Wiki
Please note that you need to input your values for the filenames and the absolute path.
Example of test resources can be found also in details of last release (RESOURCES_EXAMPLE.zip).
- Clone the repository to your local machine.
- Open project in your favourite IDE.
- Setup required program arguments -c={config-file-name}.xml -p=path/to/test-resources. (Also full parameters name can be used --config and --path)
- Optional program arguments -s=/apiTests (or --scenarios=/apiTests) can be used to specify folder with test(s) to run.
- Launch main java class -
com.testlum.starter.TESTLUMStarter.
You can download .jar file of Testlum from our releases.
And then simply execute following command in CLI.
java -jar testlum-{version}.jar -c={config-file-name}.xml -p=path/to/test-resources- Add our official maven dependency.
<repositories>
<repository>
<id>testlum</id>
<name>Testlum Releases</name>
<url>https://mvnrepository.volyatechinc.com/artifactory/testlum</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>com.testlum</groupId>
<artifactId>tesltum-engine</artifactId>
<version>2.0.0</version>
</dependency>
</dependencies>- And use our starter.
public static void main(String[] args) {
TESTLUMStarter.main(new String[]{"-c={config-file-name}", "-p=/path-to-resources"});
}After cloning repository to your local machine:
- navigate to root project folder
- build image from Dockerfile
docker build -t testlum:2.0.0 .- execute run-docker-local bash script by passing test resources location
sh run-docker-local imageName configFileName testResourcesPath
sh run-docker-local testlum:2.0.0 global-config.xml ~/Users/user/test-resources Or you can use our official docker image from GitHub Registry.
docker pull ghcr.io/testlumframework/testlum:latestWhen the run finishes, Testlum exits with one of these codes. Use them in scripts and CI/CD pipelines to tell what the result was.
| Exit code | Status | Description |
|---|---|---|
0 |
Tests passed | Every scenario that ran passed. Scenarios turned off on purpose (e.g. active="false") don't affect the result. |
1 |
Tests failed | At least one scenario failed or was aborted, or the test launcher reported an error during the run. |
2 |
No tests found | No scenarios were found at the given path (-p) or scenario scope (-s). |
3 |
Invalid configuration | Testlum could not start: a required argument (-c / -p) is missing, the config file or test resources folder was not found, the application context failed to start, or no scenarios were found and the launcher reported an error. |
4 |
Tests failed to load | No scenario failed, but some scenarios that should have run could not be loaded or run: for example, a scenario file that can't be parsed, or one that uses an integration that is turned off in the config. |
If a run has both failed scenarios and scenarios that failed to load, the exit code is
1.