API Docs for: 0.0.9
Show:

Dalek.Suite Class

Defined in: lib/dalek/suite.js:47
Module: DalekJS

Suite (Testsuite)

Methods

decrementTestsToBeExecuted

() Integer

Decrements number of tests that should be executed in this suite

Returns:

Integer:

numberOfTestsToBeExecuted

executeNextTest

(
  • tests
)
Mixed

Executes the next test in the sequence

Parameters:

  • tests Array

Returns:

Mixed:

testValue

getName

() String

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

Returns:

String:

name

getNextTest

() String

Returns the next test, that should be executed

Returns:

String:

testName

getNumberOfTests

(
  • tests
)
Integer

Returns the number of tests to be executed

Parameters:

  • tests Array

Returns:

Integer:

numberOfTests

getOptions

() Object

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

Returns a test function by its name

Parameters:

  • name String

Returns:

Function:

test

getTestInstance

(
  • name
)
Dalek.Test

Generates a new test instance

Parameters:

  • name String

Returns:

Dalek.Test:

test

getTests

() Array

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

Returns:

Array:

test

initialize

(
  • options
)
chainable

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

Loads the testsuite that should be executed

Parameters:

  • testfile String

Returns:

Object:

testsuite

run

(
  • callback
)
chainable

Runs any tests from this testsuite in sequence

Parameters:

  • callback Function

testDoesNotExist

(
  • options
)

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

Parameters:

  • options Object

testFinished

(
  • callback
  • tests
  • test
  • event
)
chainable

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