agourlay/cornichon
55.8
Adequate · 7 November 2026
7.7k
lines of production code
Scala
primary language
4
measurements over time
What this system is
Features
Added JMH benchmark for Cornichon feature execution
A new JMH benchmark file (RunFeatureBench.scala) has been added to measure the throughput of running Cornichon features. The benchmark configures a test feature with 10 scenarios, each containing 100 steps that mix HTTP request effects and session assertions, allowing users to profile the performance of feature execution under load.
benchmarks/src/main/scala/feature · high confidence
HTTP mock server call verification steps
Users can now verify interactions with named HTTP mock servers using new DSL steps. The \received\_calls(count)\ step asserts that a specific mock server received an exact number of requests, while \received\_requests\ exposes the body of received requests for further inspection or assertion.
cornichon-http-mock/src/main/scala/com/github/agourlay/cornichon/http/steps · high confidence
Introduce standalone MainRunner with JUnit XML reporting
A new standalone runner (MainRunner) is added to the test framework, allowing users to execute Cornichon features directly from the command line without requiring SBT. This runner supports parallel feature execution, scenario filtering, and random seed configuration. It utilizes ClassGraph for feature discovery and generates JUnit XML reports for every scenario in a feature, ensuring detailed test results are available for CI/CD integration.
cornichon-test-framework/src/main/scala/com/github/agourlay/cornichon/framework · high confidence
Introduce structured JSON matcher system with built-in type checks
The matchers module now provides a structured, type-safe system for validating JSON fields. It includes a set of built-in matchers (such as isPresent, isNull, anyString, anyNumber, anyUUID, anyDate, etc.) that allow users to assert specific data types and formats in their tests. The system features a parser for defining custom matcher keys, a resolver that handles duplicate definitions, and an assertion engine that integrates with JSON paths to provide detailed error messages when validations fail.
cornichon-core/src/main/scala/com/github/agourlay/cornichon/matchers · high confidence
Introduction of EffectStep and DebugStep with cats-effect and Future support
Users can now define steps that execute asynchronous effects using either cats-effect IO or Scala Futures. The new EffectStep class in the regular steps package handles Future-based effects, while a parallel implementation in the cats package supports cats-effect IO, allowing integration with functional effect systems. Additionally, a new DebugStep is introduced to allow logging arbitrary messages derived from the scenario context, providing better visibility into test execution state.
cornichon-core/src/main/scala/com/github/agourlay/cornichon/steps/regular · high confidence
New HTTP mock server module with Ember and enhanced control features
The HTTP mock server has been extracted into a dedicated module (\cornichon-http-mock\) and rebuilt on http4s with the Ember server backend. This change introduces several new capabilities for users: the server now includes a \ResponseTiming\ middleware that exposes request duration in response headers, and it supports configurable response delays via a new \delayInMs\ endpoint. Error handling is improved by exposing 400 Bad Request and 500 Internal Server Error modes, allowing tests to simulate failure scenarios more accurately. Additionally, the server lifecycle is managed via \BlockScopedResource\ to ensure proper cleanup, and startup logic is hardened to retry port binding with delays and avoid masking non-bind errors behind generic exceptions.
cornichon-http-mock/src/main/scala/com/github/agourlay/cornichon/http/server · high confidence
New model-based property checking capabilities
Added new steps and engine components in the check module to support model-based testing. This includes the ForAllStep for running invariant checks across multiple generated values, and a full model-checking suite (CheckModelStep, CheckModelEngine, ModelRunner, PropertyN) that allows defining state machines with weighted transitions, pre/post-conditions, and invariants. The implementation validates transition definitions (e.g., rejecting negative weights or sums not equal to 100) and runs randomized property checks against the defined model.
cornichon-core/src/main/scala/com/github/agourlay/cornichon/steps/check · high confidence
Behavioural changes
Consolidated feature base trait with integrated DSLs
The test framework now provides a unified CornichonFeature trait that extends the base feature with core, HTTP, JSON, and check DSLs, simplifying test setup by removing the need to mix in multiple separate traits.
cornichon-test-framework/src/main/scala/com/github/agourlay/cornichon · high confidence
HTTP DSL restructured with http4s client and GraphQL support
The HTTP DSL has been rebuilt to use http4s as the default client, replacing the previous Akka-based implementation. This change introduces a new \HttpService\ and \HttpRequest\ model, enabling users to make HTTP requests via a cleaner, effect-based API. Additionally, native GraphQL support is now available through the \QueryGQL\ type and \query\_gql\ DSL step, allowing users to send GraphQL queries with variables and operation names. Response handling now includes dedicated steps for displaying headers and status codes on assertion failures, and the \WithHeaders\ mechanism has been refined to properly encode multiple headers in the session.
cornichon-core/src/main/scala/com/github/agourlay/cornichon/http · high confidence
HTTP mock functionality extracted to a dedicated module
The HTTP mock step and its underlying infrastructure have been moved from the core library into a new, separate module (cornichon-http-mock). This change introduces the HttpMockDsl trait, which provides the httpListen and HttpListenTo methods, allowing users to define and manage HTTP mock servers. This modularization decouples the mock server capabilities from the main cornichon core, potentially simplifying dependencies for users who do not require HTTP mocking features.
cornichon-http-mock/src/main/scala/com/github/agourlay/cornichon/http · high confidence
Introduce structured configuration and error handling in core engine
The core module now includes a new Config case class that loads and validates cornichon settings (such as parallel execution, timeouts, HTTP client options, and redirect handling) from a configuration source, rejecting unknown keys to prevent typos. A new CornichonError trait and associated error types (BasicError, StepExecutionError, hook errors) replace previous exception-based error handling, providing structured error reporting with cause chains. Additionally, new context classes (FeatureContext, ScenarioContext) and a RunState model centralize execution state, including random seed propagation, custom extractors, matchers, and log management, enabling more robust and traceable scenario execution.
cornichon-core/src/main/scala/com/github/agourlay/cornichon/core · high confidence
New DSL entry points and session history tracking
The DSL now exposes \Feature\ and \Scenario\ as direct methods for defining test structures, replacing the previous builder pattern. Session assertions have been enhanced with \session\_history(key).containsExactly\ to validate the full history of a session key, and \session\_value\ now supports \hasEqualCurrentAndPreviousValues\ and \hasDifferentCurrentAndPreviousValues\ for comparing state changes. Additionally, \session\_values(k1, k2)\ allows direct equality checks between two session keys.
cornichon-core/src/main/scala/com/github/agourlay/cornichon/dsl · high confidence
New HTTP client implementation using http4s Ember
The HTTP client layer has been replaced with a new implementation based on the http4s Ember client. This change introduces support for configurable HTTP/2, automatic gzip/deflate decompression, and redirect following, while also adding a URI cache to improve parsing performance. Users will now benefit from a more robust client with better memory management and support for Server-Sent Events (SSE).
cornichon-core/src/main/scala/com/github/agourlay/cornichon/http/client · high confidence
New HTTP header and status assertion steps with case-insensitive matching
Added HeadersSteps and StatusSteps to the HTTP testing DSL, allowing users to assert on response headers and status codes. Header assertions (is, hasSize, contain, name isPresent/isAbsent) are now case-insensitive for field names, aligning with HTTP standards, and provide detailed error messages showing actual headers when assertions fail. Status assertions support checking exact status codes or kinds (success, redirect, client error, server error), with improved error reporting that includes the response body, headers, and initial request description when a status mismatch occurs.
cornichon-core/src/main/scala/com/github/agourlay/cornichon/http/steps · high confidence
New and reworked step wrappers for control flow, resources, and data input
The \cornichon-core\ wrapped steps module has been significantly expanded and refactored to provide more robust control flow and resource management. New wrapper steps include \RepeatConcurrentlyStep\ (replacing the previous \ConcurrentlyStep\ to handle repeated parallel execution with parallelism limits), \RepeatDuringStep\ and \RepeatWithStep\ for time-based and collection-based iteration, and \RetryMaxStep\ for explicit retry logic. Resource handling is now more explicit with \WithResourceStep\ (scoped resource acquisition/release) and \ScenarioResourceStep\ (scenario-scoped resources), alongside \WithBlockScopedResource\ for block-level scoping. Data-driven testing is enhanced with \WithDataInputStep\ for JSON-based input tables. Control flow wrappers like \EventuallyStep\ (with improved error tracking and timeout handling), \WithinStep\ (with strict timeout enforcement), \FlatMapStep\, \AttachStep\, and \AttachAsStep\ have been rewritten or introduced to improve logging, session state management, and error reporting. These changes collectively offer users finer-grained control over step execution, better error visibility, and more predictable resource lifecycle management.
cornichon-core/src/main/scala/com/github/agourlay/cornichon/steps/wrapped · high confidence
Performance optimizations and Scala 3 compatibility in core utilities
The core utility modules have been refactored to improve performance and ensure compatibility with Scala 3. StringUtils now uses single-pass, low-allocation algorithms for string replacement and arrow-pair printing, avoiding intermediate string creation. TraverseUtils replaces recursive traversals with iterative loops to eliminate non-local returns, which are problematic in Scala 3, and optimizes handling of Lists and Vectors. Additionally, a new CirceUtil provides an encoder for FiniteDuration, supporting JSON serialization of time durations.
cornichon-core/src/main/scala/com/github/agourlay/cornichon/util · high confidence
Project license changed from MIT to Apache 2.0
The project's licensing terms have been updated from the MIT License to the Apache License, Version 2.0. This change is reflected in the LICENSE file and the updated README.md, which now displays the Apache 2.0 license badge and links to the full license text.
(repo-wide) · high confidence
Refactored JSON handling with dedicated parsing and path modules
The JSON core logic in cornichon-core has been reorganized into dedicated modules: CornichonJson handles DSL string dispatch (JSON, data tables, GraphQL, plain strings) and parsing; JsonPath and JsonPathParser manage JSON path navigation and removal with optimized cursor handling; JsonSteps provides the assertion DSL (is, isNot, equality, ordering) with support for ignored keys, whitelisting, and matchers; JsonDsl exposes the show\_key\_as\_json step; and error types are centralized in JsonErrors and JsonAssertionErrors. This refactoring improves performance, clarity, and error reporting for JSON assertions.
cornichon-core/src/main/scala/com/github/agourlay/cornichon/json · high confidence
Refactored assertion engine to use non-blocking IO and improved diff reporting
The assertion step implementation has been refactored to run on the compute pool using IO.delay, ensuring that assertion actions remain non-blocking and pure. The underlying assertion logic now uses a validated approach (cats.data.Validated) to aggregate errors, and the error reporting for collections and JSON has been improved with better diff outputs (including moved elements for ordered collections and JSON patches). Additionally, the assertion DSL now supports infix syntax for combining assertions (and, or, andAll).
cornichon-core/src/main/scala/com/github/agourlay/cornichon/steps/regular/assertStep · high confidence
Removed Akka dependency from core resources
The Akka-specific configuration has been removed from the core module's resources, as evidenced by the deletion of the \resource.conf\ file. This change aligns with the project's shift to decouple the core testing framework from Akka, allowing for broader test framework support in the future.
cornichon-core/src/main/resources · medium confidence
Replaced placeholder parser and introduced Mapper types for session resolution
The placeholder resolution mechanism in the core resolver has been reworked: the previous parser is replaced by a new \PlaceholderParser\ (using parboiled2) that extracts \Placeholder\ objects, and \PlaceholderResolver\ now resolves placeholders via a set of \PlaceholderGenerator\ instances (e.g., random-uuid, scenario-unique-number, global-unique-number) and a new \Mapper\ hierarchy (SimpleMapper, RandomMapper, SessionMapper, TextMapper, HistoryMapper, JsonMapper). This changes how placeholders are parsed and resolved, including faster paths when no placeholders are present and improved error reporting for mappers and session keys.
cornichon-core/src/main/scala/com/github/agourlay/cornichon/resolver · high confidence
Test coverage
1 commit adding/updating tests in cornichon-test-framework/src/test/scala/com/github/agourlay/cornichon/framework/discovery; 2 commits adding/updating tests in cornichon-test-framework/src/test/scala/com/github/agourlay/cornichon/framework; Added JMH benchmark for HTTP service request effects; Added JMH benchmarks for Check and JSON steps; Added JMH benchmarks for JSON parsing and placeholder resolution; Added JMH benchmarks for Session performance; Added SuperHeroes scenario tests for HTTP API and JSON assertions; Added benchmark for StringUtils.printArrowPairs; Added empty reference.conf for Cornichon test framework; Added empty reference.conf for cornichon namespace; Added empty test configuration file; Added example tests for scenario focus, feature ignoring, and unique number generation; Added math example scenarios and steps for the test framework; Added property-based and unit tests for JSON handling components; Added property-based and unit tests for StringUtils; Added property-based and unit tests for the PlaceholderResolver; Added property-based testing coverage for model checking and for-all steps; Added property-based testing examples for model checks and HTTP integration; Added property-based tests for matcher resolution and validation logic; Added scenario execution benchmark; Added super-heroes server example with GraphQL and SSE support; Added test examples for HTTP mock server capabilities; Added test helpers for scenario validation and property-based testing; Added tests for model transition probability and distribution logic; Added unit and property-based tests for core execution and session logic; Added unit tests for DSL components using Munit; Added unit tests for DebugStep and EffectStep error handling; Added unit tests for HTTP header, DSL, and client behavior; Added unit tests for assert step functionality; Added unit tests for wrapped step implementations.
Dependencies
Upgrade to Scala 3.9.0 and Java 17 bytecode target
The project has been upgraded to Scala 3.9.0, raising the minimum supported Scala version and dropping support for Scala 2.12 and 2.13. Additionally, the JVM bytecode target has been pinned to Java 17 (via \-java-output-version:17\), requiring a JDK 17+ runtime for compilation and execution.
(dependencies) · high confidence
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 54 → 56 (+1.9)
- Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.
Lenses
- Code Health 74 → 74 (+0.0)
- Architecture 83 → 82 (-1.3)
- Maturity 45 → 51 (+5.8)
- Readiness 52 → 50 (-1.8)
- Security 62 → 59 (-3.2)
- Performance 83 → 97 (+14.3)
Resolved (3)
- Documentation: no project overview (cornichon-docs/docs/property-based-testing/for-all.md)
- Off-boarding risk: anonymized user #1
- Outdated: io.github.classgraph:classgraph
New (2)
- Dependency hygiene PARTLY measured — sbt declarations read, dependency currency not (Maven Central unreachable)
- Off-boarding risk: anonymized user #1
Changes since last survey
- 10 commits — 9 feature/other, 1 fixes
By area
- (repo) — 4 commits
- cornichon-test-framework/src — 2 commits
- (root) — 1 commit
- .github/workflows — 1 commit
- cornichon-core/src — 1 commit
- project/build.properties — 1 commit
Notable commits
- fix: Fix flaky JsonSteps string properties
- change: Bump sbt/setup-sbt from 1.5.12 to 1.5.13
- change: Merge pull request #1072 from scala-steward/update/sangria-4.2.20
- change: Merge pull request #1073 from scala-steward/update/sbt-1.13.1
- change: Merge pull request #1075 from agourlay/update/classgraph-5.0.1
- change: Merge pull request #1076 from agourlay/dependabot/github_actions/sbt/setup-sbt-1.5.13
- change: Print a MainRunner replay command for scenarios run with MainRunner
- change: Update classgraph to 5.0.1
- change: Update sangria to 4.2.20
- change: Update sbt, scripted-plugin to 1.13.1
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
agourlay/cornichon was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 7 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 4d33a133a858839356095cf45498a8d09cbfa524 — the exact code this score is about.
- Scored under rubric-2026.11.2 — the same rubric and the same method as every other entry in this index.
- Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.3+preprod-5f8314471808.