-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: register WireMockServer as a Spring Bean (refs #73) #77
Conversation
f7f66f7
to
6943e46
Compare
6943e46
to
13343c3
Compare
Thanks for working on this @tomasbjerre! It looks good to me, but would be great to get a quick eyeball from @Arc-E-Tect as well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, proof would be in eating the pudding though.
build.gradle
Outdated
@@ -7,6 +7,7 @@ buildscript { | |||
dependencies { | |||
classpath "se.bjurr.gradle.java-convention:se.bjurr.gradle.java-convention.gradle.plugin:0.+" | |||
classpath "org.wiremock.tools.gradle:gradle-wiremock-extension-plugins:0.4.0" | |||
classpath "se.thinkcode.cucumber-runner:se.thinkcode.cucumber-runner.gradle.plugin:0.0.11" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any specific reason for using this plugin? It's not been updated since a couple of years and that introduces the risk of not being compatible with future versions of Gradle.
There's a cucumber-junit platform runner that achieves the same and seamlessly integrates with the Gradle test suite features
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was googling for a while and this was the simplest version I found. But I can try your proposal also.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's pretty straightforward, but requires the Cucumber configuration in its own class as part of the gluecode.
@Suite
@IncludeEngines("cucumber")
@SelectClasspathResource("com/arc_e_tect")
@ConfigurationParameter(key = PLUGIN_PROPERTY_NAME, value = "pretty," +
"html:build/reports/bdd-test/Cucumber.html")
@ConfigurationParameter(key = FILTER_TAGS_PROPERTY_NAME, value = "not @ignore and not @wip")
@ConfigurationParameter(key = GLUE_PROPERTY_NAME, value = "com.arc_e_tect.experiments")
public class RunBddTest {
}
and
@CucumberContextConfiguration
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT, classes = App.class)
@ActiveProfiles({"bddtest"})
@Import(WireMockConfig.class)
public class CucumberConfiguration {
WireMockServer wireMockServer;
protected CucumberConfiguration(WireMockServer wireMockServer) {
this.wireMockServer = wireMockServer;
wireMockServer.start();
}
}
Let me know when you need some help.
Thanks both of you for getting this in there! |
#73 #22