Hey guys. Today I wanted to share some useful developer’s tools and resources that will help you correctly stress-test and fine-tune your jQuery code whether it’s a small plugin or a large scale web application. Many of these are tools used and recommended by both myself and member’s of the jQuery core team, so you know for sure that they they’ve come in handy a few times. Please feel free to share this list to help other devs out there.
Mock Your Ajax Requests with MockJax & jQuery for Rapid Development
The MockJax plugin is a really fantastic development and testing tool for intercepting and simulating ajax requests made with jQuery with a minimal impact on changes to production code. I recommend this for testing web applications that frequently use Ajax connections. TamperData is also useful for testing of this type. Read the complete tutorial on using MockJax below.
Getting Started With Test-Driven Development For jQuery
The concept of test-driven development is quite simple. Anytime you want to add a new feature to your application, you need to write a test for it before writing any code for that feature. To write the test, you need to fully understand the specifications and requirements for what that feature does. At the start, your test will of course fail, but the goal is to ultimately code up a solution to that feature which is considered finished if the test passes. Here is an excellent tutorial on how to get started with test-driven development for jQuery with Elijah Manor.
How FireQuery Can Make Debugging Your jQuery Code A Little Easier
If you regularly work on websites or web applications, you may be familiar with the popular FireFox plugin FireBug. FireBug basically allows you to inspect the DOM hierarchy and make live changes to your HTML/CSS which appear in your browser instantly. FireQuery is an add-on which extends FireBug with some jQuery focused features. I think it’s really useful because you can output your jQuery expressions to the FireBug console visually see embdedded data elements and event handlers that were added via jQuery. A recommended add-on, you can check out a thorough tutorial on FireQuery below.
Automating jQuery testing with Browser Launching, Test Execution And Result Reporting
Distributed jQuery Testing via the Grid