Tags and Annotations in Playwright
Playwright supports tags and annotations which are quite useful for test runs and reports. Playwright has few built in annotations and also you can use your own tags and annotations.You can apply these tags and annotations on a single test or group of tests. Based on tags and annotations are added user can run tests based on Tags added and can see annotations in test reports.
I have created a below YouTube playwright tutorial video in the "software testing tips and tricks" channel where I have explained -
1. What are tags in playwright?
2. different types of tags in playwright?
3. How to use tags in code with typescript with playwright?
4. How to run tests using grep command? how one can configure it with CICD pipeline using Jenkins?
5. What are annotations in Playwright?
6. Different types of annotations.
7. How to use playwright annotations in code and get those in the reports?
Tags in Playwright
You can use this tag in group level as well. To run tests with the specific tag you can use Grep command
"npx playwright test --grep @fast"
Annotations in Playwright
test. only - runs only that test
test.fixme - skips that test but adds fixme in report
test.fail - Marks test as failing test and it should be fail. if it doesn't fail playwright will give the warning
test.slow - marks test as slow, and gives three times more waiting time
All Playwright Tutorial Posts -
- Setup NodeJS playwright and run the first script
- Learn basic automation with Playwright - with code
- Expect and Auto-waits in Playwright
- How to debug the playwright script?
- How to compare screenshots using Playwright?
- Best Practices with Playwright automation
- Playwright Tutorial - Handle Multiple Tabs with Playwright
- automate downloads using Playwright?
- Automate file upload using Playwright
- Different types of waits in the Playwright Automate REST APIs using Playwright and Typescript - explained with live coding
No comments