如何测试 Selenium 测试脚本?或者我应该?
我正在从事一个具有相当大的测试套件(大约 800 个场景)的项目。我们的代码增长了很多,现在我正在寻找方法来测试我们的测试库的某些部分。您是否测试过您的 selenium 脚本(部分)?你做得怎么样?我想过仅使用一些示例页面进行这些测试,但看起来工作量很大,不是吗?
我知道我可以模拟 WebDriver
,但白盒测试似乎不太适合我。也许我还没有正确掌握所有模拟概念。有任何疑虑或提示吗?
I'm working in a project with a quite large suite of tests (about 800 scenarios). Our code grew quite a lot and now I'm looking for ways to test some parts of our test library. Have you ever tested (parts of) your selenium scripts? How are you doing it? I thought about using some sample pages only for these tests, but it looks like a lot of work, doesn't it?
I know I can mock WebDriver
, but white box testing doesn't seem quite right for me. Perhaps I have not yet grasped all the mock concepts properly. Any concerns or tips?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是一种思想流派。
我不建议使用自动化测试(如单元测试或验收测试框架)来测试您的硒测试。这似乎是不必要的测试自动化层。
Here's one school of thought..
I would not recommend having automated tests (like a unit testing or acceptence testing framework) test your selenium tests. It seems like an unnecessary layer of test automation.