0

I would like to know how we can get the name of the running test, name of the test case, and test result (whether test has passed or failed).

Following is the code example:

MyTestCase= TestCase("MyTestCase");

MyTestCase.prototype.setUp = function()
{
 // print name of the test => testA
 // print name of the testcase => MyTestCase
}

MyTestCase.prototype.testA= function()
{
  //do something    
}


MyTestCase.prototype.tearDown = function()
{
  //result of the test => passed or failed??
}
zataak
  • 1
  • 2

2 Answers2

0

I have used JSTestDriver with the QUnit Test runner which display name of the running test, name of the test case, and test result (whether test has passed or failed).

http://qunitjs.com/

Below is the adapter:

https://code.google.com/p/js-test-driver/wiki/QUnitAdapter

Spock
  • 7,009
  • 1
  • 41
  • 60
0

JsTestDriver has a flag called --testOutput , which specifies the path of where to store the results. You can find the test name, test case, and whether it passed or failed on there. It comes as an xml.