webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
Public Member Functions | Static Public Attributes | List of all members
com.netscape.javascript.qa.drivers.RefEnv Class Reference
Inheritance diagram for com.netscape.javascript.qa.drivers.RefEnv:
com.netscape.javascript.qa.drivers.TestEnvironment

Public Member Functions

 RefEnv (TestFile f, TestSuite s, RefDrv d)
 
void runTest ()
 
Object createContext ()
 
Object executeTestFile ()
 
boolean parseResult ()
 
void close ()
 

Static Public Attributes

static final String tags []
 
static final String sizeTag = "<#TEST CASES SIZE>"
 
static final String startTag = "<#TEST CASE"
 
static final String endTag = ">"
 

Detailed Description

RefEnv is used to run a JavaScript test in the JavaScript engine implemented in C. RefEnv creates a new ObservedTask and processes the standard output and standard error of the tests to determine the test result. The RefDrv expects the process output to contain the following content:

1 - anything (before the formatted output can be unstructured.

2 - the number of test cases output in the following way.

  <TEST CASES SIZE>
  int

3 - the results of each test formatted in the following way (name, expected, actual, description, and reason can all be multilines)

  <TEST CASE PASSED>
  true|false
  <TEST CASE NAME>
  text
  <TEST CASE EXPECTED>
  text
  <TEST CASE ACTUAL>
  text
  <TEST CASE DESCRIPTION>
  text
  <TEST CASE REASON>
  text
  <TEST CASE BUGNUMBER>
  text

4 - a marker that signifies the end of the tests

  <TEST CASES DONE>

5 - after the end of the tests you can have more unstructed text.

The test case output is generated by the stopTest function, which is in the shared functions file, jsref.js.

See also
com.netscape.javascript.qa.drivers.TestEnvironment
ObservedTask
Author
chris.nosp@m.tine.nosp@m.@nets.nosp@m.cape.nosp@m..com
Nick Lerissa

Constructor & Destructor Documentation

◆ RefEnv()

com.netscape.javascript.qa.drivers.RefEnv.RefEnv ( TestFile  f,
TestSuite  s,
RefDrv  d 
)
inline

Create a new RefEnv.

Member Function Documentation

◆ close()

void com.netscape.javascript.qa.drivers.RefEnv.close ( )
inline

Method required by TestEnvironment; this implemenation does nothing.

Implements com.netscape.javascript.qa.drivers.TestEnvironment.

◆ createContext()

Object com.netscape.javascript.qa.drivers.RefEnv.createContext ( )
inline

Instantiate a new JavaScript shell, passing the TestFile as an argument.

Implements com.netscape.javascript.qa.drivers.TestEnvironment.

◆ executeTestFile()

Object com.netscape.javascript.qa.drivers.RefEnv.executeTestFile ( )
inline

Start the shell process.

Implements com.netscape.javascript.qa.drivers.TestEnvironment.

◆ parseResult()

boolean com.netscape.javascript.qa.drivers.RefEnv.parseResult ( )
inline

Parse the standard output of the process, and try to create new TestCase objects.

Implements com.netscape.javascript.qa.drivers.TestEnvironment.

◆ runTest()

void com.netscape.javascript.qa.drivers.RefEnv.runTest ( )
inline

Called by the driver to execute the test program.

Implements com.netscape.javascript.qa.drivers.TestEnvironment.

Member Data Documentation

◆ endTag

final String com.netscape.javascript.qa.drivers.RefEnv.endTag = ">"
static

end of a tag

◆ sizeTag

final String com.netscape.javascript.qa.drivers.RefEnv.sizeTag = "<#TEST CASES SIZE>"
static

tag to specify the number of TestCases

◆ startTag

final String com.netscape.javascript.qa.drivers.RefEnv.startTag = "<#TEST CASE"
static

beginning of a tag

◆ tags

final String com.netscape.javascript.qa.drivers.RefEnv.tags[]
static

array of in output file to get attributes of a specific TestCase


The documentation for this class was generated from the following file: