Typemock’s Gil Zilberfeld recently wrote an article on “The Difference between Unit Testing and Integration Testing” for Sys-Con.First things first:What is a unit test?A unit test is: Repeatable: You can rerun the same test as many times as you want.
This pro tip will guide you through the steps of implementing an end to end test using CasperJS. Although there’s no code specific to Backbone in this tutorial, I do make assumptions on how an app will operate within the context of a Backbone app.
One of the keys to having maintainable tests are to make sure that tests are isolated and reproducible. For unit tests, this is easy as long as we stay away from global variables, static classes and in general global state.