The setup of the visual testing framework in KDS has been carried out successfully. But the current way of doing snapshots involves a lot of boilerplate code, which makes the visual tests complex to write, complex to read, and the maintainability of the code is low. Example of the current behaviour:
So there are a lot of things that we can abstract:
Avoid developers having to make a huge wrap of the current unit tests with an if(canTakeSnapshot()).
Find a cleaner way to select the tests that will be executed when we are running visual tests and unit tests.
Avoid developers from having to write and know about the page.goto() method and any other boilerplate code, and abstract it so that it is done automatically when we want to run a visual test.
Abstract the writing of the renderComponent function in all test suites.
The Value Add
This will allow for much easier, faster and more maintainable development of visual tests. And it will contribute a lot to developers easily adopting this pattern.
Product
KDS.
Description
The setup of the visual testing framework in KDS has been carried out successfully. But the current way of doing snapshots involves a lot of boilerplate code, which makes the visual tests complex to write, complex to read, and the maintainability of the code is low. Example of the current behaviour:
So there are a lot of things that we can abstract:
if(canTakeSnapshot())
.page.goto()
method and any other boilerplate code, and abstract it so that it is done automatically when we want to run a visual test.The Value Add
This will allow for much easier, faster and more maintainable development of visual tests. And it will contribute a lot to developers easily adopting this pattern.