minimal configuration for gradle-spock-mockmvc

This commit is contained in:
Mariusz Smykula
2016-04-19 22:13:02 +02:00
parent e0687be6dc
commit ff96e235b1

View File

@@ -11,6 +11,7 @@ Please follow to the Introduction page to start your journey with Consumer Drive
# 1. Introduction
Just to make long story short - AccuREST is a tool that enables Consumer Driven Contract (CDC) development of JVM-based applications. It is shipped with __REST Contract Definition Language__ (DSL). Contract definitions are used by AccuREST to produce following resources:
* JSON stub definitions to be used by Wiremock when doing integration testing on the client code (__client tests__). Test code must still be written by hand, test data is produced by AccuREST.
* Acceptance tests (in Spock) used to verify if server-side implementation of the API is compliant with the contract (__server tests__). Full test is generated by AccuREST.
@@ -29,13 +30,11 @@ The main purposes of AccuREST are:
## Prerequisites
In order to use Accurest with Wiremock you have to have Wiremock in version at least **2.0.0-beta** . Of course the higher the better :)
# 2.1. Gradle Project
## Prerequisites
In order to use Accurest with Wiremock you have to have Wiremock in version at least **2.0.0-beta** . Of course the higher the better :)
In order to use Accurest with Wiremock you have to use gradle or maven plugin.
## Add gradle plugin
@@ -46,17 +45,17 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'io.codearte.accurest:accurest-gradle-plugin:0.9.9'
classpath 'io.codearte.accurest:accurest-gradle-plugin:1.0.6'
}
}
apply plugin: 'groovy'
apply plugin: 'accurest'
dependencies {
testCompile('org.codehaus.groovy:groovy-all:2.4.6')
testCompile 'org.spockframework:spock-core:1.0-groovy-2.4'
testCompile 'com.github.tomakehurst:wiremock:2.0.4-beta' // you have to use WireMock with 2.0 versions of JsonPath
testCompile 'com.jayway.restassured:rest-assured:2.4.1'
testCompile 'com.jayway.restassured:spring-mock-mvc:2.4.1' // needed if you're going to use Spring MockMvc
testCompile 'com.jayway.restassured:spring-mock-mvc:2.9.0' // needed if you're going to use Spring MockMvc
}
----