Service architecture
Every System-X service comprises three essential components:Account
A Java object containing all the information required to connect to the service, including credentials, endpoints, and configuration
Client
A Java client used to access the service, providing the low-level API for service interaction
Validation
A wrapper around the client and account that offers convenient methods to interact with the service in tests
Service types
System-X services are divided into two categories based on their deployment model:Remote services
Remote services are internet-facing services that can be accessed publicly. These services don’t require deployment and only establish a connection to the remote endpoint. Examples: Salesforce, Jira, ServiceNow, AWS services, Azure services, Google Cloud servicesSelf-hosted services
Self-hosted services are typically internal services that need to be deployed before use. These services can be deployed in multiple ways: Examples: Kafka, PostgreSQL, MongoDB, Redis, Elasticsearch, RabbitMQBase service interface
All services extend the abstractService class:
/home/daytona/workspace/source/system-x/common/src/main/java/software/tnb/common/service/Service.java
BeforeAllCallback) and teardown (AfterAllCallback).
Creating service instances
Use theServiceFactory to create service instances:
ServiceFactory automatically:
- Selects the appropriate implementation (local or OpenShift) based on configuration
- Initializes the service with default configuration
- Manages the service lifecycle through JUnit extensions
Service lifecycle
The typical service lifecycle in a test:Before all tests
The
beforeAll() method deploys the service (if self-hosted) and initializes the clientConfiguration options
System-X services can be configured through system properties:| Property | Description | Default |
|---|---|---|
test.use.openshift | Deploy services on OpenShift instead of locally | false |
tnb.<serviceName>.image | Override the default Docker image for a service | Service-specific |
tnb.<serviceName>.host | Connect to an external service instance | None |
test.credentials.file | Path to credentials YAML file | None |
test.credentials.use.vault | Load credentials from HashiCorp Vault | false |
Next steps
Available services
Browse the complete list of 50+ System-X services
Remote services
Learn how to work with remote services
Self-hosted services
Deploy services using TestContainers or OpenShift
Creating services
Build your own custom System-X service