Installation

您所在的位置:网站首页 秦岭山的作文400字 Installation

Installation

2024-07-02 10:25:22| 来源: 网络整理| 查看: 265

InstallationIntroduction​

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

How to install PlaywrightWhat's InstalledHow to run the example testHow to open the HTML test reportInstalling Playwright​

Get started by installing Playwright using npm or yarn. Alternatively you can also get started and run your tests using the VS Code Extension.

npmyarnpnpmnpm init playwright@latestyarn create playwrightpnpm create playwright

Run the install command and select the following to get started:

Choose between TypeScript or JavaScript (default is TypeScript)Name of your Tests folder (default is tests or e2e if you already have a tests folder in your project)Add a GitHub Actions workflow to easily run tests on CIInstall Playwright browsers (default is true)What's Installed​

Playwright will download the browsers needed as well as create the following files.

playwright.config.tspackage.jsonpackage-lock.jsontests/ example.spec.tstests-examples/ demo-todo-app.spec.ts

The playwright.config is where you can add configuration for Playwright including modifying which browsers you would like to run Playwright on. If you are running tests inside an already existing project then dependencies will be added directly to your package.json.

The tests folder contains a basic example test to help you get started with testing. For a more detailed example check out the tests-examples folder which contains tests written to test a todo app.

Running the Example Test​

By default tests will be run on all 3 browsers, chromium, firefox and webkit using 3 workers. This can be configured in the playwright.config file. Tests are run in headless mode meaning no browser will open up when running the tests. Results of the tests and test logs will be shown in the terminal.

npx playwright test

tests running in command line See our doc on Running Tests 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 for a better developer experience with time travel debugging, watch mode and more.

npx playwright test --ui

UI Mode

Check out or detailed guide on UI Mode to learn more about it's features.

HTML Test Reports​

Once your test has finished running a 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.

npx playwright show-report

HTML Report

Updating Playwright​

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

npm install -D @playwright/test@latest

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

npx playwright --versionSystem requirements​Node.js 16+Windows 10+, Windows Server 2016+ or Windows Subsystem for Linux (WSL).MacOS 12 Monterey or MacOS 13 Ventura.Debian 11, Debian 12, Ubuntu 20.04 or Ubuntu 22.04.What's next​Write tests using web first assertions, page fixtures and locatorsRun single test, multiple tests, headed modeGenerate tests with CodegenSee a trace of your tests


【本文地址】

公司简介

联系我们

今日新闻


点击排行

实验室常用的仪器、试剂和
说到实验室常用到的东西,主要就分为仪器、试剂和耗
不用再找了,全球10大实验
01、赛默飞世尔科技(热电)Thermo Fisher Scientif
三代水柜的量产巅峰T-72坦
作者:寞寒最近,西边闹腾挺大,本来小寞以为忙完这
通风柜跟实验室通风系统有
说到通风柜跟实验室通风,不少人都纠结二者到底是不
集消毒杀菌、烘干收纳为一
厨房是家里细菌较多的地方,潮湿的环境、没有完全密
实验室设备之全钢实验台如
全钢实验台是实验室家具中较为重要的家具之一,很多

推荐新闻


图片新闻

实验室药品柜的特性有哪些
实验室药品柜是实验室家具的重要组成部分之一,主要
小学科学实验中有哪些教学
计算机 计算器 一般 打孔器 打气筒 仪器车 显微镜
实验室各种仪器原理动图讲
1.紫外分光光谱UV分析原理:吸收紫外光能量,引起分
高中化学常见仪器及实验装
1、可加热仪器:2、计量仪器:(1)仪器A的名称:量
微生物操作主要设备和器具
今天盘点一下微生物操作主要设备和器具,别嫌我啰嗦
浅谈通风柜使用基本常识
 众所周知,通风柜功能中最主要的就是排气功能。在

专题文章

    CopyRight 2018-2019 实验室设备网 版权所有 win10的实时保护怎么永久关闭