Skip to content

JsonUnit has been added#236

Merged
eroshenkoam merged 2 commits into
allure-framework:masterfrom
viclovsky:allure-jsonunit
Aug 23, 2018
Merged

JsonUnit has been added#236
eroshenkoam merged 2 commits into
allure-framework:masterfrom
viclovsky:allure-jsonunit

Conversation

@viclovsky
Copy link
Copy Markdown
Contributor

@viclovsky viclovsky commented Jul 23, 2018

[//]: # (
. Thank you so much for sending us a pull request!
.
. Make sure you have a clear name for your pull request.
. The name should start with a capital letter and no dot is required in the end of the sentence.
. To link the request with isses use the following notation: (fixes #123, fixes #321)
.
. An example of good pull request names:
. - Add Russian translation (fixes #123)
. - Add an ability to disable default plugins
. - Support emoji in test descriptions
)

Context

Allure integration for JsonUnit has been added.
JsonPatchMatcher is extension of JsonUnit matcher, that generates pretty html attachment for differences based on json diff patch.

Example was added. Screenshot is presented below.
allure report 2018-07-24 01-55-13
allure report 2018-07-24 01-57-00

Also added withRequestTemplate and withResponseTemplate to customise templates for rest-assured.

Checklist

Copy link
Copy Markdown
Member

@baev baev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job 👍

Comment thread allure-jsonunit/build.gradle Outdated
dependencies {
compile project(':allure-attachments')
compile('net.javacrumbs.json-unit:json-unit:2.0.0.RC1')
compile('com.google.code.gson:gson')
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we have jackson in deps, can we use it instead?

<html>
<head>
<meta http-equiv = "content-type" content = "text/html; charset=UTF-8">
<script type='text/javascript' src="https://cdn.jsdelivr.net/npm/jsondiffpatch/dist/jsondiffpatch.umd.min.js" charset="utf-8"></script>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets include minified version directly to template in order to make it work offline

overflow: auto;
}

#visualdiff {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use class selectors instead if possible

@eroshenkoam eroshenkoam merged commit 013c21b into allure-framework:master Aug 23, 2018
@eroshenkoam
Copy link
Copy Markdown
Member

ty! 👍

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

Successfully merging this pull request may close these issues.

Enum class cast exception when using varargs generic constant parameter in step

3 participants