Package-level declarations

Configuration related classes such as VariistConfig.

Types

Link copied to clipboard
class ArgsRangeOptions(val profile: String? = null, val requestedMinArgs: Int? = null, val maxArgs: Int? = null)

Represents options which influences an ArgsRangeDecider on what ArgsRange to choose.

Link copied to clipboard
class ComponentFactory(val build: (ComponentFactoryContainer) -> Any, val producesSingleton: Boolean)

Provides a build lambda which produces the component and specifies via producesSingleton whether this component should be treated as singleton or not.

Link copied to clipboard

Manages the factories to create the different components of Variist.

Link copied to clipboard
Link copied to clipboard
enum Env : Enum<Env>

Predefined environment names.

Link copied to clipboard

Marker interface for types which can safely be cast to ComponentFactoryContainerProvider.

Link copied to clipboard
interface RandomFactory

Factory to create a Random.

Link copied to clipboard
value class Seed(val value: Int)

Represents the Variist seed, typically used for kotlin.random.Random and as offset in SemiOrderedArgsGenerator.generate.

Link copied to clipboard
class TestConfig(val maxArgs: Int)

A configuration specific to a test profile and environment.

Link copied to clipboard
interface TestProfiles

A collection of TestConfigs grouped by environment and profile name.

Link copied to clipboard

Predefined test type names (e.g. to use as profile names for TestProfiles).

Link copied to clipboard
class VariistConfig(val seed: Seed = Seed(Random.nextInt()), val skip: Int? = null, val requestedMinArgs: Int? = null, val maxArgs: Int? = null, val activeArgsRangeDecider: String = ProfileBasedArgsRangeDecider::class.qualifiedName ?: error( "cannot determine qualified name of ${ProfileBasedArgsRangeDecider::class.simpleName} " ), val activeSuffixArgsGeneratorDecider: String = SuffixArgsGeneratorNeverDecider::class.qualifiedName ?: error( "cannot determine qualified name of ${SuffixArgsGeneratorNeverDecider::class.simpleName} " ), val defaultProfile: String = TestType.Integration.name, val activeEnv: String = Env.Local.name, val testProfiles: TestProfiles = defaultTestProfiles)

The configuration of Variist which steers the generation of values.

Link copied to clipboard
class VariistConfigBuilder(var seed: Int, var skip: Int?, var maxArgs: Int?, var requestedMinArgs: Int?, var activeArgsRangeDecider: String, var activeSuffixArgsGeneratorDecider: String, var activeEnv: String, var defaultProfile: String, var testProfiles: MutableList<Pair<String, MutableList<Pair<String, TestConfig>>>>)

Builder to create a VariistConfig in a mutable way.

Link copied to clipboard
abstract class VariistConfigException(message: String, cause: Throwable?) : RuntimeException

The base class of Exceptions which are raised in conjunction with VariistConfig.

Link copied to clipboard

Caused in case a specified deadline passed.

Link copied to clipboard

Caused in case a config file cannot be parsed.

Link copied to clipboard
class VariistPropertiesLoaderConfig(var remindAboutFixedPropertiesAfterMinutes: Int = 60, var localPropertiesDir: Path = Paths.get("./src/test/resources"), var errorDeadlines: HashMap<String, LocalDateTime> = HashMap(), var localPropertiesResourceName: String? = null, var localPropertiesPrefix: String? = null)

Contains properties which are not exposed via VariistConfig and influence the loading of the local VariistConfig file.

Properties

Functions

Link copied to clipboard

Returns the component of type T using a corresponding factory or throws an IllegalStateException in case no factory was found which is able to build a component of the given type.

Link copied to clipboard

Returns a chain of components of type T using a corresponding factory or throws an IllegalStateException in case no factory was found which is able to build a chain of components of the given type.

Link copied to clipboard
operator fun TestProfiles.contains(testType: TestType): Boolean

Indicates if the given testType is used as profile name in this TestProfiles collection or not.

Link copied to clipboard

Creates a ComponentFactoryContainer based on the given components and chainedComponents.

Creates a TestProfiles based on the given profile and otherProfiles which use one of the predefined TestType as profile name and Env as env name.

Link copied to clipboard

Creates a Random whose seed is based on the VariistConfig.seed of this ComponentFactoryContainer and the given seedOffset.

Link copied to clipboard

Merges this ArgsRangeOptions with the given other where the properties of the other take precedence.

Link copied to clipboard
Link copied to clipboard

Turns this seed into a positive Int so that it can be used as offset in an SemiOrderedArgsGenerator.