Skip to main content
TNB uses a flexible configuration system built on Eclipse MicroProfile Config that allows you to customize behavior through system properties, environment variables, and properties files.

Configuration hierarchy

TNB loads configuration from multiple sources with the following priority (highest to lowest):
1

test.properties file

Properties defined in a file specified by the test.properties system property (ordinal 500)
2

System properties

Java system properties passed via -D flags (ordinal 400)
3

Environment variables

OS environment variables (ordinal 300)
Values in test.properties take precedence over all other configuration sources, including system properties defined in your POM file or command line.

Using test.properties file

The most convenient way to configure TNB is through a test.properties file:
1

Create test.properties

Create a file named test.properties in your project root
2

Add your properties

test.use.openshift=true
test.credentials.file=~/credentials.yaml
openshift.kubeconfig=~/.kube/config
tnb.mongodb.image=mongo:7.0
3

Run your tests

The properties file is loaded automatically if named test.properties, or specify a custom location:
mvn test -Dtest.properties=/path/to/custom.properties

Core configuration properties

Test execution

Deploy services on OpenShift instead of locally with TestContainers.Type: boolean
Default: false
test.use.openshift=true
Deploy services on MicroShift (lightweight OpenShift).Type: boolean
Default: false
test.use.microshift=true
Default wait time for operations in seconds.Type: integer
Default: 60
test.wait.time=120
Timeout in minutes before forcefully killing operations.Type: integer
Default: 120
test.wait.kill.timeout=180
Skip cleanup after tests (useful for debugging).Type: boolean
Default: false
test.skip.teardown=true
Enable parallel test execution.Type: boolean
Default: false
test.parallel=true

OpenShift configuration

OpenShift cluster URL.Type: string
Required when: test.use.openshift=true
openshift.url=https://api.cluster.example.com:6443
OpenShift login username.Type: string
Default: admin
openshift.username=developer
OpenShift login password.Type: string
Default: admin
openshift.password=mypassword
Path to kubeconfig file for authentication.Type: string
Alternative to: username/password authentication
openshift.kubeconfig=~/.kube/config
Namespace to use for deployments.Type: string
Default: tnb-test-<random> (auto-generated)
openshift.namespace=my-test-namespace
Automatically set namespace based on current context.Type: boolean
Default: false
openshift.namespace.autoset=true
Delete namespace after tests complete.Type: boolean
Default: false (or true if namespace is auto-generated)
openshift.namespace.delete=true
Deployment strategy for applications.Type: string
Default: jkube
openshift.deploy.strategy=jkube
Label used to identify deployments.Type: string
Default: app
openshift.deployment.label=application
HTTPS proxy for OpenShift communication.Type: string
Default: null
openshift.https.proxy=http://proxy.example.com:8080

Application configuration

Maven group ID for test applications.Type: string
Default: com.test
test.app.group.id=com.mycompany
Version for test applications.Type: string
Default: 1.0.0-SNAPSHOT
test.app.version=2.0.0
Directory where application artifacts are built.Type: string
Default: target
test.app.location=build/libs
Template name for generated applications.Type: string
Default: tnb-app
app.template.name=my-custom-template
Enable debug mode for applications.Type: boolean
Default: false
tnb.app.debug=true
Debug port for remote debugging.Type: integer
Default: 5005
tnb.app.debug.port=8000

Maven configuration

Maven repository URL for dependencies.Type: string
test.maven.repository=https://repository.example.com/maven2
For mirror configuration:
test.maven.repository=https://mirror.example.com/maven2@mirrorOf=*
Repository ID for authentication.Type: string
Default: tnb-maven-repo
test.maven.repository.id=my-repo
Path to custom Maven settings.xml file.Type: string
test.maven.settings=/path/to/settings.xml
Name for generated Maven settings file.Type: string
Default: tnb-maven-settings.xml
test.maven.settings.file.name=custom-settings.xml
Additional Maven command-line arguments.Type: string
Default: “ (empty)
test.maven.extra.args=-X -DskipTests
Show Maven transfer progress.Type: boolean
Default: false
test.maven.transfer.progress=true

Additional properties

User identifier for test tracking.Type: string
Default: Current system user
tnb.user=jenkins-ci
Stream container/pod logs to console.Type: boolean
Default: false
stream.logs=true
Path to odo CLI binary.Type: string
Default: Auto-detected from PATH
odo.path=/usr/local/bin/odo
Apache Camel Kamelets version to use.Type: string
kamelets.version=0.9.0
Enable ReportPortal integration.Type: boolean
Default: false
test.report.portal.enabled=true

Service-specific properties

Each System-X service can be configured using properties in the format tnb.<service>.<property>. These are covered in detail in the Docker images section.

Reading configuration in code

Access configuration values programmatically:
import software.tnb.common.config.TestConfiguration;

// Get boolean property
boolean useOpenshift = TestConfiguration.isOpenshift();

// Get string property
String credentialsFile = TestConfiguration.credentialsFile();

// Get duration property
Duration waitTime = TestConfiguration.testWaitTime();

Example configurations

# Use TestContainers locally
test.use.openshift=false

# Load credentials
test.credentials.file=~/tnb-credentials.yaml

# Override specific service image
tnb.mongodb.image=mongo:7.0
tnb.kafka.image=confluentinc/cp-kafka:7.5.0

# Enable log streaming
stream.logs=true

Best practices

Use test.properties

Keep all configuration in a test.properties file instead of command-line arguments for better maintainability.

Environment-specific files

Create separate properties files for different environments (local, staging, production).

Version control

Add test.properties to .gitignore if it contains sensitive values. Use a test.properties.template as a reference.

Environment variables

Use environment variables for secrets in CI/CD pipelines instead of hardcoding in properties files.
Never commit credentials or sensitive information to version control. Use Vault, environment variables, or local credentials files that are gitignored.

Build docs developers (and LLMs) love