All Versions
Latest Version
Avg Release Cycle
69 days
Latest Release
1344 days ago

Changelog History
Page 1

  • v0.19.5 Changes

    October 15, 2020

    πŸ†• new features and improvements

    • πŸ”¦ Exposed body_raw to assert non JSON bodies (#421) @agourlay

      And assert body_raw.containsString("xml")

    • πŸ”¨ Optimization & refactoring of BodyElementCollectorMacro (#416) @agourlay

      • runs faster at compile time
      • generates better code for runtime
      • decrease allocations via (#413) @agourlay

    πŸ› bug fixes

    ⚑️ dependency updates

  • v0.19.4 Changes

    July 31, 2020

    πŸ†• new features and improvements

    • Introduce compareWithPreviousValue for Json and String session_value using an Assertion (#396, #394) @agourlay

      And assert session_value("my-key").asJson.path("product.price").compareWithPreviousValue[Int] { case (prev, current) => LessThanAssertion(prev, current) }And assert session_value("my-key").compareWithPreviousValue { case (prev, current) => LessThanAssertion(prev.length, current.length) }

    • βž• Add JsonPath support to JsonValuesStep (#395) @agourlay

      And assert session_values("k1", "k2").asJson.path("a.b.c").areEquals

    πŸ‘Œ Improve error reporting for cornichon-http-mock (#393) @agourlay

    πŸ“š Split cornichon-check documentation in several pages for readability 410dcc5 @agourlay

    πŸ› bug fixes

    • πŸ›  Fix error message in cornichon-check for invalid transition definition 610e914 @agourlay

    ⚑️ dependency updates

  • v0.19.3 Changes

    July 13, 2020

    πŸ†• new features and improvements

    • πŸ”§ Introduce scenarioExecutionParallelismFactor configuration (#385) @agourlay
      • the default behaviour is unchanged

    πŸ› bug fixes

    ⚑️ dependency updates

  • v0.19.2 Changes

    June 26, 2020

    πŸ†• new features and improvements

    • βœ… Use a more precise Scalatest dependency in cornichon-scalatest 74fbf80
    • 🐎 Various performance improvements:
      • save_body_path parses session value only once
      • optimise DataTable rendering
      • reduce allocations across the board

    πŸ› bug fixes

    • 0️⃣ Do not override Content-Type by default #377

    ⚑️ dependency updates

  • v0.19.1 Changes

    May 26, 2020

    πŸ†• new features and improvements

    πŸ› bug fixes

    ⚑️ dependency updates

  • v0.19.0 Changes

    February 11, 2020

    πŸ’₯ breaking changes

    🚚 the cornichon-check module has been moved into cornichon-core

    • no need to mix with CheckDsl anymore

    - generators moved to com.github.agourlay.cornichon.core

    RandomContext does not expose its scala.util.Random object anymore.

    πŸ†• new features and improvements

    cross compiled to scala 2.13

    πŸ— main runner for cornichon-test-framwork to execute tests without SBT

    Usage: cornichon-test-framework --packageToScan <string> [--featureParallelism <integer>] [--seed <integer>] [--scenarioNameFilter <string>]
    Run your cornichon features without SBT.
    Options and flags:
            Display this help text.
        --packageToScan <string>
            Package containing the feature files.
        --reportsOutputDir <string>
           Output directory for junit.xml files (default to current).
        --featureParallelism <integer>
            Number of feature running in parallel (default=1).
        --seed <integer>
            Seed to use for starting random processes.
        --scenarioNameFilter <string>
            Filter scenario to run by name.

    introduce <scenario-unique-number> and <global-unique-number> placeholder generators.

    πŸ‘Œ improve error reporting for Matcher pointing to nothing

    πŸ‘‰ show initial request in case of status error assertion

    gql.withVariables can use different json encoders for each variable #278 by @yanns

    ⚑️ dependency updates

    • cats 2.1.0
    • http4s 0.21.0
    • circe 0.13.0
    • monix 3.1.0
    • pure-config 0.12.2
  • v0.18.1 Changes

    September 04, 2019

    πŸš€ This release contains minor change around the global configuration file.

    βœ… e.g for a file /src/test/resources/reference.conf

    cornichon {
      executeScenariosInParallel = false
      traceRequests = false 
      warnOnDuplicateHeaders = true
      failOnDuplicateHeaders = false
      disableCertificateVerification = true

    πŸ’₯ breaking change

    • baseUrl has been renamed to globalBaseUrl for more clarity
      • baseUrl can still be defined at the Feature level otherwise it falls back to globalBaseUrl

    πŸ‘Œ improvement

    πŸ”§ introduce a new configuration field named disableCertificateVerification to interact with servers with malformed certificate.

    - false by default.

    πŸ›  fix addAcceptGzipByDefault configuration field which was not working properly

    • true by default

    ⚑️ dependency updates

    • Monix 3.0.0-RC5
  • v0.18.0 Changes

    August 29, 2019

    πŸš€ There are quite a few breaking changes in this release, however it should only impact users who are:

    • defining custom steps
    • using the cornichon-kafka module

    🍱 If you are only using the built-in DSL you should be fine 🀞

    🍱 Deterministic tests 🎲

    πŸš€ The goal of this release is to have deterministic runs via a fixed seed.

    class DeterministicFeature extends CornichonFeature { override lazy val seed: Option[Long] = Some(1L) def feature =Feature("demo deterministic feature") { Scenario("always the same") { Given I save("my-uuid" -\> "\<random-uuid\>") Then assert session\_value("my-uuid").is("bb1ad573-19b8-9cd8-68fb-0e6f684df992") } } } 

    πŸ‘€ This test will be valid as long as the fixed seed stays the same.

    πŸ‘€ It is also possible to pass the seed via a command argument and not change the code (only in cornichon-test-framework).

    testOnly *DeterministicFeature -- "always the same" "--seed=1"

    πŸ‘€ On a failure the initial seed will be provided in the error reporting, enabling you to replay the exact same test even if it contains a source of randomness such as:

    • randomized placeholders (random-uuid, random-string, random-boolean etc.)
    • cornichon-check value generators & transitions
    • custom steps using ScenarioContext.randomContext
    • RandomMapper as extractor

    πŸ’₯ breaking changes

    EffectStep and Assertion steps now consume a ScenarioContext instead of a Session.

    example for the effect field:

    effect: Session⇒ Either[CornichonError, Session] effect: ScenarioContext ⇒ Either[CornichonError, Session]

    ScenarioContext is a new concept encapsulating all the states of a given scenario.

    trait ScenarioContext { val randomContext: RandomContextval session: Session// uses randomContext to resolve randomized placeholdersdef fillPlaceholders(input: String): Either[CornichonError, String] }

    πŸš€ disclaimer: mutation still exists within RandomContext - it will be tackled in a future release.

    placeholderResolver is now gone, to resolve placeholders use fillPlaceholders in the ScenarioContext .

    the underlying Step contract was changed to accommodate the propagation of state.

    trait Step { def run(engine: Engine)(initialRunState: RunState): Task[(RunState, FailedStep Either Done)] }


    trait Step { val stateUpdate: StateT[Task, RunState, FailedStep Either Done] def runStep(runState: RunState): Task[(RunState, FailedStep Either Done)] = }

    πŸ“œ CornichonJson.parseJsonUnsafe has been renamed to CornichonJson.parseDslJsonUnsafe .

    aDslJson String can either represent:

    - a JSON object
    - a JSON array
    - a JSON string
    - a datatable

    πŸ“œ If you want to parse regular JSON use CornichonJson.parseString .

    🚚 RandomContext was moved to com.github.agourlay.cornichon.core.RandomContext .

    various changes to the cornichon-kafka DSL #244 .

    0️⃣ Gzip is now enabled by default.

    0️⃣ http4s client is now the default http client, replacing akka-http client.

    • The configuration line useExperimentalHttp4sClient must be removed if you were using it as experimental client.

    - the akka dependency has been removed completely.

    πŸ‘€ check_model does not take a seed as an input anymore.

    πŸ‘Œ improvements

    πŸ‘€ deterministic run via fixed seed on the feature and command line argument.

    πŸ†• new matcher on JSON body to check that a field is present and not null.


    🀑 the noisy stack trace appearing when shutting down servers in cornichon-http-mock is now gone.

    πŸ› bug fixes

    ⚑️ dependency updates

    • scala 2.12.9
    • http4s 0.20.10
    • pureConfig 0.11.1
    • monix 3.0.0-RC3
    • βœ… scalatest 3.0.8
    • caffeine 2.780
    • parboiled 2.1.8
    • 🚚 akka-http has been removed
  • v0.17.1 Changes

    May 07, 2019

    πŸ’₯ breaking changes

    • header assertions are now case-insensitive on the field name

    The following assertions are now equivalent"X-Served-Config").isPresent"x-served-config").isPresent
    • πŸš€ ResourceStep renamed to ScenarioResourceStep to clarify that resources are released at the end of a scenario

    πŸ‘Œ improvements

    • andThen on Step to offer a simpler chain API

      def chain(others: Session β‡’ List[Step]): Stepdef andThen(others: List[Step]): Stepdef andThen(other: Step): Step

    πŸ› bug fixes

    • http4s error with debug level #228

    ⚑️ dependency updates

    • http4s 0.20.0
    • βœ… scalatest 3.0.7
    • akka-http 10.1.8
    • caffeine 2.7.0
    • parboiled 2.1.6
  • v0.17.0 Changes

    February 19, 2019

    βœ… Property based testing support

    πŸš€ This is the big new feature of that release, a brand-new module to enable property based testing of HTTP API

    βœ… It offers two flavors of testing, the classical forAll approach and a way to explore API interactions randomly.

    πŸ“š For more information please refer to the documentation of the cornichon-check module:

    πŸš€ The release also contains the usual batch of breaking changes and improvements.

    πŸ’₯ Breaking changes

    DebugStep now requires an explicit title

    🚚 ResourceStep was moved to com.github.agourlay.cornichon.steps.wrapped.ResourceStep

    RepeatConcurrently has an additional parallelism parameter to work as a stream processor.

    In the following example, the nested block will be executed 500 times by groups of 10 in a streaming fashion.

    RepeatConcurrently(times = 500, parallelism = 10, maxTime = 10.seconds) { Given I get("") Then assert }
 now returns an Option

    • None instead of JNull if the path is not present

    - use JsonPath.runStrict to return an error if absent

    The json body assertions are not conflating a null field with an absent field anymore.

    given the following response body
    { β€œdata” : null }

    in 0.16.x

    body.path(β€œdata”).isAbsent is correct
    body.path(β€œdata”).isPresent is incorrect

    in 0.17.x
    body.path(β€œdata”).isAbsent is incorrect
    body.path(β€œdata”).isPresent is correct

    and additional matcher has been added for that case

    AttachStep/AttachAsStep now requires Session β‡’ List[Step] instead of a List[Step]

    - it enables FlatMap-like behavior.

    EffectStep.chainEffects is gone because it promoted the direct usage of the effect function which breaks encapsulation and error reporting.

    • use AttachStep instead to bind steps together.

    πŸ‘Œ Improvements

    πŸ‘Œ improve error reporting and logging for cornichon-test-framework

    • the final message reported now contains the full log

    - ignored features will not create noise in the logs

    πŸ†• new cats.EffectStep which is not using Future but interop with the cats-effects Effect instead

    import com.github.agourlay.cornichon.steps.cats.EffectStepval myTaskEffect = EffectStep("identity task", s =\>
    • βž• add oscillation detection to Eventually in order to fail if the final successful state is not reached with oscillation of errors.

      Given I send_async_command_updating_search_indexEventually(maxDuration = 1.seconds, interval =, oscillationAllowed = false) { Given I search_for_new_state Then assert }

    πŸ‘€ Here, an oscillation could be seen in the status with something like 404 -> 500 -> 404 -> 200.
    βœ… The oscillation detector would fail the test because of the 404 oscillation.

    This flag can come in handy when dealing with eventually consistent system that should converge to a final state without oscillation.

    ⚑️ Dependency updates

    • monix 3.0.0-RC2
    • cats 1.6.0
    • circe 0.11.1
    • http4s 0.20.0-M5
    • πŸ”§ moved from ficus to PureConfig to manage configuration