How to test chat application in Ruby on Rails?
-
07-07-2019 - |
Question
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?
Solution
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 http://wiki.github.com/brynary/webrat/selenium
OTHER TIPS
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.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow