我应该使用 Selenium 作为预订引擎吗?

发布于 2024-08-21 07:30:59 字数 486 浏览 5 评论 0原文

我们将开发一个预订引擎,一个 4-5 步的结帐流程,用于预订酒店房间,其中涉及很多复杂性。类似于 这个。

有人用 Selenium 来做这样的事情吗?我可以进行哪些类型的测试?我可以设置像 Selenium 这样的东西来完成从第 1 步到最后一步的整个过程,确保房间可用、东西可预订吗?我可以测试诸如确保数据已会话化之类的东西,对吗?

We'll be developing a booking engine, a 4-5 step checkout process for reserving rooms with a hotel where there's a lot of complexity involved. Something similar to this.

Has anyone used Selenium for something like this? What kind of tests would I be able to do? Could I set something like Selenium to go through the entire process of step 1 to the last step, making sure rooms are available, things are bookable? I could test stuff like making sure data is sessionized, right?

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

情徒 2024-08-28 07:30:59

单元测试意味着单独测试代码中的各个组件(例如函数、类或方法)。之后,进行功能测试和集成测试,测试组件之间的交互,最后是自动化 UI 测试,这就是 Selenium 的用武之地。这些是最脆弱的测试,绝对不应该是首先要做的事情。在构建新系统时您的想法。

Unit testing means testing individual components in your code in isolation (eg., a function, class or method). After that, there's functional and integration testing which tests the interaction between components, and finally automated UI testing which is where selenium comes in. These are the most brittle tests, and should definitely not be the first thing on your mind when it comes to architecturing a new system.

你又不是我 2024-08-28 07:30:59

Selenium 并不算真正的单元测试;这是集成测试

对于 PHP 中的单元测试,PHPUnit 似乎是可以使用的工具。

Selenium doesn't really count as unit testing; it's integration testing.

For unit testing in PHP, PHPUnit seems to be the tool to use.

梦醒灬来后我 2024-08-28 07:30:59

Selenium 也非常适合功能测试。它允许您进行大型集成测试并检查您期望用户能够执行的功能是否存在。

Selenium 应该仅用于检查用户期望的工作流程和功能是否仍然存在。

Selenium is a great too for functional testing. It allows you to do large integrated tests and check that the functionality that you are expecting the user to be able to do is there.

Selenium should only be used to check that the workflow and functionality the user expects is still there.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文