I'm working on a single page app and looking into automated testing of the application.
- All data communication between server and client app is JSON over xmlHttpRequest
- In most cases it will post a JSON string and receive a JSON string to for example mydoman.tld/something.ashx (and some times with a query string)
- For some of the functionality there will be use of web sockets.
I've been looking into examples of unit testing and most of them is very simple (1+1 = 2...etc). I can't really translate these simple examples into something more advanced, like in this case where it's a lot of things to take into account, such as:
- Roles of the user
- Configuration for the user
- Configuration for the customer (one customer has many users)