Embedded
Before you start, make sure you have read the benefits and limitations of the embedded deployment mode in the Choose Deployment Mode section.
It requires only three steps:
-
Add the dependencies needed to run QALIPSIS and develop your scenario.
dependencies { implementation(platform("io.qalipsis:qalipsis-platform:<version>")) kapt("io.qalipsis:api-processors") runtimeOnly("io.qalipsis:head") runtimeOnly("io.qalipsis:factory") implementation("io.qalipsis:runtime") // Examples of plugins implementation("io.qalipsis.plugin:cassandra") implementation("io.qalipsis.plugin:jackson") } -
Develop your scenario.
import io.qalipsis.api.annotations.Scenario ... class My Scenario { @Scenario("do-something-useful") // Do not forget the annotation! fun doSomethingUseful() { scenario { minionsCount = 10_000 profile { stages { ... } } }.start() .... } } -
Start QALIPSIS in your application:
Qalipsis.main("-s", "do-something-useful", "-c", "myconfig=thevalue", "my-other-args")
Alternately, you can use the following method:
-
Import the test fixtures module for the runtime
dependencies { implementation(platform("io.qalipsis:qalipsis-platform:<version>")) kapt("io.qalipsis:api-processors") runtimeOnly("io.qalipsis:head") runtimeOnly("io.qalipsis:factory") implementation("io.qalipsis:runtime") implementation(testFixtures("io.qalipsis:runtime")) // Here is the additional dependency. // Examples of plugins implementation("io.qalipsis.plugin:cassandra") implementation("io.qalipsis.plugin:jackson") } -
Use the builder to start QALIPSIS
QalipsisTestRunner.withScenarios("do-something-useful") .withConfiguration("myconfig=thevalue") .execute("my-other-args")