Skip to content

Conversation

@andreaTP
Copy link
Contributor

Description

WIP, this blog demonstrates step-by-step how to exercise JavaScript Dispatchers in Microcks.

TODO:

  • avoid having failures in the responses
  • have a meaningful image
  • full review

Signed-off-by: andreatp <andrea.peruffo1982@gmail.com>
@andreaTP andreaTP marked this pull request as ready for review September 18, 2025 15:09
@andreaTP
Copy link
Contributor Author

This should be ready for review.

@yada
Copy link
Member

yada commented Jan 17, 2026

@andreaTP very sorry, looks like we forgot this PR... :<
Let's review and take decisions on this one ;) @lbroudoux and @yada : TODO

@yada yada added the kind/enhancement New feature or request label Jan 20, 2026
Copy link
Member

@yada yada left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job, @andreaTP and my apologies for the delay :<
Please see the changes requested and let's merge, publish and advertise this asap ;)


* **Dynamic behavior** – responses vary depending on request context
* **Richer test scenarios** – simulate more realistic API flows
* **Fewer examples needed** – reuse existing payloads with smart logic
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And it finally works using the native image (not the case using Groovy), big plus ;)
ex from the release note (https://microcks.io/blog/microcks-1.13.0-release/):
"The integration of a JavaScript engine that lets you implement your own mock matching logic in a super user-friendly way - for both standard, uber, and native-compiled distributions of Microcks!"

app:
depends_on:
- mongo
image: docker.io/andreatp/microcks-1.13:PREVIEW
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can use the Microcks image now, I guess ;)


# Dynamic Mocking with JavaScript Dispatchers in Microcks

One of the most exciting new features introduced in **Microcks 1.13** is the ability to write **JavaScript dispatchers**.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, link the release note: https://microcks.io/blog/microcks-1.13.0-release/ on Microcks 1.13
and doc
https://microcks.io/documentation/explanations/dispatching/#javascript-scripting on JavaScript dispatchers

author: "Andrea Peruffo"
type: "regular"
description: "Announcing JavaScript dispatcher in Microcks 1.13"
draft: true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

draft : false
so we are ready to merge ;)

title: JavaScript dispatchers
date: 2025-09-29
image: "images/blog/js-dispatchers-banner.svg"
author: "Andrea Peruffo"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

---
title: JavaScript dispatchers
date: 2025-09-29
image: "images/blog/js-dispatchers-banner.svg"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you use the same size (around 1968x1312) as other blog posts, see examples:
https://microcks.io/blog/
and
https://github.com/microcks/microcks.io/blob/master/assets/images/blog/google-pubsub-emulator-usage-dojo-feature.png (see all -feature images)

Let me know if you need some help with the banner image.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes @yada , please, if you can share a banner image I'll be happy to integrate it, or just push on top of this branch 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants