Skip to main content
The TNB Fuse Products module provides a comprehensive framework for testing Apache Camel integrations across multiple products and deployment environments. This module handles both local machine testing and OpenShift deployments with a consistent API.

What is Camel integration testing?

Camel integration testing in TNB allows you to:
  • Write integration tests once and run them across multiple Camel products
  • Test locally during development and on OpenShift for production validation
  • Generate integration code dynamically from route builders
  • Customize integrations per product while maintaining common test logic
  • Deploy integrations using various strategies (JKube, Binary, Devfile, etc.)

Core concepts

The module covers two main areas for each supported product:

Deployment

Deploying and undeploying products where applicable. This includes:
  • Local deployment using Maven and JVM processes
  • OpenShift deployment using multiple strategies
  • Resource management and cleanup

Integrations

Creating, starting, and stopping integrations:
  • Integration code is generated from “meta” IntegrationBuilder classes
  • Customizers allow product-specific modifications
  • Uses JavaParser framework for code transformation

How it works

1

Define your route builder

Create a Camel RouteBuilder class with your integration logic.
2

Build the integration

Use an IntegrationBuilder to configure your integration, add dependencies, and apply customizers.
3

Deploy

Create a product instance using ProductFactory and deploy your integration.
4

Test

Run your test assertions against the deployed integration.
5

Cleanup

The framework automatically cleans up resources after tests.

Key features

Product abstraction

Write tests that work across Camel Quarkus, Camel Spring Boot, and CXF Quarkus without modification.

Code generation

Integration code is parsed and transformed at runtime:
  • Nested classes are extracted and made public
  • Final fields are inlined with their values
  • Internal TNB imports are removed
  • Package names are rewritten

Flexible deployment

Choose your deployment strategy based on your needs:
  • Local: Fast development iteration
  • JKube: Standard OpenShift deployment
  • Binary: Binary S2I builds
  • Devfile: Dev Spaces compatible deployments
  • Custom: Implement your own strategy

JUnit 5 integration

All products implement JUnit 5 extensions for seamless test integration:
import software.tnb.product.ProductFactory;
import org.junit.jupiter.api.extension.RegisterExtension;

public class MyIntegrationTest {
    @RegisterExtension
    public static Product product = ProductFactory.create();
    
    // Your tests here
}
The correct product instance is determined based on system properties:
  • fuse.product: Specifies the product (camelspringboot, camelquarkus)
  • openshift.url: Determines local vs OpenShift deployment

Next steps

Supported products

Learn about Camel Quarkus, Spring Boot, and CXF Quarkus support

Integration builders

Build and configure your integrations

Customizers

Apply product-specific customizations

Deployment strategies

Deploy to OpenShift using various strategies

Build docs developers (and LLMs) love