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 stars131996.13%
Ajax cross-browser test4 stars4 stars4 stars4 stars63399.53%
Instantiate XMLHTTP Object4 stars4 stars4 stars4 stars127087.56%
Can timeout occur before load?3 stars3 stars3 stars648100.00%
Cross-Browser XMLHttpRequest v1.23 stars3 stars3 stars117899.83%
Detect when DOM parsing is complete3 stars3 stars3 stars36499.73%
Small Instantiate XMLHTTP Object3 stars3 stars3 stars123499.68%
Dynamic iframe creation with content modification3 stars3 stars3 stars82296.11%
this is a waste of CPU cycles and bandwith2 stars2 stars336100.00%
newImage1 stars857100.00%
test_stringToDate1 stars12590.00%
assertTrue(true)1360100.00%
getElementById() in a span1345100.00%
basic timeout check1333100.00%
Another XMLHttpRequest object the multi-browser way1147100.00%
Getting current styles676100.00%
XMLHttpRequest Instantiation104999.90%
Bad browser detection141038.44%
assertTrue(false)13540.00%
Testing12970.00%
Thank You0
Thank You0
wjmeqylx erdoqb0
TestIE60
TestXMLDOM0
status bar text0
LVwMGeEpEDk0
LVwMGeEpEDk0
Hitesh0
Good0
great site0

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