Test case of mixing the best of the three words together:
- Playwright - as the most advanced end-to-end browser automation
- Jest - the bellowed test runner
- BDD - principles of testing that helps you to look at the code from the right side
So there we are. We want to mix them together with goals:
- To run that together with minimal configuration
- To test advanced Gherkin features like
outline data
,tags
- To try if it can run in parallel mode
It works fine. Lets overview the goals:
- We have a simple web service with single API and one page. It is written in typescript and includes some small configurations for
Babel
,Jest
,Cucumber
(BDD runner) andTypescript
. There is also apage model
- a simple abstraction over pagess that allows us to make step definitions more straight forward. - The feature file syntax called
Gherkin
is fully supported. I have configured single tag@excluded
to skip some features/steps and tried outline data tables. There are three packages that helps us to integrateJest
withCucumber
(the BDD Runner) - the famous one jest-cucumber (261 stars for now:grin:), gherkin-jest (34:star:) and jest-cucumber-fusion with 3 ⭐ (one from me). The last one looked most simple. It allows to use feature files with minimal effort. So I have used that without any trouble at all. - Yes, it works in parallell according Jest settings. It can't of course split
outline feature files
loops into threads or thescenarios
from asingle feature file
(pitty).
Have nice testing
Tom