Blog

Testing front-end code without the server

Our own Jordan Kasper, a Senior JavaScript Engineer, tackles the opaque subject of front-end testing in a fantastic blog post he put up last night. Specifically, Jordan breaks down how to test without relying on a server, making your tests easier to write and easier to manage.

The existence of a server does not determine the success of your front end testing strategy.

That is the basis, a thesis almost, for the rest of this post. The fact is that of the few of you actually doing front end testing, most are doing so with the “help” of a testing server that provides data from some pre-filled database. This is wrong.

This may not sit well with any of you, but my guess is that if you’re reading this post, then you are interested in making your front end testing better. So, let me repeat that point just to be clear: with few exceptions, using any pre-defined, pre-populated, pre-initialized server is not the best way to properly test your front end code.

Check out the rest of Jordan’s post over on his blog.

Tweet about this on TwitterShare on FacebookShare on RedditShare on Google+Share on LinkedIn

  • Juan Mendes

    I almost disagree: It is true that most of your tests should not depend on the server, they should be unit tests. However, integration tests using tools like Selenium let you test the full application making sure you’re also testing the integration of all the units. Again, I’m not disagreeing, I’m just pointing out that one should not neglect integration testing.

  • Juan Mendes

    I almost disagree: It is true that most of your tests should not depend on the server, they should be unit tests. However, integration tests using tools like Selenium let you test the full application making sure you’re also testing the integration of all the units. Again, I’m not disagreeing, I’m just pointing out that one should not neglect integration testing.