How could I set test result path when using Allure as the reporter?

40 Views Asked by At

I have tried several ways to set the resultPath,all failed. It still refer to the default path "./allure/allure-result" how could I do? this is the code I used

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();

another code

but it doesn't take effect too

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();
1

There are 1 best solutions below

0
Adika R On

The issue does not look like a TestCafe problem. testcafe-reporter-allure is not an official testcafe reporter so it's better to ask its author. Perhaps, you can find a solution in the following documentation.