Skip to content

[BUG] When running tests through azure pipeline, only the first attachment is displayed in the results #8962

@almazmr

Description

@almazmr

Context:

  • Playwright Version: [1.15.0-next-alpha-sep-16-2021
  • Operating System: [Windows 10]
  • Node.js version: [v16.1.0.]
  • Browser: [All]
  • Extra: [any specific details about your environment]

Hello! I record a screenshot and a video when the test fails and display it in JUnit format to display attachments in Azure DevOps

import { PlaywrightTestConfig } from '@playwright/test'

const devConfig: PlaywrightTestConfig = {
  use: {
    screenshot: 'only-on-failure',
    video: 'retain-on-failure',
    trace: 'on',
    baseURL: config.baseURL,
  }
}
export default devConfig

I end up with the following XML (JUnit)

...
</failure>
<system-out>
[[ATTACHMENT|test-results/Tests-failed-Упавший-тест-для-проверки-CI-6299/b86d5287702d513749d6229cfe7f153e.webm]]
</system-out>
<system-out>
[[ATTACHMENT|test-results/Tests-failed-Упавший-тест-для-проверки-CI-6299/trace.zip]]
</system-out>
<system-out>
[[ATTACHMENT|test-results/Tests-failed-Упавший-тест-для-проверки-CI-6299/test-failed-1.png]]
</system-out>
</testcase>
</testsuite>
...

When loading results in Azure DevOps, I see only the first attachment
image

I am assuming all attachments should be kept under one "system-out" then, it will display all attachments

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions