How to run a single test in nightwatch

后端 未结 6 1438
野的像风
野的像风 2021-02-01 02:13

How do I run only Test 3 from the following tests?

module.exports = {
  \'Test 1\':function(){},
  \'Test 2\':function(){}
  \'Test 3\':function(){}         


        
6条回答
  •  粉色の甜心
    2021-02-01 02:57

    The --testcase flag can since version 0.6 be used to run a single test from the commandline, e.g.

    nightwatch.js --test tests\demo.js --testcase "Test 1"
    

    This could be done using either test groups or test tags. You can also execute a single test with the --test flag, e.g.

    nightwatch.js --test tests\demo.js
    

提交回复
热议问题