Skip to content

Onboarding Playwright (JavaScript and TypeScript) to AzureTestPlanV0 Task #21095

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Jun 23, 2025

Conversation

anshika-gupta21
Copy link
Contributor

@anshika-gupta21 anshika-gupta21 commented Jun 18, 2025

Task Name: AzureTestPlanV0


Description

Currently, ATP supports four frameworks: JavaMaven, JavaGradle, PyTest, Jest. This PR introduces the integration of the Playwright framework, supporting both JavaScript and TypeScript, with Azure Test Plans (ATP) Task to enhance automated testing capabilities. Playwright is a powerful open-source automation framework that simplifies end-to-end testing across different browsers.

Key Features & Implementation Details:

  1. ATP Integration:
  • The pipeline is configured to connect Playwright tests with ATP, enabling automated execution of test plans and test cases.
  1. Test Execution & Reporting:
  • The pipeline executes Playwright tests and publishes results in the tests tab.
  • Execution status and history are reflected in the Execute tab of the test plan.
  • The Runs tab displays detailed test reports, including the attached test-results.xml file.
  • Detailed reporting includes pass/fail status, execution time, and browser-specific results.
  1. Cross-Package Test Handling and Telemetry:
  • Test cases located in different packages under the tests folder are automatically discovered and executed.
  • The Playwright test executor uses grep to collect all test cases and generate a unified JUnit XML report.
  • Pipeline logs include telemetry to support traceability and debugging.
  • Playwright-specific test modifiers such as .skip(), .fail(), and .only() are handled to reflect expected outcomes.
  1. Multi-Browser and Dual Language Support:
  • Tests are executed across Chromium, Firefox, and WebKit to ensure cross-browser compatibility.
  • Both JavaScript and TypeScript test files are supported while using a common executor in the background.

Demo video: https://microsoftapc-my.sharepoint.com/:v:/g/personal/t-anshgupta_microsoft_com/EZiGK7aFm-9FgpELYZyNQxsBFzmUgRUTh5uVDBeys_drtg?e=IMknGX


Sample Pipeline to run: https://dev.azure.com/tfspfcusctest/Azure%20Test%20Plan%20Task%20Playground/_build/results?buildId=10749&view=results


The language selection options visible in UI:

ui_ss2

Published results on Test tab:

tests tab

test-results.xml file:

testresultsxml

Associated Automation:

associatedAutomation

Progress Report:

progress_report


Checklist

  • Task version was bumped — see versioning guide
  • Verified the task behaves as expected

Copy link
Contributor

@adityashahms adityashahms left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me know once changes are done.

@KathanS
Copy link
Contributor

KathanS commented Jun 20, 2025

@anshika-gupta21 can you please merge the latest changes from master into this branch? we can run pending checks after updating the branch

@KathanS
Copy link
Contributor

KathanS commented Jun 23, 2025

/azp run

@anshika-gupta21
Copy link
Contributor Author

@anshika-gupta21 please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.

@microsoft-github-policy-service agree [company="{your company}"]

Options:

  • (default - no company specified) I have sole ownership of intellectual property rights to my Submissions and I am not making Submissions in the course of work for my employer.
@microsoft-github-policy-service agree
  • (when company given) I am making Submissions in the course of work for my employer (or my employer has intellectual property rights in my Submissions by contract or applicable law). I have permission from my employer to make Submissions and enter into this Agreement on behalf of my employer. By signing below, the defined term “You” includes me and my employer.
@microsoft-github-policy-service agree company="Microsoft"

Contributor License Agreement

@microsoft-github-policy-service agree company="Microsoft"

Copy link
Contributor

@KathanS KathanS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (we can push the change for adding comment for separatePlaywrightTestName, #21095 (comment), rest looks good)

Copy link
Contributor

@adityashahms adityashahms left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@anshika-gupta21
Copy link
Contributor Author

/azp run

@anshika-gupta21 anshika-gupta21 merged commit 9d47191 into master Jun 23, 2025
5 checks passed
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.

4 participants