Skip to content

Releases: agourlay/cornichon

0.7.3 : Maintenance

03 May 09:04
Compare
Choose a tag to compare

Maintenance release upgrading internal dependencies and fixing the following issues.

  • throws a clearer error if a key is defined in both session and custom extractors.
  • scenario's title of wrapping blocks are now properly colored according to the output of the test.

A single breaking change to notice:

  • ignore has been renamed to ignoreEach on BodyArrayAsssertions
body.asArray.ignoringEach("a", "b")

0.7.2 : Maintenance

18 Apr 09:37
Compare
Choose a tag to compare

Maintenance release upgrading internal dependencies and fixing the following issues.

  • logs of blocks retrying series of steps such as Eventually and RetryMax will no longer display all failures in case of errors. In order to ease debugging, only the last failure will be shown with the number of retries.
  • scenario's logs are not longer prefixed by the logging output [INFO] making copy pasting easier.
  • fix hanging server-sent-event connection.

Two small additions :

  • add LogDuration block to display execution time of a series of steps.
  • add getHistory on Session to retrieve all values of a key.

One breaking change to notice:

  • following a major refactoring of the execution engine, the concrete step implementations now live in their own package.
import com.github.agourlay.cornichon.core.{AssertStep, EffectStep} 

into

import com.github.agourlay.cornichon.steps.regular.{AssertStep, EffectStep}

0.7.1 : Maintenance

11 Apr 09:00
Compare
Choose a tag to compare

Maintenance release upgrading internal dependencies and fixing the following issues.

  • new syntax to have keys containing '.' in the JSON path keys a.b.c.d.e
  • display full stacktrace for Initialization error
  • apply JsonPath on ArrayAssertion.is
  • improve title of ArrayAssertion.is
  • display content of malformed datatable in error
  • improve error reporting on HTTP timeout

Two small additions :

  • add getJsonOpt on Session
  • add helper query_gql to query GraphQL endpoint

0.7.0 : More blocks & less bugs

04 Apr 16:29
Compare
Choose a tag to compare

New features

  • new DSL blocks
    • Within(maxDuration) - execute a series of steps and fails if the execution does not complete within 'maxDuration'.
    • RepeatDuring(maxDuration) - repeating a series of steps during the period 'maxDuration'.
    • RetryMax(limit) - retry a series of steps until it succeeds or reaches the limit of retries.
    • Attach - can be used to reuse DSL blocks.
    • WithBasicAuth - simplify basic auth configuration.
  • add support for HEAD, PATCH and OPTIONS.
  • two new JSON Path assertions - "isPresent" and "isAbsent".
  • possibility to ignore a feature completely.

Bugs killed

  • cryptic error thrown if 2 scenarios have the same name.
  • cryptic error if JSON Path parsing fails.
  • better error reporting if a problem happens during the feature initialization.
  • placeholders within the "array.contains" assertion were not resolved.
  • URL query param can now be placed within the URL without using the "withParams" DSL helper.

Breaking changes

  • typed JSON Path using a dynamic trait are gone and only the String version can be used now.
    • root.a.b(2).c should be replaced by "a.b[2].c"
  • save_body_key replaced by save_body_path (a key was just a JSON Path with one key)

0.6.2 : Maintenance

03 Mar 14:03
Compare
Choose a tag to compare

Maintenance release upgrading internal dependencies and fixing the following bug.

  • JsonPath were not executed in combination with Json assertion using white listing

0.6.1 : Maintenance

17 Feb 10:10
Compare
Choose a tag to compare

Maintenance release upgrading internal dependencies and offering a new option for SSL configuration.

  • It is now possible to disable SSL hostname verification
akka {
  ssl-config{
    loose {
      disableHostnameVerification = true
    }
  }
}

0.6.0 : New HTTP DSL

10 Feb 19:07
Compare
Choose a tag to compare
  • RunnableStep is now split between EffectStep and AssertStep
    • EffectStep Session => Session : It runs a side effect and populates the Session with values.
    • AssertStep Sesssion => StepAssertion[A] : Describes the expectation of the test.

The migration is rather easy as EffectStep replace RunnableStep.effectful

  • New DSL for HTTP built-in steps using a fluent API
    • status.is(...)
    • body.is(...)
    • body.ignoring("key1", "key2").is(...)
    • body.path("key").is(...)
    • body.asArray.hasSize(n)
    • and a lot more see the examples

You can compose several segment to express exactly what you want

  • body.path(root.results).asArray.hasSize(1)
  • HTTP verbs are not capitalized anymore
    • When I get("/superheroes")
  • beforeEachScenario and afterEachScenario now take a varargs of Step

0.5.0 : JSON Path and GraphQL

27 Jan 16:20
Compare
Choose a tag to compare
  • improved support for JSON Path in built-in HTTP steps using a dynamic trait.
 And assert body(root.Episodes(0).Released, "2011-04-17")
  • support for GraphQL JSON input
And assert body(
  gql"""
  {
    name: "Batman",
    realName: "Bruce Wayne",
    hasSuperpowers: false
  }
  """)
  • simplify most of the HTTP steps name by removing the extra _is
    • status_is -> status
    • body_is -> body
    • body_array_size_is -> body_array_size
    • body_jsonpath_is -> body

This change is a preparation for the new DSL landing in 0.6.0 where is will come back as a method [https://github.com//issues/20]

  • several new utils built-in steps in the HTTP DSL