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

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:

主站蜘蛛池模板: 余江县| 沙河市| 城步| 永泰县| 彰武县| 伊金霍洛旗| 政和县| 光泽县| 云南省| 新宁县| 永城市| 崇文区| 威宁| 德格县| 静乐县| 稻城县| 启东市| 黄龙县| 赣州市| 沿河| 祁门县| 阳山县| 银川市| 乌兰浩特市| 三台县| 古交市| 襄樊市| 东兴市| 琼结县| 周宁县| 惠来县| 石门县| 澄迈县| 陇川县| 皋兰县| 刚察县| 贡嘎县| 沈丘县| 西峡县| 洮南市| 历史|