2. ● User Interface Development
● Source Code
● Quality Assurance (software testing)
3. Need for software testing:
● Meets the requirements
● works as expected
● satisfies the need of customer
Different Methods:
● Static Testing
● Dynamic Testing
4.
5.
6. Unit Testing
● Verify the functionality of specific section of
the code.
● Usually at the function level.
● To ensure that a specific function is working
as expected.
7. Qunit
● A Javascript unit testing framework.
● It can be used to test any generic Javascript
code.
● You can test your code in the browser itself.
12. Asserting Results
● Essential elements of any unit tests.
● You express the result expected and have the
testing framework compare them to the
actual values that the functions output.
Qunit provides three assertions:
● ok()
● equal()
● deepEqual()
13. ok()
● ok(truthy,[message])
● most basic assertion
● requires only one argument, in addition you
can send a string to show as a message
examples:
ok(true,”true succeeds”);
ok(1==1,”test passed”);
15. deepEqual()
● deepEqual(actual,expected,[message]);
● can be used just like equal, is a better choice
● uses more accurate comparison operator
(===) instead of simple (==)
examples:
deepEqual(0,””,”test fails, zero not equal to
empty”);
16. expect()
● used to check whether all the assertions have
been executed or not