Skip to content

Couchbase

    dependencies {
        testImplementation("com.trendyol:stove-testing-e2e-couchbase:$version")
    }

Configure

After getting the library from the maven source, while configuring TestSystem you will have access to withCouchbase function. This function configures the Couchbase Docker container that is going to be started.

Here you can define a defaultBucket name.

Warning

Make sure that your application has the same bucket names.

TestSystem()
  .with {
    couchbase {
      CouchbaseSystemOptions(defaultBucket = "test-bucket", configureExposedConfiguration = { cfg ->
        listOf(
          "couchbase.hosts=${cfg.hostsWithPort}",
          "couchbase.username=${cfg.username}",
          "couchbase.password=${cfg.password}"
        )
      })
    }
  }
  .run()

Stove exposes configuration that is generated by the execution, so you can pass the real connection strings and configurations to your Spring application before it starts. Your application will start with the physical dependencies that are spun-up by the framework.

Migrations

Stove provides a way to run migrations before the test starts.