Another option for testing your CloudFormation templates is through the CICD pipeline we have setup earlier in the workshop.
With CICD pipeline, you can push your code to the develop branch of your repository, which will automatically trigger the test execution. You can stop your workspace and come back later to see the test results. You don’t have to actively monitor the tests and keep your terminal session open for TaskCat to run your tests.
First, commit your changes locally by running the following commands:
git add . git commit -m "some meaningful message"
Now, push your changes to the develop branch of your github repository, by running the following command:
git push origin develop
It will trigger the code pipeline to start building and testing your code changes.
You can see the progress and result of the test through AWS CodePipeline console.
Go to AWS CloudFormation console, and select the region where you created the CICD pipeline from the top right corner. You should see the CloudFormation stack for your CICD pipeline, as shown below.
Select the main stack checkbox, and in the window below it, under Outputs tab, click the link of CodePipelieURL.
You should see the CICD pipeline, as shown below. You will also notice that, the pipeline has been triggered by your code push and the Build process is either completed or in-progress.
After the test is completed successfully, the develop branch or your git repository will be merged into the master branch, and the pipeline will look like below.
To see the test logs, click Details under Code Build, and scroll down to Build logs section, as shown below.