Skip to content

Conversation

@PramodKumarYadav
Copy link
Contributor

@PramodKumarYadav PramodKumarYadav commented Jan 30, 2024

Problem statement:

In the current GitHub workflow, the test report is made available as a zip archive; which requires users to first download it, unarchive it, copy it to a repo that has playwright installed and then view it; say from their local machine.

Idea is to make the report immediately available to users by publishing it on Projects GitHub Pages: https://microsoft.github.io/playwright-examples/

Solution:

By using official GitHub actions as specified here, I updated the workflow to publish html test result artefact both as a zip file and also on GitHub pages.

There is a small one time effort required to update the project settings for the actions to be able to publish results on GitHub Pages. The instructions for this are listed in both readme file and also on official docs here.

Tests

Since I am not a project admin or maintainer of microsoft/playwright-examples/ repo, I tried this solution on a personal Sandbox project and found it to be working correct for both below tested scenarios:

  • When all tests are green.
    pass-results

  • When there are test failures.

fail-results

I think this would really improve the user experience of testers who use GitHub actions as a solution.

Sidenote

While updating readme file, I also took some liberty to add some emojis for the headings and name the section as "Getting started". "Getting started" is usually a standard I have seen followed in most projects to explain what users should do to "Get started" and hence the update.

Additional Info

The actions I used are all approved, from GitHub itself and are available on GitHub marketplace: https://github.com/marketplace?query=github+pages&type=actions

github actions

@PramodKumarYadav
Copy link
Contributor Author

For reference implementation, here is the project where I tested and implemented this change: https://github.com/PramodKumarYadav/playwright-sandbox?tab=readme-ov-file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant