Skip to content

Commit

Permalink
feat(roll): roll to ToT Playwright (12-09-23) (#1155)
Browse files Browse the repository at this point in the history
  • Loading branch information
playwrightmachine authored Sep 12, 2023
1 parent aaa0f62 commit b426cde
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 6 deletions.
9 changes: 5 additions & 4 deletions nodejs/docs/api/class-reporter.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -150,14 +150,15 @@ await reporter.onEnd(result);
- `result` [Object]<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="reporter-on-end-option-result"/><a href="#reporter-on-end-option-result" class="list-anchor">#</a>
- `status` "passed"|"failed"|"timedout"|"interrupted"


Test run status.
- `startTime` [Date]


Test run start wall time.
- `duration` [number]


Result of the full test run.
Test run duration in milliseconds.

Result of the full test run, `status` can be one of:
* `'passed'` - Everything went as expected.
* `'failed'` - Any test has failed.
* `'timedout'` - The [testConfig.globalTimeout](/api/class-testconfig.mdx#test-config-global-timeout) has been reached.
Expand Down
26 changes: 24 additions & 2 deletions nodejs/docs/intro.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import HTMLCard from '@site/src/components/HTMLCard';

## Introduction

Playwright Test was created specifically to accommodate the needs of end-to-end testing. Playwright supports all modern rendering engines including Chromium, WebKit, and Firefox. Test on Windows, Linux, and macOS, locally or on CI, headless or headed with native mobile emulation of Google Chrome for Android and Mobile Safari.

**You will learn**
Expand Down Expand Up @@ -78,14 +80,20 @@ By default tests will be run on all 3 browsers, chromium, firefox and webkit usi
npx playwright test
```

See our doc on [Running Tests](./running-tests.mdx) to learn more about running tests in headed mode, running multiple tests, running specific tests etc.
![tests running in command line](https://github.com/microsoft/playwright/assets/13063165/981c1b2b-dc7e-4b85-b241-272b44da6628) See our doc on [Running Tests](./running-tests.mdx) to learn more about running tests in headed mode, running multiple tests, running specific tests etc.

## Running the Example Test in UI Mode

Run your tests with [UI Mode](./test-ui-mode.mdx) for a better developer experience with time travel debugging, watch mode and more.

```bash
npx playwright test --ui
```

![UI Mode](https://github.com/microsoft/playwright/assets/13063165/c5b501cc-4f5d-485a-87cc-66044c651786)

Check out or [detailed guide on UI Mode](./test-ui-mode.mdx) to learn more about it's features.

## HTML Test Reports

Once your test has finished running a [HTML Reporter](./test-reporters.mdx#html-reporter) will have been created which shows you a full report of your tests allowing you to filter the report by browsers, passed tests, failed tests, skipped tests and flaky tests. You can click on each test and explore the test's errors as well as each step of the test. By default, the HTML report is opened automatically if some of the tests failed.
Expand All @@ -94,7 +102,21 @@ Once your test has finished running a [HTML Reporter](./test-reporters.mdx#html-
npx playwright show-report
```

<img width="1392" alt="HTML Reporter" src="https://user-images.githubusercontent.com/13063165/212743312-edf1e8ed-3fc2-48aa-9c93-24ae3e36504d.png" />
![HTML Report](https://github.com/microsoft/playwright/assets/13063165/38ec17a7-9e61-4002-b137-a93812765501)

## Updating Playwright

To update Playwright to the latest version run the following command:

```bash
npm install -D @playwright/test@latest
```

You can always check which version of Playwright you have by running the following command:

```bash
npx playwright --version
```

## System requirements
- Node.js 16+
Expand Down

0 comments on commit b426cde

Please sign in to comment.