官术网_书友最值得收藏!

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 using Mocha, as shown in the following screenshot:

As you can see in the following screenshot, our test cases are passing, which proves that our functions are running perfectly fine:

主站蜘蛛池模板: 福海县| 望城县| 金沙县| 梨树县| 东乡族自治县| 崇仁县| 汾阳市| 册亨县| 东山县| 花莲县| 东方市| 永城市| 阿拉善左旗| 文安县| 涪陵区| 松原市| 南川市| 马龙县| 临江市| 太保市| 富阳市| 沅陵县| 甘肃省| 卓资县| 阜宁县| 武穴市| 揭西县| 湟中县| 定日县| 津南区| 泊头市| 沁源县| 婺源县| 横峰县| 易门县| 名山县| 澄城县| 类乌齐县| 上思县| 洱源县| 改则县|