logo

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.

Add a test case

View the Test Cases

TitleRating# ExecSuccess
JSON Request Object using dynamic script tags5 stars5 stars5 stars5 stars5 stars278100.00%
XMLHttpRequest in text mode5 stars5 stars5 stars5 stars5 stars120995.78%
Instantiate XMLHTTP Object5 stars5 stars5 stars5 stars5 stars118087.03%
Cross-Browser XMLHttpRequest v1.24 stars4 stars4 stars4 stars113299.82%
Ajax cross-browser test4 stars4 stars4 stars4 stars52599.62%
Small Instantiate XMLHTTP Object3 stars3 stars3 stars112799.73%
Detect when DOM parsing is complete3 stars3 stars3 stars36499.73%
Dynamic iframe creation with content modification3 stars3 stars3 stars82296.11%
this is a waste of CPU cycles and bandwith2 stars2 stars336100.00%
Can timeout occur before load?2 stars2 stars643100.00%
newImage1 stars749100.00%
test_stringToDate1 stars11510.00%
assertTrue(true)1245100.00%
getElementById() in a span1232100.00%
basic timeout check1221100.00%
Another XMLHttpRequest object the multi-browser way1039100.00%
Getting current styles568100.00%
XMLHttpRequest Instantiation94199.89%
Bad browser detection128638.96%
assertTrue(false)12420.00%
Testing11890.00%
Thank You0
Thank You0
wjmeqylx erdoqb0
TestIE60
TestXMLDOM0
status bar text0
LVwMGeEpEDk0
LVwMGeEpEDk0
Hitesh0
Good0

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?

Please get in touch with us.

Spread the word about this project on your blog ! You can also digg it, del.icio.us it.

run