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:

  1. 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")
    }
  2. 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()
            ....
        }
    }
  3. Start QALIPSIS in your application:

    Qalipsis.main("-s", "do-something-useful", "-c", "myconfig=thevalue", "my-other-args")

Alternately, you can use the following method:

  1. 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")
    }
  2. Use the builder to start QALIPSIS

    QalipsisTestRunner.withScenarios("do-something-useful")
        .withConfiguration("myconfig=thevalue")
        .execute("my-other-args")