视觉测试:如何评估代码覆盖范围?

发布于 2025-02-12 21:31:28 字数 987 浏览 2 评论 0原文

我想知道是否有一种方法可以评估进行视觉测试的代码覆盖范围?

例如,它将是一个公式,例如...

CodeCoverage = NumberOfViewsGenerated / TotalViewsPossible

更明确, 让我们以 https://www.w3schools.com/css/tryit.asp?filename = trycss_dropdown_text

我们有两个可能的视图

view> view> view> view>

“

view2

“

如果视觉测试过程只需 view1 ,我们应该得到 code 50%的覆盖范围

我正在使用JavaScript/Typescript的TestCafe,并且使用vue.js生成前端

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文