-
Notifications
You must be signed in to change notification settings - Fork 22
Migrating to Optimus 2.3.3 Beta
Krishnanand B edited this page Feb 7, 2018
·
1 revision
Optimus 2.3.3 Beta brings in a lot of new changes framework wise, however, the migration would be simple.
Create a new directory libs
under your project root.
Download Optimus-services
jar into your libs
folder from here
Update following sections in your build.gradle
optimus {
testFeed = System.getProperty("testFeed");
tags = System.getProperty("tags");
devMode = System.getProperty("devMode");
regression = System.getProperty("regression");
env = System.getProperty("env", "integration");
classpath = sourceSets.test.runtimeClasspath
}
service {
database = System.getProperty("database", "optimus")
port = System.getProperty("port", "8090")
uri = System.getProperty("uri", "mongodb://localhost:27017")
}
tasks.runFragmentation.dependsOn 'clean', 'build','spinServices'
tasks.runDistribution.dependsOn 'clean', 'build','spinServices'
tasks.build.mustRunAfter 'clean'
tasks.runFragmentation.finalizedBy 'fragmentationReport'
tasks.runDistribution.finalizedBy 'distributionReport'
tasks.fragmentationReport.finalizedBy 'stopServices'
tasks.distributionReport.finalizedBy 'stopServices'
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
mavenCentral()
}
dependencies {
classpath "gradle.plugin.com.testvagrant.optimus:OptimusGradle:2.3.2"
}
}
compile group: 'com.testvagrant', name: 'optimus', version: '2.3.3-beta'
compile 'com.testvagrant.stepdefs:stepdefs:1.0.7'
compile 'com.testvagrant.intents:intents:1.0.6'
You are now good to run your tests. But wait, you might be wondering, what's the point if all these changes doesnt add any value to the way you trigger tests??
We have something in store for you.
You can now run tests pointing to a specific mongo instance (localhost being default) and with custom db name(optimus being default)
Here are the updated commands.
./gradlew runFragmentation -DtestFeed=<YourTestFeedName> -Dtags=<comma seperated tags> -Ddatabase=<custom database name> -Duri=<your mongo instance uri>
./gradlew runDistribution -DtestFeed=<YourTestFeedName> -Dtags=<comma seperated tags> -Ddatabase=<custom database name> -Duri=<your mongo instance uri>