Skip to content

Stateful Behavior cannot be reset #37

@szymon-owczarzak

Description

@szymon-owczarzak

According to: http://wiremock.org/docs/stateful-behaviour/ we should be able to reset state if stateful is used.

However when requesting:
http://localhost:4502/stubs/__admin/scenarios/reset I get No stub defined for this request
http://localhost:4502/__admin/scenarios/reset I get 404 Resource at '/__admin/scenarios/reset' not found: No resource found

Stateful scenario like this seems to work except reset of course:

{
  "mappings": [
    {
      "scenarioName": "Authentication",
      "requiredScenarioState": "Started",
      "request": {
        "method": "POST",
        "url": "/sso/authenticate"
      },
      "response": {
        "status": 200,
        "headers": {
          "Content-Type": "application/json"
        },
        "bodyFileName": "myProj/authenticate.json"
      }
    },
    {
      "scenarioName": "Authentication",
      "requiredScenarioState": "Started",
      "newScenarioState": "All Accounts Closed",
      "request": {
        "method": "GET",
        "url": "/sso/authenticate/allAccountsClosed"
      },
      "response": {
        "status": 200,
        "headers": {
          "Content-Type": "application/json"
        },
        "bodyFileName": "myProj/authenticate.json"
      }
    },
    {
      "scenarioName": "Authentication",
      "requiredScenarioState": "All Accounts Closed",
      "request": {
        "method": "POST",
        "url": "/sso/authenticate"
      },
      "response": {
        "status": 200,
        "headers": {
          "Content-Type": "application/json"
        },
        "bodyFileName": "myProj/authenticate-allAccountsClosed.json"
      }
    }
  ]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions