Fluent Commerce Logo
Docs
Essential knowledgeCore knowledge to understand Fluent Commerce

Changed on:

9 Nov 2026

Overview

[Warning: empty required content area]

Key points

[Warning: empty required content area]

Testing

Testing happens at four levels. Each one catches something the others miss.
LevelRunsCatches
Rule unit testsEvery push, in the module buildLogic errors in a single rule
Workflow checksEvery pushBroken workflow structure, rules referenced but not shipped
Post-deploy verificationAfter every deployA deploy that reported success but did not install what was built
Live end-to-endAfter deploying to devRules and workflows that misbehave together on a real account

Rule unit tests

Write JUnit 5 tests with the Fluent `util-test` library (`RuleExecutor`, mocked GraphQL responses, action assertions) and keep them next to the rules in the plugin reactor. They run inside `mvn package`, so a failing test stops the module build.
  • Enforce a coverage floor (for example with JaCoCo `check`) and raise it as coverage improves. Never lower it to get a build through.
  • Build multi-module reactors with `package`, not `test`. If the rules module unpacks JARs from other reactor modules, `mvn test` on a clean checkout fails before any test runs, because those JARs are only built during `package`.

Workflow checks

Workflows are JSON and can be checked without an account. Useful checks:
  • the file parses and matches the expected top-level structure,
  • every rule named in a workflow is either listed in `module.json` or provided by a reference module,
  • no ruleset names are duplicated, and no ruleset is unreachable,
  • rule names are fully qualified (`<ACCOUNT>.<module>.<RuleClass>`).
These checks take seconds and catch many of the problems that would otherwise appear only as a failed upsert at install time.

Post-deploy verification

See Verification and promotion. At minimum, confirm that the module version installed on the account is the version this pipeline built.

Live end-to-end tests

Unit tests mock the platform, so only a run against a real account shows that the deployed rules and workflows work together. Keep a suite of scenario cases in the repository (inbound payload in, expected entity states, events and outbound calls out) and run it against the dev account after each deploy.
  • Run against dev only, never UAT or production. UAT data usually belongs to the client's testers.
  • Create unique test data on every run (order refs with a run ID) so runs never collide or depend on earlier state.
  • Treat environment failures as failures. A case that fails because test data is missing is not a pass. Fix the data setup.
  • Gate the release, not the merge. End-to-end suites are slow and need an account, so run them after the dev deploy and require a green run before a release branch can go to UAT.