Puppetry 3: automated testing without a single line of code

I think it makes no sense to convince anyone of the value of automated testing. However, functional tests are often extremely difficult to write and even more supportive. There are many solutions designed to simplify test development. I want to talk about one of them - Puppetry. This is a desktop application (Windows / Linux / Mac), which is essentially a test designer without the need to write any code. The QA engineer can simply record the user script in the built-in browser, extend the generated tests with browser commands and test statements, configure the structure and run the tests for execution. Puppetry translates the test specification from a human-readable format (Gherkin) into the Jest / Puppeteer project. Then he starts the project and shows the report. In essence, such a project can be included in the chain of continuous integration "as is"



Test suite



Test report







Basically, Puppetry can be thought of as a graphical interface for the Puppeteer (Chromium API) with 60+ visualized commands and test statements that are designed to make test development as simple as possible. For example, in Puppetry, you can simply indicate "I am claiming that the FOO element is currently located above the BAR." This will be converted to program code that calculates the styles of both elements and compares them.



Testing item position



Someone probably thought now: "just a toy, suitable only for the simplest tests." In fact, with Puppetry you can implement quite serious test strategies, including dynamic content testing, performance budgeting, CSS regression testing, testing Chrome extensions, web components, and even Google Analytics interaction code.



CSS regression testing - report



Google Analytics Testing



In real life, functional tests are sometimes difficult to debug. Modern web applications are very dynamic. The content of the pages changes in response to user actions. We must constantly remember when addressing the page element that at the time of the request it may still be available or already deleted. Puppetry allows you to set breakpoints, as well as run tests interactively. In both cases, the program stops at a problem point, allowing you to examine the page in a browser and even launch DevTools and check the status of the DOM.



Of course, everyone has their own opinion and preferences, however, it still makes sense to try Puppetry. This is the case when creating automated tests is really fun. You can just rate it on the video youtu.be/dfuNhTCRMRg



Download link github.com/dsheiko/puppetry/releases

Official site puppetry.app



All Articles