Udemy Playwright: Web Automation Testing From Zero to Hero: Difference between revisions

Jump to navigation Jump to search
m
Line 1,512: Line 1,512:


=== Parallel Execution ===
=== Parallel Execution ===
* worker per <code>*.spec.ts</code> file
* inside <code>*.spec.ts</code> files test cases are execute sequentially
In file <code>playwright.config.ts</code>
<nowiki>
fullyParallel: false,
workers: process.env.CI ? 1 : undefined,
</nowiki>
* <code>fullyParallel</code> is used to guide within a spec file
* undefined workers allows playwright to decide, usually one per spec file
Can override config values inside <code>*.spec.ts</code> files
<nowiki>
test.describe.configure({mode:'parallel'}) // spec file root level
...
test.describe.parallel("Forms Layouts page", () => { // in test suite
...
})</nowiki>
=== Screenshots and Videos ===
=== Screenshots and Videos ===
=== Environment Variables ===
=== Environment Variables ===

Navigation menu