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

support for multiple status code entries in custom values generating multiple tests #8

Description

@noahdietz

When supplying custom values for a specific path > operation > status code, supplying an array of objects for the status rather than just a single one could generate multiple unit tests within the operation level test block.

an example custom values blob would be as follows:

...
"200": [
       {
        "header": {
          "header-test": "a"
        },
        "query": {
          "status": [
            "notanenum3"
          ]
        },
        "response": [
          {
            "name": "sparky",
            "photoUrls": [
              "url1",
              "url2",
              "url3"
            ]
          },
          {
            "name": "champ",
            "photoUrls": [
              "url4",
              "url5",
              "url6"
            ]
          }
        ]
      },
      {
        "header": {
          "header-test": "b"
        },
        "query": {
          "status": [
            "otherstatus"
          ]
        },
        "response": [
          {
            "name": "fido",
            "photoUrls": [
              "url789"
            ]
          }
        ]
      }
],
...

Resulting in two tests (it clauses) being generated under the same operation-level block for the same status code, but with different request/response payloads.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions