Automattic / jetpack

Security, performance, marketing, and design tools — Jetpack is made by WordPress experts to make WP sites safer and faster, and help you grow your traffic.
https://jetpack.com/
Other
1.58k stars 797 forks source link

Enhancement: action-test-results-to-slack could support xunit xml #39413

Open testlabauto opened 4 days ago

testlabauto commented 4 days ago

Impacted plugin

None / Other

What

I would like action-test-results-to-slack to support XUNIT XML

How

Most all test frameworks these days can output XUNIT XML. This plugin would perhaps receive the attention it deserves if that feature was added. I am actually using Playwright myself, but I am using Mocha as my runner and not Playwright/Test so my output format does not match what the plugin handles.

Personally, I would not expect attachments to be handled, just the pass/fail test case status if that is supported with the playwright integration.

anomiex commented 4 days ago

Looks like the way to go about this would be to add a function similar to getPlaywrightBlocks() (in projects/github-actions/test-results-to-slack/src/playwright.js) that would process xunit xml to produce whichever blocks are appropriate, and call it from the same place in message.js that that function is called.