遇到问题 --out 黄瓜
Having trouble with --out cucumber
我目前正在研究使用 Cucumber 的 --out 选项将我的测试结果写入文件。但是,我 运行 遇到了一些困难,无法在网上找到很多关于它的有用信息。我在我的 features 文件夹下创建了一个 reports 文件夹,并在里面放了一个文件 text.html,所以它看起来像这样:
features
-> reports
-> test.html
然而,当我 运行
cucumber --tags @test --format html --out reports/test.html
我收到错误
Not a directory @ rb_sysopen - reports/test.html
Error creating formatter: html (Errno::ENOTDIR)
如果我只是 运行
cucumber --tags @test --format html --out reports
测试没有报错,继续做它的事情,但我在报告中找不到任何报告。知道我做错了什么吗?提前致谢。
输出文件夹的路径是相对于项目根目录的,而不是 features
目录,因此您的目录结构应如下所示:
features
reports
-> test.html
将您的 reports
目录移动到项目根目录,然后您应该会看到正在创建的输出。
我目前正在研究使用 Cucumber 的 --out 选项将我的测试结果写入文件。但是,我 运行 遇到了一些困难,无法在网上找到很多关于它的有用信息。我在我的 features 文件夹下创建了一个 reports 文件夹,并在里面放了一个文件 text.html,所以它看起来像这样:
features
-> reports
-> test.html
然而,当我 运行
cucumber --tags @test --format html --out reports/test.html
我收到错误
Not a directory @ rb_sysopen - reports/test.html
Error creating formatter: html (Errno::ENOTDIR)
如果我只是 运行
cucumber --tags @test --format html --out reports
测试没有报错,继续做它的事情,但我在报告中找不到任何报告。知道我做错了什么吗?提前致谢。
输出文件夹的路径是相对于项目根目录的,而不是 features
目录,因此您的目录结构应如下所示:
features
reports
-> test.html
将您的 reports
目录移动到项目根目录,然后您应该会看到正在创建的输出。