【问题标题】:How to accomplish the testcafe test structure like mocha如何完成像mocha这样的testcafe测试结构
【发布时间】:2019-08-27 02:32:20
【问题描述】:

Testcafe 提供固定装置和测试来组织测试。如何使用fixture和test来完成如下mocha结构的测试结构

这是 mocha 中的示例测试结构

describe('test', () => {
  beforeEach(() => {
    ....
  }

  describe('test suite 1', () => {
    beforeEach(() => {
      ...
    }

    it('test1', () => {
      ...
    }

    it('test2', () => {
      ...
    }
  }

  describe('test suite 2', () => {
    beforeEach(() => {
      ...
    }

    it('test3', () => {
      ...
    }

    it('test4', () => {
      ...
    }
  }

}

【问题讨论】:

    标签: testing automated-tests mocha.js e2e-testing testcafe


    【解决方案1】:

    目前,TestCafe 不允许创建嵌套测试,但我们可能会在未来实现此功能。我建议您在 TestCafe 存储库中跟踪 https://github.com/DevExpress/testcafe/issues/792 问题,以了解我们在这方面的进展。

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2016-08-07
    • 2018-12-05
    • 1970-01-01
    • 1970-01-01
    • 2017-06-15
    • 1970-01-01
    • 2018-04-14
    • 1970-01-01
    相关资源
    最近更新 更多