@digy4/digyrunner-playwright

中文文档
0.0.148发布于 2026/10/16CommonJS近 30 天下载 2626

DigyRunner for playwright

原始使用文档

digyrunner-playwright-js

How to use?

  • npm install @digy4/digyrunner-playwright
  • Create a config file digy-runner-config-web.js for 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;
  • Include the config file in the playwright config

    const digyRunnerConfig = require('./digy-runner-config-web');

  • Add digyrunner as a reporter in the playwright config

    ['@digy4/digyrunner-playwright/DigyReporter', digyRunnerConfig]

  • Optionally import digyrunner "test" instead of playwright "test" directly

    const test = require("@digy4/digyrunner-playwright/DigyWebTest");

Test case level fields

Set these per test with Playwright annotations. Annotation types are case-insensitive; if a type appears more than once (e.g. on a describe block and on the test), the last one wins.

Annotation typeResult fieldNotes
TestClassificationtestClassification
TestDefinitiontestDefinition
Prioritypriority
ExecutionModeexecutionModeDefaults to Active_Execution
FeaturerequirementIdsOverrides the suite level REQUIREMENT_ID / FEATURE for this test case
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 }) => { ... });

Annotations can also be added while the test runs:

test.info().annotations.push({ type: 'ExecutionMode', description: 'Active_Execution' });

版本与发布记录

@digy4/digyrunner-playwright 共发布 155 个版本,首次发布于 2023/04/07;过去 12 个月发布了 11 个版本。

版本发布日期距今
0.0.148latest2026/10/1627 天前
0.0.1472026/09/151 个月前
0.0.1462026/09/151 个月前
0.0.1452026/09/151 个月前
0.0.1442026/08/232 个月前
0.0.1432026/08/013 个月前

关于 @digy4/digyrunner-playwright 的常见问题

@digy4/digyrunner-playwright 是什么?

DigyRunner for playwright

如何安装 @digy4/digyrunner-playwright?

在项目目录运行 npm install @digy4/digyrunner-playwright,或使用 pnpm add / yarn add / bun add。

@digy4/digyrunner-playwright 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/digy4__digyrunner-playwright 是否存在。

@digy4/digyrunner-playwright 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@digy4/digyrunner-playwright 可以商用吗?

@digy4/digyrunner-playwright 使用 未声明 许可。package.json 没有声明许可证。没有许可证的代码默认保留全部权利,商用前请联系作者或查看仓库中的 LICENSE 文件。以上为概括,不构成法律意见,请以许可原文为准。

@digy4/digyrunner-playwright 的下载量有多少?

根据 npm 官方下载统计,@digy4/digyrunner-playwright 在 2026/10/12 – 2026/11/10 这 30 天内被下载 2,626 次,日均约 88 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@digy4/digyrunner-playwright 还在维护吗?

最新版本 0.0.148 发布于 2026/10/16(27 天前);至今共发布 155 个版本,其中过去 12 个月发布了 11 个;首次发布于 2023/04/07。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。