step(description: string)

Parameters

description: string - Natural language description of what should be done in this step.

Methods

Returns: TestStep, which has chainable methods:

  • .check(description: string) -> TestStep - Check that a statement holds true after the step is executed.
  • .data(testData: string | Record<string, string>) -> TestStep - Provide test data for the agent to use while executing the step
  • .secureData(Record<string, string>) -> TestStep - Provide sensitive test data that should be encrypted
  • .step(description: string) -> TestStep - create a new step in the sequence for the parent Test Case

Usage

test('can log in and out')
    .step('Log in to the app')
        .data({ email: "foo@bar.com" })
        .secureData({ password: process.env.SUPER_SECRET_PASSWORD })
        .check('Can see dashboard')
    .step('Log out')
        .check("User is logged out");