Turn your manual testers into automation experts! Request a DemoStart testRigor Free

How to Test WebSockets or XMPP App

Imagine you have a WebSockets or XMPP app that would require you to test that messages sent by User 1 get to User 2 instantaneously. How do you do that?

To properly end-to-end test this scenario you would need to emulate the actual situation. I.e. have 2 devices or browsers running 2 different users at the same time. Sounds like a challenge? Not for testRigor. In testRigor it is trivial to kick off an additional browser or device from the test code with just this command:

start browser "User 2" and switch

Overall, the full test for this specific scenario might look like this:

tap "Messages"
start device "User 2" and switch
save value stored value "username2" as "username"
save value stored value "password2" as "password"
tap "Messages"
tap "Send message to User 1"
generate by regex "[A-Z][a-z]{30}", then enter into "Message" and save as "message"
tap "Send"
switch to device "default"
validate that screen contains stored value "message"

As you can see above the message being sent is also unique to avoid false-positives from previous tests.

That is it. It is as simple as that. And I bet you understood what the code above is doing even though you never used testRigor before 🙂

BTW, testRigor has a free trial that you can request right now:

Related Articles

The 9 Leading Android Emulators for PCs in 2024

You can find over 3 million apps on the Google Play Store as of 2024, with a selection of Android apps offering different ...

Test Automation Tool For Manual Testers

When skilled testers use their expertise to ensure software quality without using any programming test script, that testing may ...