Javascript unit Testing Farm (JTF) - a collaborative project to provide test cases and unit testing for javascript.
Introduction
Javascript is present on almost every web page on the internet today, but many of these scripts do not work properly (or at all) on certain browser and operating systems combinations. This project provides a web front-end to allow you to test your javascript scripts on different browsers and operating systems. The aim is to highlight the browser combinations that do not work.
Manual testing is a long process and more often than not prone to errors. Most major software houses run their code through automatic tests that perform the same kind of task. Why shouldn't you test your javascript in the same way?
How does it work?
You write your javascript and insert some code to indicate a failure (or a pass) using the same functions as in JsUnit and other unit testing frameworks. Then, every time a visitor views your test case, it performs the unit test on their browser... providing information if the test fails.
The more browser combinations that visit a particular test case - the more chance you (and the rest of the community) will have of finding what browsers do not work with your code.
Getting Started
Identify a section of your code that you want to test and clearly identify a success and a failure state. Your javascript script will run from top-to-bottom and you will insert some code to inform the back-end when the test has passed and when it has failed.
You need to provide a name for the test and description of what the test is designed to achieve - and that is about all! You can also add comments and respond to other comments to help debug or improve your script. It's easy to get started right away and add a test case of your own.
View the Test Cases
| Title | Rating | # Exec | Success |
|---|---|---|---|
| JSON Request Object using dynamic script tags | ![]() ![]() ![]() ![]() ![]() | 278 | 100.00% |
| XMLHttpRequest in text mode | ![]() ![]() ![]() ![]() ![]() | 1209 | 95.78% |
| Instantiate XMLHTTP Object | ![]() ![]() ![]() ![]() ![]() | 1180 | 87.03% |
| Cross-Browser XMLHttpRequest v1.2 | ![]() ![]() ![]() ![]() | 1132 | 99.82% |
| Ajax cross-browser test | ![]() ![]() ![]() ![]() | 525 | 99.62% |
| Small Instantiate XMLHTTP Object | ![]() ![]() ![]() | 1127 | 99.73% |
| Detect when DOM parsing is complete | ![]() ![]() ![]() | 364 | 99.73% |
| Dynamic iframe creation with content modification | ![]() ![]() ![]() | 822 | 96.11% |
| this is a waste of CPU cycles and bandwith | ![]() ![]() | 336 | 100.00% |
| Can timeout occur before load? | ![]() ![]() | 643 | 100.00% |
| newImage | ![]() | 749 | 100.00% |
| test_stringToDate | ![]() | 1151 | 0.00% |
| assertTrue(true) | 1245 | 100.00% | |
| getElementById() in a span | 1232 | 100.00% | |
| basic timeout check | 1221 | 100.00% | |
| Another XMLHttpRequest object the multi-browser way | 1039 | 100.00% | |
| Getting current styles | 568 | 100.00% | |
| XMLHttpRequest Instantiation | 941 | 99.89% | |
| Bad browser detection | 1286 | 38.96% | |
| assertTrue(false) | 1242 | 0.00% | |
| Testing | 1189 | 0.00% | |
| Thank You | 0 | ||
| Thank You | 0 | ||
| wjmeqylx erdoqb | 0 | ||
| TestIE6 | 0 | ||
| TestXMLDOM | 0 | ||
| status bar text | 0 | ||
| LVwMGeEpEDk | 0 | ||
| LVwMGeEpEDk | 0 | ||
| Hitesh | 0 | ||
| Good | 0 |
Contact
Do you like this project? Do you hate it? Perhaps this site doesn't work on your browser, or you think a feature is missing? Maybe you want to contribute?
Spread the word about this project on your blog ! You can also digg it, del.icio.us it.


