Open source library to create browser tests 10x faster
source link: https://github.com/qawolf/qawolf
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
QA Wolf
Create browser tests 10x faster
Free and open source library to create Playwright / Jest browser tests and run them in CI
:rocket: Get Started | :book: API | :wave: Chat | ️ Roadmap
️ Install
Set up your project for browser tests:
cd /my/awesome/project npm init qawolf # or yarn create qawolf
Configure your test directory and CI provider:
? rootDir: Directory to create tests in (.qawolf) ? Choose CI Provider (Use arrow keys) Azure DevOps Bitbucket Pipelines CircleCI ❯ GitHub Actions GitLab CI/CD Jenkins Skip CI setup
This will install qawolf
, jest
and playwright
as dev dependencies and create a CI workflow file to:
- :racehorse: Run tests in parallel
- :video_camera: Record a video of each test
- :page_facing_up: Capture browser logs
:art: Create a test
npx qawolf create url [name]
:muscle: Convert your actions into Playwright code:
Action Status Example Click :white_check_mark:page.click(selectors['0_submit'])
Type
:white_check_mark:
page.type(selectors['0_username'], 'username')
Scroll
:white_check_mark:
qawolf.scroll(page, 'html', { x: 0, y: 200 })
Select
:white_check_mark:
page.selectOption(selectors['0_ice_cream'], 'chocolate')
Replace text
:white_check_mark:
page.fill(selectors['0_username'], 'username')
Paste
:white_check_mark:
page.type(selectors['password'], 'pasted')
Use a test attribute
:white_check_mark:
page.click("[data-qa='submit']")
Use a test attribute on an ancestor
:white_check_mark:
page.click("[data-qa='radio'] [value='cat']")
Use multiple pages/tabs
:white_check_mark:
qawolf.waitForPage(page.context(), 1)
Iframes
️
Coming soon
Drag and drop
️
Coming soon
File upload
️
Coming soon
Back button
️
Coming soon
As your test is created:
- :pencil2: Edit the code as you like
- ️ Use the REPL to try out commands
:white_check_mark: Run your tests
On Chromium:
npx qawolf test [name]
On Firefox:
npx qawolf test --firefox [name]
On Webkit:
npx qawolf test --webkit [name]
On all browsers:
npx qawolf test --all-browsers [name]
:raising_hand: Get help
We want QA Wolf to work for you, so please reach out to get help!
If you have a feature request or feedback, please open an issue or chat with us .
:memo: License
QA Wolf is licensed under BSD-3-Clause .
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK