Skip to content

Instantly share code, notes, and snippets.

@boysbee
Last active March 4, 2022 10:09
Show Gist options
  • Save boysbee/629691e510ac1c705abf64d1c9b052aa to your computer and use it in GitHub Desktop.
Save boysbee/629691e510ac1c705abf64d1c9b052aa to your computer and use it in GitHub Desktop.

Revisions

  1. boysbee revised this gist Mar 4, 2022. 1 changed file with 5 additions and 9 deletions.
    14 changes: 5 additions & 9 deletions simple.comand.line.sh
    Original file line number Diff line number Diff line change
    @@ -2,37 +2,33 @@
    npm playwright test

    # Run a single test file

    npm playwright test tests/todo-page.spec.ts
    # Run a set of test files

    # Run a set of test files
    npm playwright test tests/todo-page/ tests/landing-page/
    # Run files that have my-spec or my-spec-2 in the file name

    # Run files that have my-spec or my-spec-2 in the file name
    npm playwright test my-spec my-spec-2
    # Run the test with the title

    # Run the test with the title
    npm playwright test -g "add a todo item"
    # Run tests in headed browsers

    # Run tests in headed browsers
    npm playwright test --headed
    # Run tests in a particular browser (config-less mode)

    # Run tests in a particular browser (config-less mode)
    npm playwright test --browser=webkit

    # Run tests in all browsers (config-less mode)

    npm playwright test --browser=all

    # Disable parallelization

    npm playwright test --workers=1

    #Choose a reporter
    npm playwright test --reporter=dot

    # Run in debug mode with Playwright Inspector

    npm playwright test --debug

    # Ask for help
  2. boysbee created this gist Mar 4, 2022.
    39 changes: 39 additions & 0 deletions simple.comand.line.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,39 @@
    # Run all the tests
    npm playwright test

    # Run a single test file

    npm playwright test tests/todo-page.spec.ts
    # Run a set of test files

    npm playwright test tests/todo-page/ tests/landing-page/
    # Run files that have my-spec or my-spec-2 in the file name

    npm playwright test my-spec my-spec-2
    # Run the test with the title

    npm playwright test -g "add a todo item"
    # Run tests in headed browsers

    npm playwright test --headed
    # Run tests in a particular browser (config-less mode)

    npm playwright test --browser=webkit

    # Run tests in all browsers (config-less mode)

    npm playwright test --browser=all

    # Disable parallelization

    npm playwright test --workers=1

    #Choose a reporter
    npm playwright test --reporter=dot

    # Run in debug mode with Playwright Inspector

    npm playwright test --debug

    # Ask for help
    npm playwright test --help