Skip to content

Annotations Automation Practice

Practice Playwright test annotations — test.skip(), test.slow(), test.fixme(), test.fail(), test.step(), and test.each() — plus TestNG equivalents across realistic interactive scenarios.

Intermediate20 min6 scenarios14 test cases

Interactive Scenarios

S01Feature Flag Toggle (test.skip)
Environment:⚙ Staging
Dark Mode
Beta UI
Advanced Analytics
Toggle the Beta UI flag and check the panel
S02Slow Report Generation (test.slow)
Click Generate Report and wait for data to load
S03Buggy Counter (test.fixme)BUG-101
Buggy Counter⚠ BUG-101

Increments by 2 instead of 1. Use test.fixme('BUG-101').

0

Bug: +1 click adds 2. Decrement is correct.

Click + three times and observe the counter value
S04Flaky Action (test.fail)BUG-202
Flaky Action⚠ BUG-202

Succeeds ~50% of runs. Use test.fixme() or retries: 2.

Always Errorstest.fail()

Always returns an error. test.fail() confirms the bug — test "passes" if it fails.

Click the flaky button — result is non-deterministic
S05Checkout Stepper (test.step)
ProductQtyUnit Price
Wireless Headphones$149.99
USB-C Hub$39.99

Total: $229.97

Complete all 3 checkout steps to place an order
S06Data-Driven Login (test.each / @DataProvider)
Login result will appear here…

Test Data — Valid Credentials:

RoleEmailPasswordExpects
Admin[email protected]admin123Full dashboard
Editor[email protected]editor123Edit panel only
Viewer[email protected]viewer123Read-only view
Invalid[email protected]wrongError message
Login with any credential from the table below