Create unit tests and run tests in CI/CD pipeline
You can create atests folder in your project folder and put unit tests in this folder.
In your CI/CD pipeline, you can cd into the project’s folder and run the following command
to run unit tests.
Example unit tests
End-to-end test for a pipeline:Test environment
When running unit tests, theenv variable’s value in the method’s kwargs is test.
You can leverage this variable to change the code logic or config used in the unit tests.