Options
All
  • Public
  • Public/Protected
  • All
Menu

Class TestSuite

A named suite of test cases that are executed altogether. The suite suite is created with the {@link TestSuite#create} and the returned suite contains initially no tests.

The suite can declare a callback before the suite with {@link TestSuite#before} or after the suite with {@link TestSuite#after}.

The suite can declare a callback before each test with {@link TestSuite#beforeEach} or after each test with {@link TestSuite#afterEach}.

Each test case of the suite is declared by calling the {@link TestSuite#test} method.

Hierarchy

  • TestSuite

Index

Methods

after

  • Set a callback executed after the tests.

    Parameters

    Returns TestSuite

afterEach

  • Set a callback executed after each test and before the suite after callback.

    Parameters

    Returns TestSuite

before

  • Set a callback executed before the tests.

    Parameters

    Returns TestSuite

beforeEach

  • Set a callback executed before each test and after the suite before callback.

    Parameters

    Returns TestSuite

run

  • Run the testsuite with the default options.

    When the test suite is executed in a Vertx context (i.e Vertx.currentContext() returns a context) this context's event loop is used for running the test suite. Otherwise it is executed in the current thread.

    The returned Completion object can be used to get a completion callback.

    Returns TestCompletion

  • Run the testsuite with the specified options.

    When the test suite is executed in a Vertx context (i.e Vertx.currentContext() returns a context) this context's event loop is used for running the test suite unless the TestOptions is set to false. In this case it is executed by the current thread.

    Otherwise, the test suite will be executed in the current thread when TestOptions is set to false or null. If the value is true, this methods throws an IllegalStateException.

    The returned Completion object can be used to get a completion callback.

    Parameters

    Returns TestCompletion

  • Run the testsuite with the default options and the specified vertx instance.

    The test suite will be executed on the event loop provided by the vertx argument. The returned Completion object can be used to get a completion callback.

    Parameters

    • vertx: Vertx

    Returns TestCompletion

  • Run the testsuite with the specified options and the specified vertx instance.

    The test suite will be executed on the event loop provided by the vertx argument when TestOptions is not set to false. The returned Completion object can be used to get a completion callback.

    Parameters

    Returns TestCompletion

test

  • Add a new test case to the suite.

    Parameters

    Returns TestSuite

  • Add a new test case to the suite.

    Parameters

    Returns TestSuite

Static create

  • Create and return a new test suite.

    Parameters

    • name: string

    Returns TestSuite

Generated using TypeDoc