Skip to content

Releases: agourlay/cornichon

0.13.2

06 Nov 12:25
Compare
Choose a tag to compare
  • apply retry time interval properly in EventuallyStep. The bug which applied the interval twice was introduced by the Task migration - fixed by e7d4306

  • experimental module can now run single scenario via test args - closes #156

  • enable to add query params and headers to GraphQL queries - fixed by 388ffee

  • usual micro-optimisations - fixed by b20e377

0.13.1

02 Nov 16:12
Compare
Choose a tag to compare
  • extraction of Json from the Session now requires an additional import
session.getJson("myKey")

becomes

import com.github.agourlay.cornichon.json.CornichonJson._
session.getJson("myKey")
  • HttpService.requestEffect can now ignore headers coming from the with-headers session key
http.requestEffect(
  request = HttpRequest.post("/oauth/token")
  ignoreFromWithHeaders = ByNames("Authorization" :: Nil)
)
  • @OlegIlyenko added the ability to focus on specific scenario during testing #158

0.13.0

13 Oct 12:41
Compare
Choose a tag to compare

Breaking changes

  • Session.addValue returns an Either instead of throwing 39889bd (Session.addValueUnsafe available for the previous behaviour)
  • WithHeaders does not destroy information anymore 5274c65

General improvements

  • execution engine now uses monix Task
  • introduction of an experimental http4s http client behind flag useExperimentalHttp4sClient. It does not yet support GZip and SSE.
  • new config knobs to ease debugging of requests
  traceRequests = false // by default
  warnOnDuplicateHeaders = false // by default
  failOnDuplicateHeaders = false // by default
  addAcceptGzipByDefault = false // by default
  • and as always various error reporting and performance improvements :)

Experimental module not depending on Scalatest

  • catch errors happening during Feature initialization
  • honor beforeEach and afterEach
  • honor executeScenarioInParallel configuration
  • deterministic resources cleanup without brittle scheduler

0.12.7

25 Aug 15:14
Compare
Choose a tag to compare
  • introduction of ResourceStep to manage resources created within a scenario #147 thanks to @rjsvaljean

  • various improvements to datatables most notably it now handles empty cells #152 thanks to @OlegIlyenko

  • remove a couple of unsafe of methods to encourage moving away from exceptions as the steps can now be easily defined using Either 611d009

  • http-mock module now uses http4s instead of akka-http #130

0.12.6

14 Aug 05:39
Compare
Choose a tag to compare
  • fixes bug that was causing logs of different scenarios to be interleaved #143
  • accepts custom matcher registration #134
  • in case of session key not found, list similar keys in session with an edit distance of one #144
  • creates dedicated error for error due to indice not found for session key
  • starts contribution guidelines 999926f
  • upgrades to akka 2.5.4
  • upgrades to scala 2.12.3
  • resolver DSL variable renamed to placeholderResolver for more clarity

0.12.5

19 Jul 13:38
Compare
Choose a tag to compare
  • fixing DSL compilation bug regarding Feature containing a single pending Scenario

  • session.addValues now takes a vargars argument instead of Seq. (contribution from @peter-gerhard)

  • introducing transform_session to the core DSL to modify session values.

And I transform_session("my-key")(_.toUpperCase)
  • improving the error reporting for Concurrently to show the number of failed runs.

0.12.4

19 Jun 10:56
Compare
Choose a tag to compare

This release contains a breaking change regarding ignored scenario.

  • In order to improve the documentation of ignored scenario, it is now necessary to provide a String reason, explaining why the scenario is disabled, through a new DSL. (thanks @peter-gerhard #132)
Scenario("title", ignored = true){
  ...
}

becomes

Scenario("title").ignoredBecause("Ignored for a good reason"){
  ...
}
  • New feature to mark a scenario as pending without steps definition. (1fc6bc1)
Scenario("a great test case to remember") pending
  • Introduces two new abstract step types, ValueStep and SimpleWrapperStep, to facilitate the creation of concrete steps (#131)

  • Resolves expectedString in JsonStepBuilder.containsString (cfdb67b)

  • Improves error reporting of Concurrently step by reporting how many tasks actually completed in case of timeout (e9e77fd)

"Concurrently block did not reach completion in time: 2/3 finished"
  • Improves diff. of ordered and unorder collection assertions (2f4bd2d)

  • Fix broken cornichon-experimental module due to wrong file fingerprint (c6c68aa)

  • Fix incomplete Session merging by doing a deep merge. (abbbab0)

  • Performance improvements mostly by removing unecessary allocations (aa42287, 31d4b6b, 3c5278f, a19acd2)

0.12.3 JsonPath array projection

07 Jun 14:51
Compare
Choose a tag to compare

This release does not contain breaking changes

JsonPath array projection

It is now possible to dive inside arrays using a projection on all values using * as indice.

And assert body.is(
     """
     {
       "name": "John",
       "brothers": [
         {
           "name" : "Paul",
           "hobbies" : [
             {
               "name" : "Karate",
               "level" : "Good"
             },{
               "name" : "Football",
               "level" : "Beginner"
             }
           ]
         },
         {
           "name": "Bob",
           "hobbies" : [
             {
               "name" : "Diving",
               "level" : "Good"
             },{
               "name" : "Reading",
               "level" : "Beginner"
             }
           ]
         }
      ]
    }""")

And assert body.path("brothers[*].hobbies[*].name").is(
        """
        [
          "Karate", "Football", "Diving", "Reading"
        ]
        """)

Misc.

  • WithDataInput data-table can now contain placeholders. 444ffb4
  • remove unecessary allocations. 5ecbb39

0.12.2 : hooks Before/AfterEachScenario uses DSL

23 May 14:09
Compare
Choose a tag to compare

This release contains a breaking change impacting users of BeforeEachScenario and AfterEachScenario.

  • Instead of a varargs, the hooks are now taking a Step expression similar to the main DSL. 8c37385

You can either pass a single regular Step or a WrapperStep like Attach.

Here is an examples with fictitious steps.

beforeEachScenario{
  Attach {
    Given I setup_server
    Then assert setup_successful
  }
}

afterEachScenario{
  Then I cleanup_resources
}
  • make placeholder parser more friendly with markup languages ae817e5

0.12.1 : Extract HTTP mocking in sub module

12 May 10:30
Compare
Choose a tag to compare

This release contains a breaking change impacting users of the HTTP mocking steps.

  • HttpListenTo is now shipped in the module cornichon-http-mock and requires to extend the HttpMockDsl trait to import the definition #125

  • performance improvements by reducing various memory allocations 38cbf37, c1878bd, 2d45414

  • remove a couple of unecessary implicit definitions from the Feature scope to try to speed up compilation time a7bdb3e

  • upgrade to akka 2.5.x serie 6ec0721