Execute Automated Tests

Take the automation scripts generated by TestModeller.io and integrate them into your automation framework for execution.

Integrate Automation Into Framework

  1. Open the Results.zip file previously downloaded.

  2. Navigate to code folder – here you will see the .java files that have been auto generated by TestModeller.io.

3. Copy the generated Java file into the automation framework. Navigate to the framework\src\test\java\Tests folder and paste the file.

4. It is useful to do a new compile to check all the code is valid and operational. Note if you have pasted this into a different location within the framework you may need to adjust the import statements to reflect the new framework structure of the code.

Execute Tests

You can run the tests within the IntelliJ IDE by right-clicking on the test case and selecting to run it. Here we will run the entire test suite through the command line.

  1. Navigate to the Java framework directory (this location should contain the pom.xml file in the root).

  2. Run mvn test. You should see your tests execute.

TestNG

The example automation framework uses TestNG as the test execution runner and results engine. You can tag tests, and also specify exactly which tests to run within TestNG either on your local machine or within your CI execution environment. We recommend referring to the TestNG documentation here to learn more about configuring TestNG for your requirements.