Configuration
Core configuration sources
org.paramixel.core.Configuration exposes three entry points:
Map<String, String> classpath = Configuration.classpathProperties();
Map<String, String> system = Configuration.systemProperties();
Map<String, String> defaults = Configuration.defaultProperties();
All three methods return unmodifiable maps. Attempts to modify the returned map (such as put, remove, or clear) throw UnsupportedOperationException.
Class-loader resolution
Configuration loads paramixel.properties using the thread context class loader first. If the context class loader is unavailable (null) or cannot find the resource, it falls back to the defining class loader (Configuration.class.getClassLoader()). This ensures configuration is reliably located in containers, plugins, and test runners that set a restricted context class loader.
Built-in keys
paramixel.parallelism
Controls default runner parallelism. This key is used by both Runner (for thread pool sizing) and Resolver (for the parallelism of discovered Parallel roots).
paramixel.parallelism=8
Notes:
Configuration.defaultProperties()sets it toRuntime.getRuntime().availableProcessors()when absent.Runneruses this value to size its thread pools and to detect potential nested-parallel deadlocks.Resolveruses this value as the parallelism for discoveredParallelroots.- Individual
Parallelactions can also set an explicit per-node limit withParallel.of(name, parallelism, ...).
paramixel.failureOnSkip
Controls whether SKIP results are treated as failures for exit code purposes.
paramixel.failureOnSkip=true
Notes:
- Default is
false. Whenfalse, SKIP produces exit code0(same as PASS). Whentrue, SKIP produces exit code1(same as FAIL). - This affects
Runner.runAndReturnExitCode(Action),Runner.runAndReturnExitCode(Selector), and the Maven plugin. - In the Maven plugin, this corresponds to the
<failureOnSkip>POM parameter or-Dparamixel.failureOnSkip=truesystem property.
paramixel.match.package
Regex pattern for filtering discovered action factories by package name.
paramixel.match.package=com\.example
When set, only action factories whose declaring class package matches this regex are included. Uses Pattern.matcher().find() (substring match). For exact match, anchor with ^...$.
paramixel.match.class
Regex pattern for filtering discovered action factories by fully qualified class name.
paramixel.match.class=com\.example\.MyTest
When set, only action factories whose declaring class name matches this regex are included. Uses Pattern.matcher().find() (substring match). For exact match, anchor with ^...$.
paramixel.match.tag
Regex pattern for filtering discovered action factories by @Paramixel.Tag value.
paramixel.match.tag=smoke
When set, only action factories annotated with a matching @Paramixel.Tag are included. Uses Pattern.matcher().find() (substring match). For exact match, anchor with ^...$.
Accessing configuration inside actions
Prefer Context#getConfiguration().
Direct.of("print config", context -> {
String value = context.getConfiguration().get("my.custom.property");
});
paramixel.properties
Place the file on the runtime classpath, for example:
src/test/resources/paramixel.propertiesfor ordinary testssrc/main/resources/paramixel.propertieswhen examples live undersrc/main/java
Example:
paramixel.parallelism=4
my.custom.property=hello
System properties
System properties override file values.
./mvnw test -Dparamixel.parallelism=16
Programmatic runner configuration
Runner.Builder#configuration(Map<String, String>) overrides values from Configuration.defaultProperties().
Runner runner = Runner.builder()
.configuration(Map.of("paramixel.parallelism", "6"))
.build();
Programmatic discovery configuration
Resolver overloads that accept a Map<String, String> configuration parameter control the parallelism of discovered Parallel roots. When paramixel.parallelism is present in the map, that value is used; otherwise Configuration.defaultProperties() supplies the default.
Optional<Action> root = Resolver.resolveActions(
Map.of(Configuration.RUNNER_PARALLELISM, "4"));
Overloads that do not accept a configuration map use Configuration.defaultProperties().
Maven plugin configuration
The plugin accepts <properties> entries and also reads system properties.
Precedence in the plugin is:
Configuration.defaultProperties()- plugin
<properties> - system properties whose keys start with
paramixel.
The plugin passes configuration to discovery so that paramixel.parallelism controls both thread pool sizing and discovered action parallelism.
Example:
<configuration>
<properties>
<property>
<key>paramixel.parallelism</key>
<value>4</value>
</property>
</properties>
</configuration>
Plugin flags:
./mvnw test -Dparamixel.skipTests=true
./mvnw test -Dparamixel.failIfNoTests=false
paramixel.skipTests and paramixel.failIfNoTests are Maven plugin parameters, not core Configuration keys.