-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Open
Labels
feature-test-runnerPlaywright test specific issuesPlaywright test specific issuesopen-to-a-pull-requestThe feature request looks good, we are open to reviewing a PRThe feature request looks good, we are open to reviewing a PR
Description
Context:
- Playwright Version: [1.20.0]
- Operating System: [Windows 10]
- Node.js version: [v14.17.5]
- Browser: [All]
Code Snippet
Hello everyone πβπ»! I found incorrect junit reporter serialization work;
when the test fails I expect the "failure message" field in the xml file to contain the error text, but it contains the test header:
<failure message="example.spec.ts:5:3 Check equal" type="FAILURE">
test code:
test.describe('Example', () => {
test('Check equal', async () => {
throw new Error('Error message');
});
});
how it looks in json reporter:
"error": {
"message": "Error message",
"stack": "Error: Error message\n at C:\\Users\\username\\Desktop\\issue\\new-project\\tests\\example.spec.ts:6:11"
},
I prepared a repository with npm scripts:
npm run testJson
- for run with json reporter
npm run testJunit
- for run with junit reporter
I hope this makes your job easier, thanks for Playwright!β€
ASaiAnudeep
Metadata
Metadata
Assignees
Labels
feature-test-runnerPlaywright test specific issuesPlaywright test specific issuesopen-to-a-pull-requestThe feature request looks good, we are open to reviewing a PRThe feature request looks good, we are open to reviewing a PR