Contents

FBTest Object

A test, specifically the test driver part, usually use APIs that are provided by the FBTest framework. The test driver uses them to communicate back to the framework and automate Browser and Firebug UI. All APIs are accessible via FBTest object that is automatically defined as a global variable within a test driver scope. Let's see what methods are available:

ok(pass, msg) - generates a test report into the test console. If the first parameter is true the report is considered as passing, otherwise failing. If all reports from a test case pass, the entire test case is considered as passing, otherwise failing.

compare(expected, actual, msg) - also generates a test report. If the expected string equals to actual, the report is considered as passing.