Unit testing a deployed application

Once the application is deployed, we can run the unit test on it. In order to try out some unit tests, I have created three unit tests in the test folder, and we will be testing them using Mocha. Let's create another job in Jenkins for setting up unit testing. Again, it would be a freestyle job in Jenkins, as shown in the following screenshot:

We add the Git repository path to Jenkins where our test cases are residing, as shown in the following screenshot:

Then we add an execute shell to run the unit test ...

Get DevOps for Serverless Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.