Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test wrapper to dump tests to directories for external consumption #77

Open
karenetheridge opened this issue May 24, 2024 · 0 comments
Open

Comments

@karenetheridge
Copy link
Owner

karenetheridge commented May 24, 2024

As a donation to the OpenAPI project to start a test suite:

Write a wrapper around the tests to dump the data into files for external consumption. There are multiple types of tests that can be produced:

  • validation of an HTTP request or response against an openapi document. Each directory would contain:

    • a text file briefly describing the intent of the test (this would come from the test name)
    • the serialized HTTP request or response (as it would be transmitted over the network)
    • the openapi document(s) that should be loaded (in yaml or json format)
    • the validation response, in json format (either true, or a JSON Schema-formatted output structure indicating the error(s))
  • valid and invalid openapi document(s) themselves. Each directory would contain:

    • a text file briefly describing the intent of the test (this would come from the test name)
    • the openapi document(s) that should be loaded (in yaml or json format)
    • the validation response, in json format (either true, or a JSON Schema-formatted output structure indicating the error(s))
  • deserialization of HTTP request and response parameters and bodies. Each directory would contain:

    • a text file briefly describing the intent of the test (this would come from the test name)
    • the openapi document(s) that should be loaded (in yaml or json format)
    • the serialized HTTP request or response (as it would be transmitted over the network)
    • the deserialized parameters (path, header, cookie, query) and body, in json format (perhaps as a json object, with properties named like "query.foo", "header.Blah", "path.foo_id", "body")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant