Unit Testing for the CI/CD
This feature allows you to unit test your Flogo app using the app executable. Once you have built the executable for a Flogo app, you can run a unit test using the test
command. This feature is also useful to automate the testing process for activities in development in CI/CD pipeline.
Before you beginThe app executable must be readily accessible on the machine from which you plan to test it.
Follow these steps to get help on the test command:
- Procedure
- Open a command prompt or terminal window depending on your platform.
- Navigate to the folder where you stored the app executable.
-
Run the following command to get the online help on the test command:
- On Windows:
<app-executable> --test --test-file
- On Macintosh:
./<app-executable> -test --test-file
- On Linux:
./<app-executable> -test --test-file
This command outputs the usage for the
test
command along with some examples. - On Windows:
-
Run the command with the appropriate option to test your app.
The output of the command generates the .testresult
file for the unit test suites or test cases that are run.