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

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:

主站蜘蛛池模板: 平阴县| 常宁市| 乌拉特后旗| 锡林郭勒盟| 明水县| 临朐县| 兴宁市| 莱芜市| 德清县| 惠来县| 交口县| 海阳市| 美姑县| 喜德县| 横峰县| 闽侯县| 启东市| 宽城| 新乡县| 德昌县| 金塔县| 报价| 邵武市| 佛坪县| 大同市| 山东省| 阳春市| 三都| 游戏| 南安市| 东台市| 青阳县| 崇州市| 石嘴山市| 松江区| 遵义县| 边坝县| 东安县| 凤冈县| 务川| 娄底市|