Skip to content

Latest commit

 

History

History
58 lines (38 loc) · 1.07 KB

how_to_run_test.md

File metadata and controls

58 lines (38 loc) · 1.07 KB

How to Run Tests

Using Maven

You can run the tests by using Maven commands:

  1. Run all tests:

    mvn test
  2. Run tests with specific profiles:

  • Integration Tests:

    mvn test -P integration-tests
  • End-to-End Tests:

    mvn test -P e2e-tests
  • API Tests:

    mvn test -P api-tests

Using the Script

There is a Bash script run-test.sh to run tests locally without Maven commands. To use the script:

  1. Give it execution permission (if not already):

    chmod +x src/main/java/com/playwright/practice/scripts/run-test.sh
  2. Run the script:

    ./src/main/java/com/playwright/practice/scripts/run-test.sh [test-type]

Example:

./src/main/java/com/playwright/practice/scripts/run-test.sh i -h true -b c -t LoginTest
  • i runs integration tests.
  • -h true runs tests in headless mode.
  • -b c runs tests in Chrome browser.
  • -t allows specifying a test class to run.