k6-cucumber-steps API Reference - v2.0.10-alpha.0
    Preparing search index...

    Function k6IWriteToAs

    • Writes an alias value to a JSON file with a custom key name.

      Retrieves a stored alias value and writes it to a JSON file with a custom key. Creates the file and directory if they don't exist.

      Parameters

      • aliasName: string

        Name of the stored alias to write

      • fileName: string

        Path to the JSON file (relative to project root)

      • customKey: string

        Custom key name to use in the JSON file

      Returns void

      And I k6 write "authToken" to "data/tokens.json" as "access_token"
      And I k6 write "userId" to "data/user.json" as "id"