How to use applyPlatformDefaults class of io.kotest.engine.config package

Best Kotest code snippet using io.kotest.engine.config.applyPlatformDefaults

ConfigManager.kt

Source:ConfigManager.kt Github

copy

Full Screen

...17 return configuration18 }19 fun compile(configuration: ProjectConfiguration, projectConfigs: List<AbstractProjectConfig>) = runCatching {20 log { "ConfigManager: compiling config projectConfigs=$projectConfigs" }21 applyPlatformDefaults(configuration)22 applyConfigFromSystemProperties(configuration)23 applyConfigFromAutoScan(configuration)24 projectConfigs.forEach { applyConfigFromProjectConfig(it, configuration) }25 }.mapError { ConfigurationException(it) }26}27class ConfigurationException(cause: Throwable) : Exception(cause)28/**29 * Uses system properties to load configuration values onto the supplied [ProjectConfiguration] object.30 *31 * Note: This function will have no effect on non-JVM targets.32 */33internal expect fun applyConfigFromSystemProperties(configuration: ProjectConfiguration)34/**35 * Modifies configuration with some defaults based on the platform.36 *37 * For example on JVM it will add System property based tag detection.38 */39internal expect fun applyPlatformDefaults(configuration: ProjectConfiguration)40/**41 *42 * Applies listeners, filters and extensions detected during scanning, that are annotated43 * with the [AutoScan] annotation.44 *45 * Note: This will only have an effect on JVM targets.46 */47internal expect fun applyConfigFromAutoScan(configuration: ProjectConfiguration)48/**49 * Scan the classpath for [AbstractProjectConfig] instances.50 *51 * Note: This will only have an effect on JVM targets.52 */53internal expect fun detectAbstractProjectConfigs(): List<AbstractProjectConfig>...

Full Screen

Full Screen

applyConfigs.kt

Source:applyConfigs.kt Github

copy

Full Screen

2import io.kotest.core.config.AbstractProjectConfig3import io.kotest.core.config.ProjectConfiguration4internal actual fun applyConfigFromSystemProperties(configuration: ProjectConfiguration) {}5internal actual fun applyConfigFromAutoScan(configuration: ProjectConfiguration) {}6internal actual fun applyPlatformDefaults(configuration: ProjectConfiguration) {}7internal actual fun detectAbstractProjectConfigs(): List<AbstractProjectConfig> = emptyList()8internal actual fun loadProjectConfigFromClassname(): AbstractProjectConfig? = null...

Full Screen

Full Screen

applyPlatformDefaults.kt

Source:applyPlatformDefaults.kt Github

copy

Full Screen

1package io.kotest.engine.config2import io.kotest.core.config.ProjectConfiguration3import io.kotest.engine.extensions.SystemPropertyTagExtension4internal actual fun applyPlatformDefaults(configuration: ProjectConfiguration) {5 configuration.registry.add(SystemPropertyTagExtension)6}...

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run Kotest automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Most used methods in applyPlatformDefaults

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful