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

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:

主站蜘蛛池模板: 昭苏县| 平定县| 临西县| 石林| 克拉玛依市| 新兴县| 上犹县| 东宁县| 温泉县| 庆元县| 无为县| 南木林县| 渝北区| 会东县| 中宁县| 天长市| 综艺| 阳高县| 富阳市| 蓝山县| 封开县| 璧山县| 昭通市| 晋江市| 万载县| 马鞍山市| 云安县| 吴桥县| 工布江达县| 新丰县| 南平市| 奎屯市| 达日县| 宁远县| 阿荣旗| 比如县| 色达县| 云林县| 竹北市| 旌德县| 万全县|