You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To start the 2025 Year fresh, we're delighted to announce the release of the new series of our [Testcontainers](https://www.testcontainers.com)Modules 🧊!
12
-
[Microcks modules](https://testcontainers.com/modules/microcks) are language-specific libraries that enable embedding Microcks into your unit tests with lightweight,
13
-
throwaway instances thanks to containers.
11
+
To start the 2025 Year fresh, we're delighted to announce the release of the new series of our [Testcontainers](https://www.testcontainers.com)
12
+
Modules 🧊! [Microcks modules](https://testcontainers.com/modules/microcks) are language-specific libraries that enable embedding Microcks into
13
+
your unit tests with lightweight, throwaway instances thanks to containers.
14
14
15
15
The `0.3` series is a major step forward that completes the set of features and elevates Microcks as **a fully featured mocking library for development purposes**.
16
-
It can be used with different testing styles (classicist, mockist, state-based, and interaction-based) and provides features for all major languages and all kinds of API!
16
+
It can be used with different testing styles (classicist, mockist, state-based, and interaction-based) and provides features for all major
<divalign="center"style="padding-bottom: 40px"><legend><small><i>Photo by Alexandre Boucey on Unsplash</i></small></legend></div>
20
21
21
22
The `0.3` versions are coincident releases made last week on the three main languages we currently support: [Java ☕️](https://github.com/microcks/microcks-testcontainers-java),
22
23
[NodeJS/Typescript](https://github.com/microcks/microcks-testcontainers-node) and [Golang](https://github.com/microcks/microcks-testcontainers-go).
23
-
With those new releases, we now have complete feature parity among the three different technology stacks! We plan to add the same features to the upcoming
24
-
[.NET module](https://github.com/microcks/microcks-testcontainers-dotnet) that we added to our portfolio in December 2024.
24
+
With those new releases, we now have complete feature parity among the three different technology stacks! We plan to add the same features to
25
+
the upcoming [.NET module](https://github.com/microcks/microcks-testcontainers-dotnet) that we added to our portfolio in December 2024.
25
26
26
27
Let's introduce the new features of those releases that complete the picture!
27
28
28
29
## What's inside?
29
30
30
31
#### 1️⃣ Interaction checks
31
32
32
-
If you spend some time reading about unit Test Driven Development, you may know that it exists two main school of thoughts: the *Classicist* and the *Mockist*.
33
+
If you spend some time reading about Test Driven Development, you may know that it exists two main school of thought: the *Classicist* and the *Mockist*.
33
34
(more on this in [this excellent article](https://medium.com/@adrianbooth/test-driven-development-wars-detroit-vs-london-classicist-vs-mockist-9956c78ae95f))
34
35
35
36
Until now, Microcks Testcontainers integration was *Classicist* in the sense that it was focused on providing canned responses when the mocks
36
37
endpoints were called. With this `0.3` release, we now also have a *Mockist* approach in the case you want to check the interactions of your
37
38
component under test with a dependant API.
38
39
39
-
You can now call `verify()` or `getServiceInvocationsCount()` on a Microcks container to check an API dependency has actually been called - or not.
40
-
This is a super powerful way to ensure that your application logic (when to interact with an API) and access policies (caching, no caching, etc.) are correctly
41
-
implemented and use the mock endpoints only when required!
40
+
You can now call `verify()` or `getServiceInvocationsCount()` on a Microcks container to check whether an API dependency has actually been
41
+
called - or not. This is a super powerful way to ensure that your application logic (when to interact with an API) and access policies (caching,
42
+
no caching, etc.) are correctly implemented and use the mock endpoints only when required!
@@ -48,17 +49,17 @@ A big shout out to [pierrechirstinimsa](https://github.com/pierrechristinimsa)
48
49
#### 2️⃣ Access to `messages` in synchronous API contract-testing
49
50
50
51
The second thing we added in this release is the ability to retrieve exchanged messages when doing contract-testing. Different
51
-
[contract-testing runners](https://microcks.io/documentation/references/test-endpoints/#test-runner) already exists in Microcks but they're mainly focused on
52
-
**syntactical conformance** checking. However, we know that there are [multiple levels of contract testing](https://medium.com/@lbroudoux/different-levels-of-api-contract-testing-with-microcks-ccc0847f8c97).
52
+
[contract-testing runners](https://microcks.io/documentation/references/test-endpoints/#test-runner) already exists in Microcks but they're
53
+
mainly focused on **syntactical conformance** checking. However, we know that there are [multiple levels of contract testing](https://medium.com/@lbroudoux/different-levels-of-api-contract-testing-with-microcks-ccc0847f8c97).
53
54
54
-
The new `getMessagesForTestCase()` function on Microcks container allows you to retrieve the requests and responses that were used during an operation tests case.
55
-
You can then use them to perform extra checks more related to **business conformance**; validating, for example, that data retrieval or transformation logic is
56
-
correctly implemented.
55
+
The new `getMessagesForTestCase()` function on Microcks container allows you to retrieve the requests and responses that were used during an
56
+
operation tests case. You can then use them to perform extra checks more related to **business conformance**; validating, for example, that
57
+
data retrieval or transformation logic is correctly implemented.
These extra checks can be done *manually* directly in the programming language of your tests but you can also delegate them
61
-
to frameworks like [Cucumber](https://cucumber.io/)for running acceptance tests, written in plain language by business experts!
62
+
to frameworks like [Cucumber](https://cucumber.io/)which are written in plain language by business experts; for running acceptance tests!
62
63
63
64
64
65
#### 3️⃣ Access to `events` in asynchronous EDA contract-testing
@@ -84,18 +85,17 @@ events were not sent at the right time, introducing de-synchronization and colli
84
85
## Enthusiastic?
85
86
86
87
We hope this walkthrough has made you enthusiastic about this new set of features in Microcks Testcontainers `0.3`! The best thing is that you don't have
87
-
to wait another Microcks release to test them out as thy're are leveraging APIs and features that are present for a long time in Microcks core!
88
+
to wait another Microcks release to test them out as they're are leveraging APIs and features that are present for a long time in Microcks core!
88
89
89
90
If you want to learn them and see them in action, we have completed our demonstration application and tutorials on Testcontainers Modules as well!
90
91
You just have to check the following links:
91
92
92
-
***For Java ☕️:**[How to check the mock endpoints are actually used?](https://github.com/microcks/microcks-testcontainers-java-spring-demo/blob/main/step-4-write-rest-tests.md#-bonus-step---check-the-mock-endpoints-are-actually-used), [How to verify the business conformance of a synchronous API](https://github.com/microcks/microcks-testcontainers-java-spring-demo/blob/main/step-4-write-rest-tests.md#-bonus-step---verify-the-business-conformance-of-order-service-api-in-pure-java), and [How to verify the event content for an asynchronous API](https://github.com/microcks/microcks-testcontainers-java-spring-demo/blob/main/step-5-write-async-tests.md#-bonus-step---verify-the-event-content)
93
+
***For Java ☕️:**[How to check the mock endpoints are actually used](https://github.com/microcks/microcks-testcontainers-java-spring-demo/blob/main/step-4-write-rest-tests.md#-bonus-step---check-the-mock-endpoints-are-actually-used), [How to verify the business conformance of a synchronous API](https://github.com/microcks/microcks-testcontainers-java-spring-demo/blob/main/step-4-write-rest-tests.md#-bonus-step---verify-the-business-conformance-of-order-service-api-in-pure-java), and [How to verify the event content for an asynchronous API](https://github.com/microcks/microcks-testcontainers-java-spring-demo/blob/main/step-5-write-async-tests.md#-bonus-step---verify-the-event-content)
93
94
94
95
***For NodeJS/TypeScript:**[How to check the mock endpoints are actually used](https://github.com/microcks/microcks-testcontainers-node-nest-demo/blob/main/step-4-write-rest-tests.md#-bonus-step---check-the-mock-endpoints-are-actually-used), [How to verify the business conformance of a synchronous API](https://github.com/microcks/microcks-testcontainers-node-nest-demo/blob/main/step-4-write-rest-tests.md#-bonus-step---verify-the-business-conformance-of-order-service-api-in-pure-java), and [How to verify the event content for an asynchronous API](https://github.com/microcks/microcks-testcontainers-node-nest-demo/blob/main/step-5-write-async-tests.md#-bonus-step---verify-the-event-content)
95
96
96
97
***For Golang:**[How to check the mock endpoints are actually used](https://github.com/microcks/microcks-testcontainers-go-demo/blob/main/step-4-write-rest-tests.md#-bonus-step---check-the-mock-endpoints-are-actually-used), [How to verify the business conformance of a synchronous API](https://github.com/microcks/microcks-testcontainers-go-demo/blob/main/step-4-write-rest-tests.md#-bonus-step---verify-the-business-conformance-of-order-service-api-in-pure-java), and [How to verify the event content for an asynchronous API](https://github.com/microcks/microcks-testcontainers-go-demo/blob/main/step-5-write-async-tests.md#-bonus-step---verify-the-event-content)
97
98
98
-
As usual, we’re eager for community feedback: come and discuss on our [Discord chat](https://microcks.io/discord-invite/)🐙
99
+
As usual, we’re eager for community feedback: come and discuss on our [Discord chat](https://microcks.io/discord-invite/)👻
Copy file name to clipboardExpand all lines: content/documentation/references/container-images.md
+21-7Lines changed: 21 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ draft: false
3
3
title: "Container Images"
4
4
date: 2024-05-13
5
5
publishdate: 2024-05-13
6
-
lastmod: 2024-12-06
6
+
lastmod: 2025-01-13
7
7
weight: 1
8
8
---
9
9
@@ -166,10 +166,17 @@ You can then extract the `logIndex` and connect to [Rekor](https://search.sigsto
166
166
All our images are built with a [SLSA Provenance](https://slsa.dev/spec/v1.0/provenance#v02) attestation (currently in `v0.2`). This attestation is attached as a layer of a
167
167
metadata manifest of the main image index.
168
168
169
-
As Microcks images are provided for `linux/amd64` and `linux/arm64` architectures, the 2 first manifests of an image index are reserved for these architectures. Then, starting
170
-
at index 2 come the metadata manifests from where you can extract attestations that are formatted as [in-toto predicates](https://github.com/in-toto/attestation/tree/v1.0/spec/predicates).
169
+
You can quickly inspect the `Provenance` attestations value using the `imagestools inspect` tool from `docker`like this:
171
170
172
-
For example: you can extract the Provenance of the `microcks:nightly` image using those commands - using [ORAS](https://oras.land/) utility:
If you need to get access to the raw [in-toto predicates](https://github.com/in-toto/attestation/tree/v1.0/spec/predicates), you can use a tool like [ORAS](https://oras.land/) utility.
176
+
177
+
As Microcks images are provided for `linux/amd64` and `linux/arm64` architectures, the 2 first manifests of an image index are reserved for these architectures. Then, starting
178
+
at index 2 come the metadata manifests from where you can extract in-toto attestations. For example: you can extract the Provenance of the `microcks:nightly` image using those
@@ -257,10 +264,17 @@ You can find in the attestation the GitHub source and revision, the base image u
257
264
258
265
All our images are built with a [SPDX SBOM](https://spdx.dev/) attestation (currently in `v2.3`). This attestation is attached as a layer of a metadata manifest of the main image index.
259
266
260
-
As Microcks images are provided for `linux/amd64` and `linux/arm64` architectures, the 2 first manifests of an image index are reserved for these architectures. Then, starting
261
-
at index 2 come the metadata manifests from where you can extract attestations that are formatted as [in-toto predicates](https://github.com/in-toto/attestation/tree/v1.0/spec/predicates).
267
+
You can quickly inspect the `Provenance` attestations value using the `imagestools inspect` tool from `docker`like this:
If you need to get access to the raw [in-toto predicates](https://github.com/in-toto/attestation/tree/v1.0/spec/predicates), you can use a tool like [ORAS](https://oras.land/) utility.
262
274
263
-
For example: you can extract the SBOM of the `microcks-postman-runtime:nightly` image using those commands - using [ORAS](https://oras.land/) utility:
275
+
As Microcks images are provided for `linux/amd64` and `linux/arm64` architectures, the 2 first manifests of an image index are reserved for these architectures. Then, starting
276
+
at index 2 come the metadata manifests from where you can extract in-toto attestations. For example: you can extract the SBOM of the `microcks-postman-runtime:nightly` image
0 commit comments