Course Hive
Search

Welcome

Sign in or create your account

Continue with Google
or
Playwright Beginner Tutorial 12 | Annotation & Tags
Play lesson

Playwright Beginner Tutorials - Playwright Beginner Tutorial 12 | Annotation & Tags

4.0 (1)
16 learners

What you'll learn

This course includes

  • 6.5 hours of video
  • Certificate of completion
  • Access on mobile and TV

Summary

Keywords

Full Transcript

*ALL FREE COURSES* ► https://automationstepbystep.com/ *ASK RAGHAV* ► https://bit.ly/2CoJGWf 00:00 *Intro* 00:32 *What are Annotations & Tags* How to use Annotations & Tags in Playwright Step by Step hands-on demo Hooks: beforeAll beforeEach afterAll afterEach Groups: describe Annotations: only skip skip with condition fail fixme slow Tags: @smoke @reg 03:09 *will skip the test* test.skip('skip this test', async ({ page }) => { // This test will be skipped }); 05:20 *will mark test as failure* will show error if the test does not fail test('not yet ready', async ({ page }) => { test.fail(); }); 06:39 *test will be aborted* test.fixme('test to be fixed', async ({ page }) => { }); 07:36 *marks the test as slow and triples the test timeout* test('slow test', async ({ page }) => { test.slow(); }); 08:21 *runs specific tests* test.only('focus this test', async ({ page }) => { // Run only focused tests in the entire project }); 10:28 *Tags* You can tag your tests with tags like @smoke @sanity @fast @slow and only run the tests that have the certain tag test('Test full report @smoke, async ({ page }) => { // ... }); npx playwright test --grep “@smoke” Opposite of grep Skip tests with certain tag npx playwright test --grep-invert “@smoke” 13:54 *What are Annotations* Annotations are keywords that contain some logical or conditional functionalities Can be used with test blocks to control execution of tests as needed E.g. only, fail, fix, slow We can apply annotations to a single test or a set of tests STORIES BY RAGHAV ► https://automationstepbystep.com/stories/ ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ Every LIKE & SUBSCRIPTION gives me great motivation to keep working for you You can support my mission for education by sharing this knowledge and helping as many people as you can If my work has helped you, consider helping any animal near you, in any way you can *NEVER STOP LEARNING* Raghav Pal

Course Hive

Continue this lesson in the app

Install CourseHive on Android or iOS to keep learning while you move.

Related Courses

FAQs

Course Hive
Download CourseHive
Keep learning anywhere