Last active
June 29, 2016 23:56
-
-
Save willmenn/00c735c4d7c41076aa33adc21b60e6ea to your computer and use it in GitHub Desktop.
How to configure cucumber in different folder at gradle application
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ApplicationSpringBootstrapStep extends WebApplicationTests { | |
@Given("I bootstrap the spring application") | |
public void bootstrapApplication() { | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
configurations { | |
itestCompile.extendsFrom testCompile | |
itestRuntime.extendsFrom testRuntime | |
} | |
sourceSets { | |
itest { | |
java { | |
compileClasspath += main.output + test.output | |
runtimeClasspath += main.output + test.output | |
srcDir file('src/itest/java') | |
} | |
resources.srcDir file('src/itest/resources') | |
} | |
} | |
task itest(type: Test) { | |
testClassesDir = sourceSets.itest.output.classesDir | |
classpath = sourceSets.itest.runtimeClasspath | |
testLogging { | |
events "passed", "skipped", "failed" | |
} | |
} | |
test.finalizedBy(itest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@RunWith(Cucumber.class) | |
@CucumberOptions(format = "pretty", features = "src/itest/resources") | |
public class FeatureTestRunner {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@RunWith(SpringJUnit4ClassRunner.class) | |
@ContextConfiguration(classes = BrokerScheduleApplication.class, loader = SpringApplicationContextLoader.class) | |
@WebIntegrationTest(randomPort = true) | |
public class WebApplicationTest{} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment