I have a pretty . It has things like Facebook login, online ordering via credit card, as well as user profiles, image uploads, services offered, real-time chat, etc. It also has real-time updating via Websockets. The app is made up of 108 custom elements, written in about 13000 lines of code client side and 40000 lines of code server side. The vast majority of the custom elements interact with the server.

At this point, I have several “levels” of testing:

  • Testing the server calls. This is the easy part: I just use Mocha and Chai, and test the end-point of the app as it is.

  • Testing the basic web components. Again, Polymer has a very established testing framework (using ); elements are normally tested using sinon, which will simulate network responses etc. Again, this is a non-issue

  • Testing of the actual app. This is the tricky part: is the online app actually working? For example, it’s all fun games, but for the chat to work, you need two different browsers going at the same time, and you need the web-socket connection to be established. You also need to break out of the “testing simulating network connection” mentality, and actually run the as a full interaction of the user, from chatting to people to receiving an offer from one of those people, to accepting that offer and paying.

This very last point is the sticky one: does it actually make sense to do it? Are there any examples out there of doing it? Or, is all testing really relegated to simulated network responses?

Source link https://sqa.stackexchange.com/questions/31528/-tests-for-a-complex-polymer--single-page-application


Please enter your comment!
Please enter your name here