We have a sophisticated web application that uses a lot of JavaScript along with an XMPP and a Rails application. This has come to the point that we need to test the entire system from end to end. We must be able to guarantee that various tasks can be performed without errors, one of these tasks will be to discuss a 1 on 1 chat session with the other side in the system. Since all the tasks of our application allow the user to interact with the user, we would like to be able to simulate this while controlling two browsers that exchange data through a web application. I was thinking about using selenium or watir and their wait functions waited for certain things to happen. For instance:
- open 2 browsers on our website
- browser 1 expects the question to be published.
- browser 2 publishes the question and then expects the offer to be received.
- browser 1 sees the question, sends the offer and waits for it to be accepted
- browser 2 sees the offer and accepts it, and then waits for the chat session to begin.
- etc...
I see that such testing is becoming quite difficult to write and maintain. It will rely on the specific elements of the page, so if they are changed, the tests will need to be changed. Also, if we change the flow of the application even a little, the costume will probably need to be changed quite a lot.
So my question is: has anyone done such testing? If so, what tools would you suggest using and do you have any tips for writing tests?
, , CI, Sauce Labs CI.