English 中文(简体)
游乐——在包裹内区别游戏权检验。 json and npx mewright test?
原标题:Playwright - What s the difference between playwright test within package.json and npx playwright test ?

I m just getting started with Playwright but I m getting confused between the cli commands used to run tests, e.g. npx playwright test and commands that you add to your package.json, for example...

{
  "scripts": {
    "pretest": "tsc --incremental -p tests/tsconfig.json",
    "test": "playwright test -c tests-out"
  }
}

我知道,我可以在这里操作<代码>npm test,但为什么这项工作在文字中进行,而不是在我简单操作<代码>时,在终点站进行权宜测试――c-out? 我刚刚获得<代码>。 不明指挥:“权”

<代码>npx 操守测试的指令和wright test之间的关系如何?

另外,为什么<代码>-c指的是此处的输出目录,而现在的目录是<代码>npxwright test,这是指一个组合文件?

我请求的理由是,在打字器项目中,我正在对以下文字进行界定......

"e2e-playwright-build": "cd apps/playwright-e2e && tsc",
"e2e-playwright": "npm run e2e-playwright-build && cd apps/playwright-e2e/src/tests && playwright test -c tests-out --config=../../tests-out/apps/playwright-e2e/src/tests/configs/playwright.config.js --grep-invert "@example|@visual|@access|@failfast"",

这些指挥对我的要求过于宽泛,但我想根据我自己的指挥进行具体测试,然而,在我试图操作<条码>npx 操控<>时。 我刚刚到来。

Unexpected current working directory - C:Tribal	ribal.edge.uimodule	ribal.edge.uiappsplaywright-e2e	ests-out

还有一些错误。 我的双管齐下的结构如下......

├── apps
│   ├── playwright-e2e
│      ├── src
├── node_modules
├── package.json
├── package-lock.json 
└── .gitignore
问题回答

首先。 如果你不违约就通过座标,就会试图在目前根基目录中查找集束文档。

当你试图用“npx游戏权测试”从终点站进行测试时,你需要适当的倍数。 这些夹的根基必须包含“游戏权,混凝土”或“游戏权”,取决于你们是否汇编到js(我看到你是用“茨克”做的)。 此外,还需要有分数文件。

From documentation -c or --config : Configuration file. If not passed, defaults to playwright.config.ts or playwright.config.js in the current directory.

See more on: https://playwright.dev/docs/test-cli

国家预防机制被用作一揽子管理人员,而国家警察X则用于执行 Java文包。





相关问题
How do I set the page viewport size using Scrapy Playwight?

I didn t find any satisfactory answer about this. All I want is just set the viewport to 1080*19200 (yes, 1920 * 10) before the request to simulate a screen of that size. Is this even possible using ...

How to get test result in fixture

is it possible to get test result in Playwright fixture? See the sample code below, how to access test result(passed/failed/skipped) after await use(todoPage); in testFixture? It would help me decide ...

热门标签