ibmint generate tests command
Use the ibmint generate tests command to generate test projects from a set of recorded messages on your file system.
Usage notes
- You must install Gradle (version 8.2.1 or higher). The Gradle application is not supplied with App Connect Enterprise, but you can install it from https://gradle.org/install/.
- You must provide the fully-qualified class path of the Java-class to contain the generated tests.
- All parameters are required.
- The command searches all subdirectories in the recorded-messages location, so you can organize your recordings into subfolders without affecting the command output.
- The command generates tests for all recorded messages that are found in the recorded-messages
directory, so you must take care when you provide large parts of a file system as an argument, such
as
--recorded-messages/
. - You can generate tests for specific message flows or applications by sorting your recorded messages into directories and providing a subdirectory as the recorded-messages location. Messages from integration servers are recorded in subdirectories, which are sorted by Application and MessageFlow.
- For more information about generating tests, see Generating tests by using the ibmint generate tests command.
Supported platforms
- Windows
- Linux®
- Linux on POWER®
- Linux on Z
- AIX®
- IBM® z/OS® Container Extensions (zCX)
Purpose
The ibmint generate tests command generates unit tests
from recorded messages.
Syntax
Parameters
- --recorded-messages directory
- Fully qualified path of the directory that contains the generated tests.
- --output-test-project testProjectName
- The name of the generated test project.
- --java-class javaName
- Fully qualified Java name for the class to contain the generated JUnit tests. For example, myClassName.
- --help
- Output the command help information to the console.
Examples
Using the absolute path name for all
parameters:
ibmint generate tests --recorded-messages ~/Dev/recordings/flow1 --output-test-project ~/Dev/tests/Flow1Tests--java-class com.my.bar.Flow1Tests
Using paths relative to the current location (inside
~/Dev/recordings):
ibmint generate tests --recorded-messages --recorded-messages flow1 --output-test-project ../tests/Flow1Tests --java-class com.my.bar.Flow1Tests