Skip to content
This repository was archived by the owner on May 29, 2025. It is now read-only.

Testing lockout scenario #131

@raheem-abdul

Description

@raheem-abdul

I have a scenario where I have to call an API multiple times until it sends a locked out response. Is there is a way to achieve this in parrot? I tried this code, but it did not work. It always gives the first response 1001.

[{
      request: {
        path: '/test',
        method: 'POST',
      },
      response: {
        body: {
          message: 'Failed First attempt',
          code: 1001,
        },
        status: 400,
      },
    },
    {
      request: {
        path: '/test',
        method: 'POST',
      },
      response: {
        body: {
          message: 'Failed Second attempt',
          code: 1002,
        },
        status: 400,
      },
    },
    {
      request: {
        path: '/test',
        method: 'POST',
      },
      response: {
        body: {
          message: 'Locked out',
          code: 1003,
        },
        status: 400,
      },
    }]

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions