[2.x-scala] How to show logger info from specs2 running test?

233 views
Skip to first unread message

sas

unread,
Sep 8, 2012, 5:50:45 PM9/8/12
to play-fr...@googlegroups.com

I did a couple of simple tests using specs2, and I inserted several play.Logger.info("messsage") in it, but they just don't appear anywhere...

Is there some way to enable them to be shown somewhere?

It would also be very handy being able to debug test code with eclipse or intelliJ...

James Roper

unread,
Sep 9, 2012, 8:43:43 AM9/9/12
to play-fr...@googlegroups.com
What's stopping you from debugging the test code with eclipse or intellij?  I'm able to run specs in intellij with no problems.

Manuel Bernhardt

unread,
Sep 9, 2012, 1:05:48 PM9/9/12
to play-fr...@googlegroups.com
AFAIK debugging is missing from test runs because of a memory issue of
sorts which should be fixed in Play 2.1 / SBT 0.12 (with JVM forking).
Though this is very disturbing of course when you don't know about it.

Debugging is one option, but it's not a silver bullet; in some cases
it is more useful to log a specific message and to crawl through the
logs after the values, rather than stepping through them 1000 times or
so. I'm currently resorting to println in some situations.

Manuel
> --
> You received this message because you are subscribed to the Google Groups
> "play-framework" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/play-framework/-/n37y9xN3xjgJ.
>
> To post to this group, send email to play-fr...@googlegroups.com.
> To unsubscribe from this group, send email to
> play-framewor...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/play-framework?hl=en.

Sebastian Scarano

unread,
Sep 9, 2012, 8:22:07 PM9/9/12
to play-fr...@googlegroups.com
I tried again and debugging works fine in eclipse

The problem was that it wasn't picking the breakpoint from any of the followgin lines:

--
  "ConditionParser.parseSingleCondition" should {

    "retrieve the field, negated value, operator and values" in {

      ConditionParser.parseSingleCondition("field=value").description must equalTo("field should be equal to value")
--

I had to get into parseSingleCondition function and st breakpoints in there

More over, I had several troubles like this with breakpoints and eclipse...

I tried with Juno Release (Build id: 20120614-1722) and Indigo Service Release 2 (Build id: 20120216-1857) on ubuntu 64 with jdk 1.7.0_06

Is anybody facing the same troubles???

saludos

sas
Reply all
Reply to author
Forward
0 new messages