Table of Contents
What Does Variable Mean?
A variable is a symbolic name or placeholder used to store values that may change during test execution. Variables allow flexibility in defining inputs, configurations, or parameters without hardcoding specific data, making tests more dynamic and reusable across environments and scenarios.
Why Variables Matter
Variables make testing workflows adaptable and maintainable. Instead of duplicating tests for different environments or datasets, teams can parameterize values such as URLs, credentials, or resource names. This helps teams:
- Reuse the same test definitions across multiple environments.
- Reduce configuration duplication and maintenance overhead.
- Control test behavior dynamically at runtime.
- Increase scalability and consistency in automated testing workflows.
Variables are fundamental to achieving configuration-as-code and infrastructure-agnostic testing practices.
How Variables Work with Testkube
- Test-Level Configuration: Variables can be defined directly within a test’s configuration to customize execution.
- Environment Variables: Testkube injects environment variables into test pods for dynamic runtime values.
- Secrets and ConfigMaps: Sensitive or structured variables can be securely stored and managed in Kubernetes resources.
- Parameterization in Workflows: Variables allow teams to adapt the same test workflows across clusters, namespaces, or pipelines.
- CLI and API Support: Variables can be passed dynamically through the Testkube CLI or API when triggering test runs.