Skip to main content
The TestConfiguration class provides centralized configuration for test execution, credential management, Maven repository settings, and application properties. All configuration is done through system properties.

Property constants

Product configuration

test.product
string
required
The product type to test (e.g., CAMEL_QUARKUS, CAMEL_SPRINGBOOT)

Credentials and vault

test.credentials.file
string
Path to the credentials file
test.credentials
string
Direct credentials configuration
test.credentials.vault.token
string
Vault authentication token
test.credentials.vault.secret.id
string
Vault secret ID for AppRole authentication
test.credentials.vault.role.id
string
Vault role ID for AppRole authentication
test.credentials.vault.address
string
default:"https://vault.devshift.net"
Vault server address
test.credentials.vault.path.pattern
string
default:"/"
Pattern for constructing Vault secret paths

Application configuration

test.app.group.id
string
default:"com.test"
Maven group ID for the test application
test.app.version
string
default:"1.0.0-SNAPSHOT"
Version of the test application
test.app.location
string
default:"target"
Directory where the application is located or will be built
app.template.name
string
default:"tnb-app"
Name of the application template
tnb.app.debug
boolean
default:"false"
Enable remote debugging for the application
tnb.app.debug.port
integer
default:"5005"
Port for remote debugging

Test execution

test.wait.time
integer
default:"60"
Wait time in seconds for test operations
test.wait.kill.timeout
integer
default:"120"
Timeout in minutes before forcefully killing test processes
test.skip.teardown
boolean
default:"false"
Skip cleanup after test execution
test.skip.teardown.openshift.amqstreams
boolean
default:"false"
Skip cleanup of AMQ Streams resources on OpenShift
test.parallel
boolean
default:"false"
Enable parallel test execution
test.use.global.openshift.kafka
boolean
default:"false"
Use a global Kafka instance on OpenShift instead of per-test instances
stream.logs
boolean
default:"false"
Enable streaming logs during test execution

Maven configuration

test.maven.repository
string
Maven repository URL. Supports mirror syntax with @mirrorOf=
test.maven.settings
string
Custom Maven settings XML content
test.maven.settings.file.name
string
default:"tnb-maven-settings.xml"
Name of the generated Maven settings file
test.maven.repository.id
string
default:"tnb-maven-repo"
ID for the Maven repository
test.maven.extra.args
string
default:""
Additional arguments to pass to Maven commands
test.maven.transfer.progress
boolean
default:"false"
Show Maven artifact transfer progress

Tool paths

odo.path
string
Path to the odo CLI binary. Auto-detected from system PATH if not specified

Integrations

test.report.portal.enabled
boolean
default:"false"
Enable ReportPortal integration for test reporting
jira.allowed.resolutions
string
Comma-separated list of allowed JIRA issue resolutions
jira.token
string
default:""
JIRA access token for authentication

User configuration

tnb.user
string
Username for TNB operations. Defaults to system username if not “hudson”

Kamelets

kamelets.version
string
Version of Kamelets to use

Public methods

Product and version

public static ProductType product()
Returns the configured product type from test.product property.

Vault methods

public static String vaultToken()
public static String vaultRoleId()
public static String vaultSecretId()
public static String vaultPathPattern()
public static String vaultAddress()
Retrieve Vault authentication and configuration details.

Credentials methods

public static String credentialsFile()
public static String credentials()
Access credential configuration.

Application methods

public static String appGroupId()
public static String appVersion()
public static Path appLocation()
public static String appTemplateName()
public static boolean appDebug()
public static Integer appDebugPort()
Retrieve application configuration values.

Test execution methods

public static Duration testWaitTime()
public static Duration testWaitKillTimeout()
public static boolean skipTearDown()
public static boolean skipTearDownOpenshiftAMQStreams()
public static boolean parallel()
public static boolean streamLogs()
public static boolean useGlobalOpenshiftKafka()
Control test execution behavior.

Maven methods

public static String mavenRepository()
public static String mavenSettings()
public static String mavenExtraArgs()
public static String mavenSettingsFileName()
public static String mavenRepositoryId()
public static boolean mavenTransferProgress()
public static boolean isMavenMirror()
Access Maven configuration. The isMavenMirror() method checks if the repository URL contains @mirrorOf=.

Integration methods

public static boolean reportPortalEnabled()
public static Set<String> jiraAllowedResolutions()
public static String jiraAccessToken()
Configure external integrations.

Utility methods

public static String user()
public static String odoPath()
public static String kameletsVersion()
Retrieve user, tool paths, and component versions.

Usage examples

Basic test configuration

mvn test \
  -Dtest.product=CAMEL_QUARKUS \
  -Dtest.app.group.id=com.example \
  -Dtest.app.version=2.0.0

Maven repository configuration

mvn test \
  -Dtest.maven.repository=https://repository.example.com/maven2 \
  -Dtest.maven.repository.id=custom-repo \
  -Dtest.maven.extra.args="-U -X"

Vault credentials

mvn test \
  -Dtest.credentials.vault.address=https://vault.example.com \
  -Dtest.credentials.vault.token=hvs.CAESIJ... \
  -Dtest.credentials.vault.path.pattern=/secret/data/tnb/

Debug mode

mvn test \
  -Dtnb.app.debug=true \
  -Dtnb.app.debug.port=5005
When running in debug mode, the test application will wait for a debugger to attach on the specified port before proceeding.

Parallel execution with namespace isolation

mvn test \
  -Dtest.parallel=true \
  -Dtest.use.openshift=true
When parallel mode is enabled, namespaces will automatically get a random suffix to avoid conflicts.

Access in Java code

import software.tnb.common.config.TestConfiguration;
import software.tnb.common.product.ProductType;

public class MyTest {
    @Test
    public void testConfiguration() {
        ProductType product = TestConfiguration.product();
        String groupId = TestConfiguration.appGroupId();
        Duration waitTime = TestConfiguration.testWaitTime();
        
        if (TestConfiguration.appDebug()) {
            System.out.println("Debug port: " + TestConfiguration.appDebugPort());
        }
    }
}

Build docs developers (and LLMs) love