Skip to content

Latest commit

 

History

History
86 lines (64 loc) · 6.28 KB

README.md

File metadata and controls

86 lines (64 loc) · 6.28 KB

Playwright GitHub Actions Maven CodeCov Ubuntu Discord

UI test execution CodeQL codecov

ABOUT

Automated end-to-end testing framework built with Playwright and Java, tailored for any website. Designed for scalability and maintainability, this framework covers critical test scenarios with robust assertions and clean, modular code. Perfect for those looking to speed up their test automation journey or enhance their Playwright skills!

STEPS FOR THE TEST EXECUTION IN LOCAL

  1. git clone https://github.com/iamcharankumar/playwright_test_framework.git
  2. cd playwright_test_framework
  3. git pull
  4. mvn clean test -Dgroups=SWAG_LABS_SMOKE,SWAG_LABS_REGRESSION,SWAG_LABS_E2E -Dthreads=3 -Ddataproviderthreadcount=3

SUPPORTED BROWSERS

  • Chrome -Dbrowser=chrome (default value is chrome)
  • Firefox -Drunmode=firefox
  • Microsoft Edge -Drunmode=msedge

SUPPORTED RUN MODES

  • local -Drunmode=local (default value is local)
  • headless -Drunmode=headless

REPORTPORTAL INTEGRATION

  • To integrate your test reports with the open source tool - Reportportal, please refer to this section in my java-selenium framework repo for installation as well as the integration.

INTEGRATE DISCORD MESSAGE SERVICE

  • To send test reports from Reportportal to any Discord Message Channel, please refer to this section and all the classes in this package of the same java-selenium framework repo.
  • In this framework, Discord has been integrated via Github actions. Refer final result in the image below. Discord_Report_Message

CODE COVERAGE [CODECOV TOOL]

  • The code coverage is leveraged via Github Actions integrating codecov tool.
  • The latest code coverage for this project is available here.
  • The code coverage grid: codecov

EXTRAS

  • Below is the maven commands combo that will help you to cover all the supported browsers and runmodes.
  • These maven commands (no testng.xml required) are executed with the respective groups and thread counts. The listeners [screenshot, retry, etc] are configured in "pom.xml" under "< property >" tag.

BROWSERS & RUN MODES

Sl.No Browser Name Run Mode mvn command
1 Chrome Local mvn clean test -Dgroups=SWAG_LABS_SMOKE,SWAG_LABS_REGRESSION,SWAG_LABS_E2E -Dthreads=3 -Ddataproviderthreadcount=3
2 Chrome Headless mvn clean test -Drunmode=headless -Dgroups=SWAG_LABS_SMOKE,SWAG_LABS_REGRESSION,SWAG_LABS_E2E -Dthreads=3 -Ddataproviderthreadcount=3
3 Chrome Remote mvn clean test -Drunmode=remote -Dgroups=SWAG_LABS_SMOKE,SWAG_LABS_REGRESSION,SWAG_LABS_E2E -Dthreads=3 -Ddataproviderthreadcount=3
4 Firefox Local mvn clean test -Dbrowser=firefox -Dgroups=SWAG_LABS_SMOKE,SWAG_LABS_REGRESSION,SWAG_LABS_E2E -Dthreads=3 -Ddataproviderthreadcount=3
5 Firefox Headless mvn clean test -Drunmode=headless -Dbrowser=firefox -Dgroups=SWAG_LABS_SMOKE,SWAG_LABS_REGRESSION,SWAG_LABS_E2E -Dthreads=3 -Ddataproviderthreadcount=3
6 Firefox Remote mvn clean test -Drunmode=remote -Dbrowser=firefox -Dgroups=SWAG_LABS_SMOKE,SWAG_LABS_REGRESSION,SWAG_LABS_E2E -Dthreads=3 -Ddataproviderthreadcount=3
7 Edge Local mvn clean test -Dbrowser=edge -Dgroups=SWAG_LABS_SMOKE,SWAG_LABS_REGRESSION,SWAG_LABS_E2E -Dthreads=3 -Ddataproviderthreadcount=3
8 Edge Headless mvn clean test -Drunmode=headless -Dbrowser=edge -Dgroups=SWAG_LABS_SMOKE,SWAG_LABS_REGRESSION,SWAG_LABS_E2E -Dthreads=3 -Ddataproviderthreadcount=3

NOTE: These above commands (no testng.xml required) will run the tests in parallel with the specified thread count and with the respective groups and thread counts. The screenshot listeners are configured in "pom.xml" under "< property >" tag.

Star History

Star History Chart