digyrunner - playwright -js (英语)
怎样用?
npm install @digy4/digyrunner-playwright- 创建配置文件
digy-runner-config-web.js用于 DigyRunner 的
const digyRunnerConfig = {
env: {
PROJECT_NAME: "Playwright-js-starter",
TEAM_NAME: "TeamPlaywright",
SUITE_NAME: "WEB Regression",
APP_VERSION: "2.0",
ENVIRONMENT: "test",
FRAMEWORK: "playwright",
MODULE_NAME: "SomeModuleName",
TESTER: "Joe Bloggs",
BA: "Joe Bloggs",
DEVELOPER: "Joe Bloggs",
TEST_TYPE: "WEB",
LOB: "<Line of business name>",
APPLICATION: "<Application name>",
RELEASE: "<release version>",
RESULTS_SUMMARY_URL: `https://rcr0bssa51.execute-api.us-west-2.amazonaws.com/digykube-dev/v3/resultsSummary`,
RESULTS_URL: `https://rcr0bssa51.execute-api.us-west-2.amazonaws.com/digykube-dev/v3/results`,
PROJECT_PLAN_URL: `https://z85m9oisq5.execute-api.us-east-1.amazonaws.com/test/users/project-plan-details`,
CLIENT_ID: "<key>",
CLIENT_SECRET: "<secret>",
DIGY4_LOG_LEVEL: "ERROR|INFO|DEBUG"
},
};
module.exports = digyRunnerConfig;
-
在剧作家配置中包含配置文件
const digyRunnerConfig = require('./digy-runner-config-web'); -
在剧作家配置中添加 digyrunner 为记者
['@digy4/digyrunner-playwright/DigyReporter', digyRunnerConfig] -
可选导入 digyrunner “ test” 而非剧作家“ test” 直接导入
const test = require("@digy4/digyrunner-playwright/DigyWebTest");
测试大小写级别字段
用 Playwright 设定每个测试 说明。注释类型对大小写不敏感;如果一个类型出现不止一次(例如: describe 在测试中,最后一个获胜.
| 注释类型 | 结果领域 | 页:1 |
|---|---|---|
TestClassification | testClassification | |
TestDefinition | testDefinition | |
Priority | priority | |
ExecutionMode | executionMode | 默认为 Active_Execution |
Feature | requirementIds | 覆盖套房级别 REQUIREMENT_ID 编号 : FEATURE 此测试案例 |
test('Verify Book Store Login', {
tag: '@Smoke',
annotation: [
{ type: 'TestClassification', description: 'Positive' },
{ type: 'TestDefinition', description: 'Functional' },
{ type: 'Priority', description: 'High' },
{ type: 'Feature', description: 'FEAT-101' },
],
}, async ({ page }) => { ... });
在测试运行时也可以添加说明 :
test.info().annotations.push({ type: 'ExecutionMode', description: 'Active_Execution' });