Skip to main content

HotTester

hotstaq / Modules / HotTester

Class: HotTester

Executes tests.

Hierarchy​

Table of contents​

Constructors​

Properties​

Methods​

Constructors​

constructor​

• new HotTester(processor, name, baseUrl, driver, testMaps?)

Parameters​

NameType
processorHotStaq
namestring
baseUrlstring
driverHotTestDriver
testMapsObject

Defined in​

HotTester.ts:100

Properties​

baseUrl​

• baseUrl: string

The base url that will construct future urls.

Defined in​

HotTester.ts:74


driver​

• driver: HotTestDriver

The driver to use when running tests.

Defined in​

HotTester.ts:86


finishedLoading​

• finishedLoading: boolean

Has this tester finished loading?

Defined in​

HotTester.ts:90


hasBeenDestroyed​

• hasBeenDestroyed: boolean

Has this tester finished setting up?

Defined in​

HotTester.ts:98


hasBeenSetup​

• hasBeenSetup: boolean

Has this tester finished setting up?

Defined in​

HotTester.ts:94


name​

• name: string

The tester name.

Defined in​

HotTester.ts:70


processor​

• processor: HotStaq

The associated processor.

Defined in​

HotTester.ts:78


testMaps​

• testMaps: Object

The test maps to test.

Index signature​

â–ª [name: string]: HotTestMap

Defined in​

HotTester.ts:82

Methods​

destroy​

â–¸ Abstract destroy(): Promise<void>

Executed when destroying up the tester.

Returns​

Promise<void>

Defined in​

HotTester.ts:120


execute​

â–¸ execute(mapName): Promise<void>

Execute the tests.

Parameters​

NameType
mapNamestring

Returns​

Promise<void>

Defined in​

HotTester.ts:561


executeCommand​

â–¸ executeCommand(destination, page, stop, cmd): Promise<void>

Execute a command.

Parameters​

NameType
destinationHotDestination
pageHotTestPage
stopHotTestStop
cmdstring

Returns​

Promise<void>

Defined in​

HotTester.ts:380


executeTestAPIPath​

â–¸ executeTestAPIPath(destination, method, testName, skipEventCalls?, continueWhenTestIsComplete?): Promise<any>

Execute an API's test path.

Parameters​

NameTypeDefault value
destinationHotDestinationundefined
methodHotRouteMethodundefined
testNamestringundefined
skipEventCallsbooleanfalse
continueWhenTestIsCompletebooleanfalse

Returns​

Promise<any>

Defined in​

HotTester.ts:256


executeTestAPIPaths​

â–¸ executeTestAPIPaths(destination): Promise<any[]>

Execute all test paths in an API route.

fixme This needs a better implementation...

Parameters​

NameType
destinationHotDestination

Returns​

Promise<any[]>

Defined in​

HotTester.ts:294


executeTestPagePath​

â–¸ executeTestPagePath(destination, stop, skipEventCalls?, continueWhenTestIsComplete?): Promise<any>

Execute a test page path.

Parameters​

NameTypeDefault value
destinationHotDestinationundefined
stopHotTestStopundefined
skipEventCallsbooleanfalse
continueWhenTestIsCompletebooleanfalse

Returns​

Promise<any>

Defined in​

HotTester.ts:329


executeTestPagePaths​

â–¸ executeTestPagePaths(destination, continueWhenTestIsComplete?): Promise<any[]>

Execute all test paths in a page.

Parameters​

NameTypeDefault value
destinationHotDestinationundefined
continueWhenTestIsCompletebooleanfalse

Returns​

Promise<any[]>

Defined in​

HotTester.ts:515


getTestPage​

â–¸ getTestPage(destination): HotTestPage

Get a test page.

Parameters​

NameType
destinationHotDestination

Returns​

HotTestPage

Defined in​

HotTester.ts:181


getTestPath​

â–¸ getTestPath(destination, pathName): HotTestPath

Get a test path.

Parameters​

