Skip to content

Latest commit

 

History

History
13 lines (8 loc) · 956 Bytes

CustomizeFrameworkSetup.md

File metadata and controls

13 lines (8 loc) · 956 Bytes

Customize Framework Setup

  1. global-setup.ts: This file contains the global setup function that is executed once before all test files. It is typically used for setting up global states such as database connections or configuring the test environment like setting environment variables.

  2. global-teardown.ts: This file contains the global teardown function that is executed once after all test files. It is typically used for cleaning up the global states such as closing database connections or resetting the test environment.

  3. page-setup.ts: This file contains the setup function for the Page object from Playwright. It is used for setting up the page before each test. This is where you can add any common setup code that should run before each test across all spec files.

    This import statement in every spec file is responsible for setting up the page before each test.

    import { test } from '@pagesetup';