I am using play application and for testing I am using Rest assured here is my code
describe("signup processing")
{
it("user singed up")
{
val json: JsValue = JsObject(Seq(
"firstName" -> JsString("alice"),
"lastName" -> JsString("bob"),
"email" -> JsString("example@gmail.com"),
"secondryEmail" -> JsString("example1@gmail.com"),
"password" -> JsString("a@s**dasda_sds5")
))
given()
.port(9000)
.contentType("application/json")
.body(json)
.when()
.post("/direct-user/signup-processing")
.Then()
.statusCode(200)
}
}
when I run the tests I am getting the following exception
Exception encountered when attempting to run a suite with class name: endtoendtesting.directusertests.DirectUserSignUpTest *** ABORTED ***
[info] java.lang.NoSuchMethodError: org.hamcrest.Matcher.describeMismatch(Ljava/lang/Object;Lorg/hamcrest/Description;)V
[info] at io.restassured.internal.util.MatcherErrorMessageBuilder.buildError(MatcherErrorMessageBuilder.java:19)
[info] at io.restassured.internal.util.MatcherErrorMessageBuilder$buildError.call(Unknown Source)
[info] at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
[info] at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
[info] at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:128)
[info] at io.restassured.internal.ResponseSpecificationImpl$HamcrestAssertionClosure.validateStatusCodeAndStatusLine(ResponseSpecificationImpl.groovy:536)
[info] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[info] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[info] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[info] at java.lang.reflect.Method.invoke(Method.java:498)
here is build.sbt file
libraryDependencies ++= Seq(filters,
"org.scalatest" %% "scalatest" % "2.2.6" % "test"withSources() withJavadoc(),
"org.scalatestplus" %% "play" % "1.4.0-M3" % "test",
"org.slf4j" % "slf4j-api" % "1.6.4",
"com.typesafe.akka" %% "akka-actor" % "2.3.6",
"com.typesafe.akka" % "akka-testkit_2.11" % "2.3.6",
"ch.qos.logback" % "logback-core" % "1.0.9",
"io.rest-assured" % "scala-support" % "3.0.6")
is there any jar missing? which is cauing this exception