Exercises for training tests mocking.
All exercises have detailed descriptions available after signing here: https://jaktestowac.pl/mockowanie/ You will get link to recording of webinar, presentation and tips (in Polish language).
Information how to get tested app is located in page available after registering here https://jaktestowac.pl/mockowanie/
Node.jsVisual Studio Code- extensions for VSC (after installing project it should be suggested for installation):
Prettier - Code formatter- for formattingPlaywright Test for VSCode- for easy Playwright test runningGitLens- for commits handlingCode Spell Checker- for highlighting spelling mistakes
Download this repository and open it main folder, then:
-
Install packages:
npm i -
Install Playwright browsers:
npx playwright install -
Configure
playwright.config.json- Set baseURL to your app main url.
- Set timeout to desired value (current 6s can be to short)
There are few ways of test running:
- Navigate to folder with given exercise an simply run test by pressing green arrow
- Open
Testingtab located in left menu (flask icon), unfold all tests and choose one or as many as you want to be run. If test not appears, refresh tab or checkplaywright.config.tsif you have everything set properly withprojectssection. - Run npm scripts by copy pasting scripts form
package.jsonformscriptssection. - Use VSC npm script run section:
- in
Explorertab menu checkNPM Scripts - in very bottom of Explorer tab you will find section
NPM SCRIPTS - choose script you want to run
- in
Just run script form package.json:
npm run test:ui
Recommended option is running this script in separate console.
- there are two main folder for tests and you can compare implementation with or without mocking
- broke test and try to find problem in report
- some tests are designed to fail and those tests contains tag
@failin name - if tests fail without clear reason:
- check if tested app is up and running,
- check timeout in playwright.config.ts (on slow machines it need to be increased)
Feel free to reach out to us:
- 🌐 Website: jaktestowac.pl
- 💼 LinkedIn: jaktestowac.pl
- 💬 Discord: Polish Playwright Community
- 📧 Support: Check our website for contact details
We have gathered a collection of resources to help you learn and master Playwright, both in Polish and English. Whether you're a beginner or an advanced user, these resources will help you enhance your skills and knowledge.
- JavaScript and TypeScript for Testers - Comprehensive (13h+) course on JavaScript and TypeScript for testers, with practical examples and exercises
- Professional Test Automation with Playwright - Comprehensive (100h+) course on Playwright, test automation, CI/CD and test architecture
- Back-end Test Automation - Comprehensive (45h+) course on Back-end Test Automation with Postman, Mocha, Chai, and Supertest
- Free Playwright Resources - Comprehensive and Free Polish learning materials
- Playwright Basics - YouTube series (Polish)
- Playwright Elements - Advanced concepts (Polish)
- Playwright MCP - MCP course (Polish)
- Discord Community - First Polish Playwright community!
- Playwright Info - first and only Polish Playwright blog
- VS Code Extensions - Our free Playwright plugins
- Playwright Documentation - Official documentation
- Playwright GitHub - Source code and issues
PS. For more resources and updates, follow us on our website and GitHub.
Happy testing and automation! 🚀
jaktestowac.pl Team ❤️💚
PS. For more resources and updates, follow us on our website and GitHub.
Built with ❤️💚 for the Playwright and test automation community