Possibility of integration with Taiko
Opened this issue · 2 comments
Hello!
We have a project already fully developed using Taiko framework but we want to introduce BackstopJS and visual automation to it.
We were wondering about the possibility of integrating BackstopJS not only to Playwright and Puppeteer but also Taiko (all those frameworks are JS based and similar)
https://taiko.dev/
https://github.com/getgauge/taiko
So the question would be:
- Is it possible at all?
- Where to start, could I get a contact of some sort, to get a guidance?
Hi @SzajJolanta, sure. Depending on how Taiko is built, it could be straight forward to do the integration. There is a single file in backstop for each automation driver (e.g. playwright, puppeteer), for example...
runPlaywright.js
takes a single backstop scenario, passes it to the driver (playwright in this case) and waits for the driver to complete a setup and screen capture. e.g. here is the entrypoint...
BackstopJS/core/util/runPlaywright.js
Lines 46 to 62 in f0651dc
Individual driver flows are called by createBitmaps.js, here is the switch statement...
BackstopJS/core/util/createBitmaps.js
Lines 132 to 155 in f0651dc
So, that is pretty much the Backstop-related surface area you need to be concerned with. And you'd also want to update the docs and runtime-boilerplate code of course.
I am not familiar with Taiko, so, I would want to see some decent flow compatibility with Backstop in general -- since it will add complexity, I would like to know what benefits Taiko would bring to justify the enhancement -- ideally, I would expect a vanilla/default implementation to behave the same across all drivers with the differences being more in the advanced features or performance curves etc.
I don't have a lot of time to put into the project at this point -- but if you want to put in the effort to build an integration I am happy to consult occasionally on zoom or teams to answer questions and help in ways that I can. I would ask that you have other engineers review and approve your contributions and that you own any related issues that come in from the community.
Cheers.
Hello!
Thank you for your fast reply, it was very helpful.
We are consulting the possibilities within the team and will let you know on the progress.
Jola