Playwright Tutorial | Fixtures over BeforeEach / AfterEach hooks

Описание к видео Playwright Tutorial | Fixtures over BeforeEach / AfterEach hooks

#playwright #typescript #javascript #tutorial #automation #testing #coding #selenium #cypress
playwright, playwright tutorial, playwright testing

===============================================================================

Chapters

00:00 - Introduction
00:31 - Recap of BeforeEach and AfterEach hooks video
03:01 - Recap of Fixtures video
05:12 - Using Fixture over hooks
16:34 - Advantages for Fixture over before/ after hooks
21:53 - Recap
================================================================================

Playwright with TypeScript Series -    • Playwright Tutorials with TypeScript ...  
Playwright Notes - https://docs.google.com/document/d/e/...
Hooks Video -    • Playwright Tutorial | Hooks (beforeEa...  
Understanding of Custom Fixtures Video -    • Playwright Tutorial | Understanding o...  
Page Object Modle in Playwright -    • Playwright Tutorial | Page Object Mod...  
POM with Fixtures Video -    • Playwright Tutorial | Page Object Mod...  


============================================================================================================

Video 24 - Playwright with TypeScript | Fixtures over BeforeEach / AfterEach hooks

beforeEach hook that is executed before each test.
afterEach hook that is executed after each test.

Fixtures have a number of advantages over before/after hooks:
Fixtures encapsulate setup and teardown in the same place so it is easier to write.
Fixtures are reusable between test files - you can define them once and use them in all your tests. That's how Playwright's built-in page fixture works.
Fixtures are on-demand - you can define as many fixtures as you'd like, and Playwright Test will setup only the ones needed by your test and nothing else.
Fixtures are composable - they can depend on each other to provide complex behaviours.
Fixtures are flexible. Tests can use any combination of the fixtures to tailor the precise environment they need, without affecting other tests.
Fixtures simplify grouping. You no longer need to wrap tests in describes that set up environment, and are free to group your tests by their meaning instead.

==================================================================================

Комментарии

Информация по комментариям в разработке