-
Notifications
You must be signed in to change notification settings - Fork 52
Feat: HTML verification report #529
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
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
edd1db4
feat(pact_verifier_cli): Add CLI option to generate HTML report and f…
rholshausen 845da49
feat(pact_verifier_cli): Implement the XML -> XML + XSLT -> generated…
rholshausen 510cb0b
feat(pact_verifier_cli): create print friendly version of HTML report
rholshausen 8ee97b4
chore(pact_verifier_cli): CLI functions must be public as they are us…
rholshausen 32ea209
chore(pact_verifier_cli): Correct CLI help text grammer
rholshausen 8daa895
chore(pact_verifier_cli): Correct CLI help text grammer
rholshausen e8b6397
chore(pact_verifier_cli): cleanup typos in comments
rholshausen 27851b3
feat(pact_verifier_cli): Add CLI option to pass in the XSLT to render…
rholshausen d14e629
chore(pact_verifier_cli): update CLI snapshots after adding the new p…
rholshausen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
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
5 changes: 5 additions & 0 deletions
5
...cli/src/reports/snapshots/pact_verifier_cli__reports__xml__tests__all_mismatch_types.snap
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| source: pact_verifier_cli/src/reports/xml.rs | ||
| expression: "to_xml(&result, \"My Provider\")" | ||
| --- | ||
| <report><provider>My Provider</provider><result>false</result><errors><error><interaction>Complex interaction</interaction><mismatch type="mismatches"><interaction_id>complex-123</interaction_id><mismatches><mismatch type="MethodMismatch"><description>Expected method GET but received POST</description><expected>GET</expected><actual>POST</actual></mismatch><mismatch type="PathMismatch"><description>Expected path /foo but received /bar</description><expected>/foo</expected><actual>/bar</actual></mismatch><mismatch type="HeaderMismatch"><description>Expected header Content-Type=application/json but received text/plain</description><expected>application/json</expected><actual>text/plain</actual><key>Content-Type</key></mismatch><mismatch type="QueryMismatch"><description>Expected query parameter page=1 but received page=2</description><expected>1</expected><actual>2</actual><parameter>page</parameter></mismatch><mismatch type="BodyTypeMismatch"><description>Expected body content type application/json but received text/plain</description><expected>application/json</expected><actual>text/plain</actual></mismatch><mismatch type="MetadataMismatch"><description>Expected metadata contentType=application/json but received text/xml</description><expected>application/json</expected><actual>text/xml</actual><key>contentType</key></mismatch></mismatches></mismatch></error></errors></report> |
5 changes: 5 additions & 0 deletions
5
...ifier_cli/src/reports/snapshots/pact_verifier_cli__reports__xml__tests__empty_result.snap
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| source: pact_verifier_cli/src/reports/xml.rs | ||
| expression: "to_xml(&VerificationExecutionResult::new(), \"My Provider\")" | ||
| --- | ||
| <report><provider>My Provider</provider><result>true</result></report> |
5 changes: 5 additions & 0 deletions
5
...reports/snapshots/pact_verifier_cli__reports__xml__tests__failing_with_body_mismatch.snap
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| source: pact_verifier_cli/src/reports/xml.rs | ||
| expression: "to_xml(&result, \"My Provider\")" | ||
| --- | ||
| <report><provider>My Provider</provider><result>false</result><errors><error><interaction>GET /foo returns 200</interaction><mismatch type="mismatches"><mismatches><mismatch type="StatusMismatch"><description>Expected status 200 but was 404</description><expected>200</expected><actual>404</actual></mismatch><mismatch type="BodyMismatch"><description>Expected 100 but got 200</description><expected>100</expected><actual>200</actual><path>$.price</path></mismatch></mismatches></mismatch></error></errors></report> |
5 changes: 5 additions & 0 deletions
5
...eports/snapshots/pact_verifier_cli__reports__xml__tests__failing_with_error_mismatch.snap
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| source: pact_verifier_cli/src/reports/xml.rs | ||
| expression: "to_xml(&result, \"My Provider\")" | ||
| --- | ||
| <report><provider>My Provider</provider><result>false</result><errors><error><interaction>GET /foo returns 200</interaction><mismatch type="error"><error_message>Connection refused</error_message><interaction_id>abc123</interaction_id></mismatch></error></errors><interaction_results><interaction><description>GET /foo returns 200</description><result>Error</result><pending>false</pending><duration_ms>5</duration_ms></interaction></interaction_results></report> |
5 changes: 5 additions & 0 deletions
5
...s/snapshots/pact_verifier_cli__reports__xml__tests__passing_result_with_interactions.snap
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| source: pact_verifier_cli/src/reports/xml.rs | ||
| expression: "to_xml(&result, \"My Provider\")" | ||
| --- | ||
| <report><provider>My Provider</provider><result>true</result><interaction_results><interaction><description>GET /foo returns 200</description><result>OK</result><pending>false</pending><duration_ms>42</duration_ms></interaction><interaction><description>POST /bar returns 201</description><result>OK</result><pending>false</pending><duration_ms>15</duration_ms></interaction></interaction_results></report> |
5 changes: 5 additions & 0 deletions
5
...ier_cli/src/reports/snapshots/pact_verifier_cli__reports__xml__tests__pending_errors.snap
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| source: pact_verifier_cli/src/reports/xml.rs | ||
| expression: "to_xml(&result, \"My Provider\")" | ||
| --- | ||
| <report><provider>My Provider</provider><result>true</result><pending_errors><error><interaction>GET /pending-foo returns 200</interaction><mismatch type="error"><error_message>Provider state setup failed</error_message></mismatch></error></pending_errors><interaction_results><interaction><description>GET /pending-foo returns 200</description><result>Error</result><pending>true</pending><duration_ms>3</duration_ms></interaction></interaction_results></report> |
5 changes: 5 additions & 0 deletions
5
...ifier_cli/src/reports/snapshots/pact_verifier_cli__reports__xml__tests__with_notices.snap
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| source: pact_verifier_cli/src/reports/xml.rs | ||
| expression: "to_xml(&result, \"My Provider\")" | ||
| --- | ||
| <report><provider>My Provider</provider><result>true</result><notices><notice><entry><key>text</key><value>This pact is being verified because it is the latest version</value></entry><entry><key>type</key><value>info</value></entry></notice></notices></report> |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.