System Parameters
Testinium Suite allows you to define parameters through the UI and inject them into your test executions. These parameters can then be accessed within your Java test code.
Defining Parameters via UI
You can define parameters from the Set System Parameters section in the UI by providing:
- Name → The key you will use in your code
- Value → The value assigned to the parameter
- Type → Determines how the parameter is injected at runtime
- Command Parameter
- Environment Parameter
After defining the parameter, click Add to include it in your execution configuration.
Parameter Types and Access Methods
There are two types of parameters, and each is accessed differently in Java:
1. Command Parameter
Command Parameters are exposed as JVM system properties and can be accessed using:
2. Environment Parameter
Environment Parameters are exposed as operating system environment variables and can be accessed using:
Summary
- Command Parameter → System.getProperty("parameterName")
- Environment Parameter → System.getenv("parameterName")
Important Notes
The exact access method depends on how the parameters are injected during runtime. In most cases:
- Command Parameters are mapped to JVM system properties
- Environment Parameters are mapped to OS-level environment variables
However, depending on the execution configuration, Environment Parameters may also be accessible via System.getProperty().