Running tests by using the command line

You can run tests in a test project by using the command line.

Before you begin

Read the following topics:

About this task

You can run tests in a test project by using the IntegrationServer command to start the integration server, specifying the name of the integration test project with the --test-project parameter. For example:
IntegrationServer –work-dir /tmp/work-dir --test-project MyIntegrationTestProject --start-msgflows false
where the --work-dir parameter specifies the work directory of the integration server that will run the tests, and the --test-project specifies the name of the test project to be run. The false value on the --start-msgflows parameter prevents the deployed message flows from starting and accepting requests through their input nodes, but still allows the tests to run.
In addition to the parameters used in the example, the following optional flags can be used when running test projects in a pipeline, to speed up test operation:
  • Use the --admin-rest-api -1 parameter to disable the REST admin listener
  • Use the --no-nodejs parameter to disable Node.js
  • Use the --stop-after-duration <seconds> parameter to configure a maximum timeout in seconds, after which the integration server will terminate if the tests have not completed

For a demonstration of how you can generate and run tests from the command line in IBM App Connect Enterprise, see the following video: Generate and run tests from the command line.