Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface TestCase

Hierarchy

  • TestCase

Index

Properties

_imagePaths

_imagePaths: string[]

Optional Readonly caseId

caseId: undefined | string

Readonly criticalTime

criticalTime: number

Readonly warningTime

warningTime: number

Methods

addImagePaths

  • addImagePaths(...paths: string[]): void

endOfStep

  • endOfStep(stepName: string, warning?: number, critical?: number, forward?: boolean): void
  • deprecated

    Updates the current current test step with the provided parameters, finishes that step and immediately starts a new test step.

    If endOfStep is used in combination with startStep, the provided stepName must match the current test step name. Otherwise and error will be thrown because of the inconsistency in test step names.

    Parameters

    • stepName: string
    • Optional warning: number
    • Optional critical: number
    • Optional forward: boolean

      deprecated: The logic is handled by the dedicated forwarder

    Returns void

getID

  • getID(): string

getLastUrl

  • getLastUrl(): string

getTestCaseFolderPath

  • getTestCaseFolderPath(): any

getTestSuiteFolderPath

  • getTestSuiteFolderPath(): any

handleException

  • handleException<E>(e: E): Promise<void>
  • Creates an Errorscreenshot at the time the method is invoked Then updates the current Testcase with the given Error

    If there are cached test-step information, the current test-step will be updated because otherwise endOfStep (which usually updates that information) will not be invoked after the error is thrown

    Type parameters

    • E: Error

    Parameters

    • e: E

      an Error object which is written to

    Returns Promise<void>

saveResult

  • saveResult(forward?: boolean): void
  • Finishes the current TestStep and the the TestCase

    If no error occurred during the TestCase all TestSteps are written to the cache.

    Parameters

    • Optional forward: boolean

      deprecated: The logic is handled by the dedicated forwarder

    Returns void

startStep

  • startStep(stepName: string, warning?: number, critical?: number): void
  • Starts a new test step. startStep can be used to end the current test step and start a new one by calling startStep again.

    Parameters

    • stepName: string

      Name of the test step to start

    • Optional warning: number

      warning threshold of the test step. Exceeding warning threshold changes the state transmitted to monitoring systems.

    • Optional critical: number

      critical threshold of the test step. Exceeding critical threshold changes the state transmitted to monitoring systems.

    Returns void

throwException

  • throwException(message: string, screenshot: boolean): Promise<void>