NameType
destinationHotDestination
pathNamestring

Returns​

HotTestPath

Defined in​

HotTester.ts:191


onCommand​

â–¸ Optional onCommand(destination, page, stop, cmd, args, cmdFunc): Promise<void>

Executed when a command is executed.

Parameters​

NameType
destinationHotDestination
pageHotTestPage
stopHotTestStop
cmdstring
argsstring[]
cmdFunc(cmdArgs: string[]) => Promise<void>

Returns​

Promise<void>

Defined in​

HotTester.ts:153


onExecute​

â–¸ Optional onExecute(): Promise<void>

Executed when this tester has been executed from the API.

Returns​

Promise<void>

Defined in​

HotTester.ts:163


onFinishedLoading​

â–¸ Optional onFinishedLoading(): Promise<void>

Executed when this tester has finished loading all data from the API.

Returns​

Promise<void>

Defined in​

HotTester.ts:167


onTestAPIPathEnd​

â–¸ Optional onTestAPIPathEnd(destination, method, testName, result, continueWhenTestIsComplete?): Promise<void>

Executed when an API test path has ended.

Parameters​

NameType
destinationHotDestination
methodHotRouteMethod
testNamestring
resultany
continueWhenTestIsComplete?boolean

Returns​

Promise<void>

Defined in​

HotTester.ts:137


onTestAPIPathStart​

â–¸ Optional onTestAPIPathStart(destination, method, testName, continueWhenTestIsComplete?): Promise<boolean>

Executed when an API test path has started. If this returns false, the testPath will not be immediately executed afterwards.

Parameters​

NameType
destinationHotDestination
methodHotRouteMethod
testNamestring
continueWhenTestIsComplete?boolean

Returns​

Promise<boolean>

Defined in​

HotTester.ts:132


onTestEnd​

â–¸ Optional onTestEnd(destination): Promise<void>

Executed when tests are finished.

Parameters​

NameType
destinationHotDestination

Returns​

Promise<void>

Defined in​

HotTester.ts:158


onTestPagePathEnd​

â–¸ Optional onTestPagePathEnd(destination, testPath, result, continueWhenTestIsComplete?): Promise<void>

Executed when a page test has ended.

Parameters​

NameType
destinationHotDestination
testPathHotTestPath
resultany
continueWhenTestIsComplete?boolean

Returns​

Promise<void>

Defined in​

HotTester.ts:148


onTestPagePathStart​

â–¸ Optional onTestPagePathStart(destination, page, stop, continueWhenTestIsComplete?): Promise<boolean>

Executed when page tests are started. If this returns false, the testPath will not be immediately executed afterwards.

Parameters​

NameType
destinationHotDestination
pageHotTestPage
stopHotTestStop
continueWhenTestIsComplete?boolean

Returns​

Promise<boolean>

Defined in​

HotTester.ts:143


onTestStart​

â–¸ Optional onTestStart(destination, url, destinationKey?): Promise<boolean>

Executed when tests are started. If this returns true, it will continue and execute all test paths. If this returns it will skip all test paths and execute onTestEnd instead.

Parameters​

NameType
destinationHotDestination
urlstring
destinationKey?string

Returns​

Promise<boolean>

Defined in​

HotTester.ts:127


setup​

â–¸ Abstract setup(isWebRoute, url, destinationKey?): Promise<void>

Executed when setting up the tester.

Parameters​

NameType
isWebRouteboolean
urlstring
destinationKey?string

Returns​

Promise<void>

Defined in​

HotTester.ts:116


waitForData​

â–¸ waitForData(): Promise<void>

Waits for the API to finish loading all data.

Returns​

Promise<void>

Defined in​

HotTester.ts:172


interpretDestination​

â–¸ Static interpretDestination(mapName, testDest): HotDestination

Get a destination JSON object to use.

Parameters​

NameType
mapNamestring
testDestHotTestDestination

Returns​

HotDestination

Defined in​

HotTester.ts:201