使用Allure作为报告器时如何设置测试结果路径?

问题描述 投票:0回答:1

我尝试了多种设置resultPath的方法,都失败了。它仍然引用默认路径“./allure/allure-result”我该怎么办? 这是我使用的代码

const testcafe = await createTestCafe(evn.hostname, evn.port1, evn.port2, sslOptions);
const runner = testcafe.createRunner(); await runner.src(testfile) .browsers('chrome --ignore-certificate-errors --use-fake-ui-for-media-stream')
.reporter(['allure']) 
await runner.run({              
            reporterOptions:{                     
                    allure:{                         
                            outputDir:resultPath                     
                            }                 
}             
})             
await testcafe.close();

另一个代码

但是也没有生效

const testcafe = await createTestCafe(evn.hostname, evn.port1, evn.port2, sslOptions);
const runner = testcafe.createRunner();
            await runner.src(testfile)
.browsers('chrome --ignore-certificate-errors --use-fake-ui-for-media-stream')
.reporter('allure',{outputDir:resultPath})
await runner.run()
await testcafe.close();
testcafe allure
1个回答
0
投票

这个问题看起来不像是 TestCafe 的问题。

testcafe-reporter-allure
不是官方的 testcafe 记者,所以最好询问其作者。也许,您可以在以下文档中找到解决方案。

© www.soinside.com 2019 - 2024. All rights reserved.