如何在 Ruby on Rails 中测试聊天应用程序?

发布于 2024-08-04 14:36:03 字数 303 浏览 5 评论 0原文

实施聊天应用程序集成测试的最佳方法是什么?

问题是我不知道如何在不存根和模拟所有内容的情况下实现两个用户行为。

您将如何实施这些步骤?

Given I have two users "joe" and "bob" logged in
When "joe" send "Hello!" message to "bob"
Then "bob" should see "Hello!"

使用 Cucumber 测试 Ajaxy 应用程序的最佳方法是什么?

如何测试两个用户同时登录?

What would be the best way to implement integration test for chat application?

The problem is that I don't know how to implement two user behavior without stubbing and mocking everything.

How would you implement these steps?

Given I have two users "joe" and "bob" logged in
When "joe" send "Hello!" message to "bob"
Then "bob" should see "Hello!"

What is the best way to test Ajaxy application with Cucumber?

How to test two users logged in at the same time?

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

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

发布评论

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

评论(2

黑寡妇 2024-08-11 14:36:03

如果您想真正以这种方式测试 JS,您将需要使用真实的浏览器进程来运行这些测试。

看看 http://seleniumhq.org/https://github.com/brynary/webrat/wiki/selenium

If you want to really test JS that way you are going to need to run these tests with a real browser process.

Have a look at http://seleniumhq.org/ and https://github.com/brynary/webrat/wiki/selenium

蓝天白云 2024-08-11 14:36:03

TestPlan 还可以做 JS Web 测试,可以同时运行多个浏览器。这需要一些工作,但您可以模拟多个用户之间的聊天会话。

TestPlan can also do JS web testing and can run multiple browsers at the same time. It's a bit of work but you can simulate a chat session between multiple users.

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