Skip to content

0.8.0 : Circe

Compare
Choose a tag to compare
@agourlay agourlay released this 13 Jun 12:23
· 2896 commits to master since this release

This major version contains a couple of breaking changes which impact users relying on some helpers to build custom HTTP/JSON steps.

This migration should be transparent for users of the built-in steps through the DSL.

Breaking changes

  • The main topic of this release concerns the migration from Json4s + Spray-json to using solely Circe.
    • This change is visible if you rely on functions from CornichonJson and Session.getJson which now return Json objects instead of Jvalue.
  • The HttpService parameters received two changes
    • extractor is now designed as a data type instead of an Option. This change introduces a new feature, it is now possible to extract directly subpart of the response body using a Json path.
extractor = PathExtractor(path = "a.b.c[2].c", key = "my-key") 
  • expected renamed to expectedStatus for more clarity

New features

  • new bloc step WithDataInputs to repeat a series of steps with different inputs specified via a datatable.
WithDataInputs(
  """
    | a | b  | c  |
    | 1 | 3  | 4  |
    | 7 | 4  | 11 |
    | 1 | -1 | 0  |
  """
) {
  Then assert a_plus_b_equals_c   //custom step reading from session
}
  • add alias on BodyArrayAssertion isEmpty equivalent to hasSize(0)

Bug fixes

  • the Json path extraction was not 100% correct and could retrieve the wrong key - #38
  • errors occuring in afterEach were not properly aggregated - #75
  • build GraphQl payload only once

Misc

This release also contains various small improvements:

  • better log formatting
  • feedback regarding started scenario
  • documentation and examples