0

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)

  1. 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.

Amit Jain
  • 1,372
  • 8
  • 16

1 Answers1

0

Let's answer the first question here.

You can use the failtrace argument to get a stacktrace for a failure

sbt> test-only *MySpec* -- failtrace

See also this question.

Community
  • 1
  • 1
Eric
  • 15,494
  • 38
  • 61