API Docs for: 0.0.4
Show:

Dalek.Testsuite Class

Defined in: index.js:46
Module: DalekJS

Testsuite

Methods

decrementTestsToBeExecuted

() Integer

Defined in index.js:148

Decrements number of tests that should be executed in this suite

Returns:

Integer:

numberOfTestsToBeExecuted

executeNextTest

(
  • tests
)
Mixed

Defined in index.js:229

Executes the next test in the sequence

Parameters:

  • tests Array

Returns:

Mixed:

testValue

getName

() String

Defined in index.js:159

Returns the name of the testsuite If the suite has no name, it will return the testsuites filename

Returns:

String:

name

getNextTest

() String

Defined in index.js:218

Returns the next test, that should be executed

Returns:

String:

testName

getNumberOfTests

(
  • tests
)
Integer

Defined in index.js:206

Returns the number of tests to be executed

Parameters:

  • tests Array

Returns:

Integer:

numberOfTests

getOptions

() Object

Defined in index.js:177

Returns the options of the testsuite If the suite has no options, it will return an empty object

Returns:

Object:

options Suite options

getTest

(
  • name
)
Function

Defined in index.js:262

Returns a test function by its name

Parameters:

  • name String

Returns:

Function:

test

getTestInstance

(
  • name
)
Dalek.Test

Defined in index.js:250

Generates a new test instance

Parameters:

  • name String

Returns:

Dalek.Test:

test

getTests

() Array

Defined in index.js:195

Returns all names (aka. object keys) the tests that should be executed

Returns:

Array:

test

initialize

(
  • options
)
chainable

Defined in index.js:58

Assigns the initial options driverEmitter -> the drivers event dispatcher reporterEmitter -> the reporters event dispatcher driver -> the driver instance (e.g. native webdriver, selenium, etc.) name -> the suites filename (default suite name)

Parameters:

  • options Object

loadTestsuite

(
  • testfile
)
Object

Defined in index.js:80

Loads the testsuite that should be executed

Parameters:

  • testfile String

Returns:

Object:

testsuite

run

(
  • callback
)
chainable

Defined in index.js:288

Runs any tests from this testsuite in sequence

Parameters:

  • callback Function

testDoesNotExist

(
  • options
)

Defined in index.js:274

Will be executed if a test is started, that does not exist

Parameters:

  • options Object

testFinished

(
  • callback
  • tests
  • test
  • event
)
chainable

Defined in index.js:108

Checks if all tests from the testsuite are executed. Runs the next test if not. Triggers asyncs callback if the suite is finished. Decrements the testsToBeExecuted counter

Parameters:

  • callback Function
  • tests Array
  • test Object
  • event String