Visual-testing: how can I assess the code coverage?

118 Views Asked by At

I would like to know if there is a way to assess code coverage doing visual testing ?

For instance it will be a formula like ...

CodeCoverage = NumberOfViewsGenerated / TotalViewsPossible

To be more clear, let's take the code at https://www.w3schools.com/css/tryit.asp?filename=trycss_dropdown_text

We have two possibles views

view1

view1

and view2

view2

If the visual testing process takes just view1 we should get a code coverage of 50%

I am using testcafe with Javascript/Typescript, and the frontend is generated using Vue.js

0

There are 0 best solutions below