I need to know two things here :
1. How to see the stacktrace of the failing test case? Right now I only see the line number it failed and the result. See the outcome of the test case below :
x return status 200
[error] '404' is not equal to '200' (LayoutControllerSpec.scala:20)
- My controller uses parseBody keyword to parse json provided by JacksonJsonSupport class. how to write the test case for the action me below :
val create = post() {
var layout:Layout = parsedBody.extract[Layout] //Layout is model class
....
}
Any help or ideas would be highly appreciated. Thanks, PS: This code is written for scalatra framework using spec2 framework.
Let's answer the first question here.
You can use the
failtrace
argument to get a stacktrace for a failureSee also this question.