Merged
Conversation
- Building up a suite of conformance tests to validate and report on Specmatic's conformance to the OpenAPI specification. - Starting out with a set of loop tests that validate that Specmatic can mock and test against a set of OpenAPI specs.
sahilm
commented
Mar 23, 2026
| pathToOpenAPISpecFile = openAPISpecFile | ||
| ) | ||
|
|
||
| try { |
Contributor
Author
There was a problem hiding this comment.
Not using BeforeAll/AfterAll here because this will change soon in a follow up PR.
Summary
|
sahilm
commented
Mar 23, 2026
| } | ||
| } | ||
|
|
||
| val generateConformanceTests by tasks.registering { |
Contributor
Author
There was a problem hiding this comment.
Need to use Codegen here because jUnit can only parallelize if each test lives in its own class.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What:
Introduce OpenAPI Spec conformance tests. In part 1 we validate and document that Specmatic supports
001-http-methodsand002-path-parametersfeatures from the OpenAPI specification (version 3.0.x) by running a loop test. For example a loop test of the specification002-path-parameters/007-two-params-with-separator.yamlstarts a Specmatic mock for this specification and then points a Specmatic test at it. A successful test validates that Specmatic can load, parse, mock and test such a specification.Why:
This ensures and documents that Specmatic is and remains compliant with the OpenAPI specification.
Design:
./gradlew :conformance-tests:check -PenableConformanceTests=true. These tests will be wired up to the main build in subsequent PRs.Follow up PRs: