user19920223
user19920223

Reputation: 1

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

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

Upvotes: 0

Views: 79

Answers (2)

user19920223
user19920223

Reputation: 1

This problem was solved by the following solution. Create doc-allure-config.js in the root directory of the test project, and then configure the content as shown below Then run the testcase. The test result path setting takes effect. enter image description here

Upvotes: 0

Adika R
Adika R

Reputation: 159

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.

Upvotes: 0

Related Questions