Javascript js测试驱动程序-如何在安装方法中获取正在运行的测试和测试用例的名称?

Javascript js测试驱动程序-如何在安装方法中获取正在运行的测试和测试用例的名称?,javascript,unit-testing,js-test-driver,Javascript,Unit Testing,Js Test Driver,我想知道如何获得正在运行的测试的名称、测试用例的名称和测试结果(测试是否通过) 以下是代码示例: MyTestCase= TestCase("MyTestCase"); MyTestCase.prototype.setUp = function() { // print name of the test => testA // print name of the testcase => MyTestCase } MyTestCase.prototype.testA= func

我想知道如何获得正在运行的测试的名称、测试用例的名称和测试结果(测试是否通过)

以下是代码示例:

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??
}

我将JSTestDriver和QUnit测试运行程序一起使用,它显示正在运行的测试的名称、测试用例的名称和测试结果(无论测试是否通过)

下面是适配器:


JsTestDriver有一个名为--testOutput的标志,它指定存储结果的路径。您可以在那里找到测试名称、测试用例以及它是通过还是失败。它以xml的形式出现