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

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:

主站蜘蛛池模板: 静乐县| 禹城市| 麻栗坡县| 临泽县| 云安县| 兴国县| 石渠县| 沂水县| 尉犁县| 邳州市| 镇坪县| 辽源市| 荆州市| 柞水县| 沛县| 大同县| 邵阳县| 灵武市| 霍林郭勒市| 桐梓县| 宜兴市| 上犹县| 郓城县| 陆良县| 尉犁县| 新津县| 黄梅县| 南漳县| 贵溪市| 吕梁市| 丹江口市| 永修县| 桦甸市| 游戏| 弥渡县| 边坝县| 嘉峪关市| 肇庆市| 科技| 佛教| 新乡县|