Skip to content

Releases: agourlay/cornichon

0.16.1

18 Jun 12:55
Compare
Choose a tag to compare

Bug fixes

  • make sure nested steps of Eventually do not run forever 1f10307

New features

  • add isNot on session_value DSL 3dc9dbb

Improvements

  • improve error reporting when the underlying key of a JsonMapper is missing 145ebc1

  • decrease allocations in DSL's macro to improve compilation time e57a799

0.16.0

14 May 12:21
Compare
Choose a tag to compare

Artifacts renamed

  • cornichon to cornichon-scalatest
  • cornichon-experimental to cornichon-test-framework

This offers more clarity and flexibility in the choice of build tools.

For the ScalaTest flavor which integrates nicely with various build tools and CI pipeline:

// SBT
libraryDependencies += "com.github.agourlay" %% "cornichon-scalatest" % "0.16.0" % Test

For a more lightweight version without ScalaTest which works only with SBT and Mill:

// SBT
libraryDependencies += "com.github.agourlay" %% "cornichon-test-framework" % "0.16.0" % Test
testFrameworks += new TestFramework("com.github.agourlay.cornichon.framework.CornichonFramework")
// Mill
object test extends Tests{
  def ivyDeps = Agg(ivy"com.github.agourlay::cornichon-test-framework:0.16.0")
  def testFrameworks = Seq("com.github.agourlay.cornichon.framework.CornichonFramework")
}

Potential breaking changes

  • upgrade to akka 2.5 and akka-http 10.1.1

Improvements

  • various performance improvements
  • update internal dependencies to cats 1.x ecosystem

0.15.3

22 Feb 15:31
Compare
Choose a tag to compare

Bug fixes

  • Ignoring fields on JsonSteps will now also ignore the fields if they are present in the provided expected payload 9b7e530

0.15.2

09 Feb 16:18
Compare
Choose a tag to compare

Bug fix

  • fixes a regression introduced in 0.15.1 regarding ignored keys
body.ignoring("myKey")

If the key is not present, the whole body is ignored and the test fails. cd6d048

0.15.1

07 Feb 15:36
Compare
Choose a tag to compare

Bug fixes

  • Matchers can now be used as top level expected value 058f5d9
Then assert body.path("city").is("*any-string*")

New features

  • Three new ordering assertions exposed in the JsonDsl eda4a4d
  Then assert body.path("publisher").is(
     """
     {
       "name":"DC",
       "foundationYear":1934
     }
     """
  )

  Then assert body.path("publisher.foundationYear").isLessThan(1935)

  Then assert body.path("publisher.foundationYear").isGreaterThan(1933)

  Then assert body.path("publisher.foundationYear").isBetween(1933, 1935)
  • New assertion isNot added to the JsonDsl contributed by @matsluni #172

Known issue

  • a regression was introduced in this release regarding ignored keys

body.ignoring("myKey")

If the key is not present, the whole body is ignored and the test fails. It will be fixed shortly in 0.15.2

0.15.0

23 Jan 13:06
Compare
Choose a tag to compare

Breaking changes

  • Updated to the cats 1.0.x eco-system
cats   0.9.0 -> 1.0.1
circe  0.8.0 -> 0.9.1
http4s 0.17.6 -> 0.18.0-M8
monix  2.3.1 -> 3.0.0-M3
  • Akka dependency to 2.5.x is not hardcoded anymore but automatically pulled by akka-http for the time being

Bug fixes

  • WithHeaders now encodes properly headers when more than one is supplied 426fe0b

0.14.3

11 Jan 14:34
Compare
Choose a tag to compare

Breaking changes

  • The trait Dsl has been renamed to CoreDsl for more clarity.
  • AttachStep case class does not accept anymore a String for the step title as it was completely unused and misleading. Use AttachAsStep if you wish to name your step.

Bug fixes

  • Module cornichon-experimental reports the right scenario name in the report file.xml. 841ac2b

Features

0.14.2

21 Dec 14:54
Compare
Choose a tag to compare

Breaking changes

  • Concurrently has been renamed to RepeatConcurrently for more clarity. 1a54817

Bug fixes

  • Better error reporting when an import statement is placed within the DSL. #141

Features

  • Response status assertion errors now display the headers of the response. 131661d
  • Improvements to the experimental kafka module contributed by @kafis. #166
  • save_body_path now display pretty title in the logs. 4223a52
  • Various performance micro-optimisations accross the board. 17a9e24

0.14.1

01 Dec 16:01
Compare
Choose a tag to compare

Bug fix

  • JSON array contains assertion honors ignoringEach 970ce83

  • JsonPath array projection now always returns an array of result.
    The former behaviour was to return a single element if the projected array contained only a single element which is inconsistent. a5f0ebc

Feature

  • New cornichon-kafka experimental module contributed by @kafis #163

  • HTTP mock can now delay response on demand #162

0.14.0

20 Nov 11:23
Compare
Choose a tag to compare

There are no breaking changes in this release.

  • @cneijenhuis added dynamic port selection to http-mock #160.
  • @cneijenhuis added 400 status and custom response body to http-mock #159.
  • improve log output of ResourceStep.
  • propagate properly the cleanup steps from ResourceSteps throughout the entire run.
  • dedicated section for beforeEach steps in logs.
  • major refactoring of Scenario execution engine to improve its design and performance.
  • remove unecessary Session merging creating duplicate entries.
  • introduce on Step a flatMap like helper to chain steps using under the hood a new FlatMapStep.
def chain(others: Session  List[Step]): Step
  • avoid creating eagerly expensive messages for errors which can be recovered.
  • print_step now resolves placeholder in its message.