小编Dan*_* M.的帖子

是否可以忽略单个测试的 beforeEach ?

我希望测试用例 2 不调用 beforeEach,但测试用例 1 和 3 应该继续调用 beforeEach,这可能吗?

我正在使用 NightWatch.js

module.exports = {

  before(browser) {
    // > this will get run only ONCE, before all the tests <
  },
  beforeEach(browser) {
    // > this will get run before every test case <
  }

  tags: ['your', 'tags', 'go', 'here'],
  'Test Case No.1': (browser) => {
     // > this test does something here <
  },
  'Test Case No.2': (browser) => {
     // > this test does something else here <
  }, …
Run Code Online (Sandbox Code Playgroud)

automation nightwatch.js

5
推荐指数
1
解决办法
1万
查看次数

标签 统计

automation ×1

nightwatch.js ×1