In this chapter, you learned what QUnit is and how to use it for testing synchronous JavaScript code. You learned how to test asynchronous (Ajax) JavaScript code using the QUnit test
and QUnit asyncTest
mechanisms. You learned the assertions provided by the framework, and how to develop your own assertion in order to simplify your test code. You also learned how to load HTML fixtures easily in your QUnit tests. Finally, you learned how to apply all of these concepts for testing the weather application using QUnit. In the next chapter, you will learn how to work with the JsTestDriver framework, and learn how to use it for testing the JavaScript part of the weather application. Along with this, you will also learn how to automate the QUnit and Jasmine tests using the JsTestDriver framework.
JavaScript Unit Testing
By :
JavaScript Unit Testing
By:
Overview of this book
<p>The largest challenge for many developers’ day to day life is ensuring the support of, and assuring the reach of, their product. With the ever increasing number of mainstream web browsers this is becoming a more difficult task for JavaScript coders. <br /><br />From the beginning, JavaScript Unit Testing will show you how to reduce the time you spend testing, and automate and ensure efficiency in guaranteeing your success.<br /><br />JavaScript Unit Testing will introduce and help you master the art of efficiently performing and automating JavaScript Unit tests for your web applications.<br /><br />Using the most popular JavaScript unit testing frameworks, you will develop, integrate, and automate all the tests you need to ensure the widest reach and success of your web application.<br /><br />Covering the most popular JavaScript Unit testing frameworks of today, JavaScript Unit Testing is your bible to ensuring the functionality and success of all of your JavaScript and Ajax Web Applications.<br /><br />Starting with Jasmine, you will also learn about, and use, YUITest, QUnit, and JsTestDriver, integrate them into your projects, and use them together to generate reports.<br /><br />Learn to automate these tools, make them work for you, and include the power of these tools in your projects from day one.</p>
Table of Contents (12 chapters)
JavaScript Unit Testing
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
Free Chapter
Unit Testing JavaScript Applications
Jasmine
YUI Test
QUnit
JsTestDriver
Index
Customer Reviews