specs2 support?

specs2 is out - is support for it planned?
[when I try to run it IntelliJ says it can't find the specs runner (the package names changed)]

Cheers,
Stephan

0
15 comments
Avatar
Permanently deleted user

I'm all for it :)! Let me know how I can help to make it super-good.

Eric.

0
Avatar
Permanently deleted user

Please, PLEASE, PLEASE, make it so that I can place breakpoints inside tests.

Uhm, breakpoints that work...

0

I just added specs2 support for the latest specs2 snapshot build.
Please wait next plugin nightly build.

Best regards,
Alexander Podkhalyuzin.

0
Avatar
Permanently deleted user

Hi Alexander,

I can't make it work. I'm using v 860 of the plugin and there is no specs2 config to select from, only specs.

And if I try to use that kind of configuration, I get an Error "Specs not specified".

Thanks for telling me how to debug this or what kind of mistake I'm doing.

Eric.

0
Avatar
Permanently deleted user

Yes I got it working, I guess I was too impatient and had to wait for v.866 :).

One question: is it on purpose that you're only reporting examples for now and not "contextStart"/"contextEnd"?
(I observed an issue which seems to be on my side so I'll have a look at it).

Thanks a lot for your work!!

Eric.



Attachment(s):
HelloWorld-specs2-idea.png
0
Avatar
Permanently deleted user

> I observed an issue which seems to be on my side so I'll have a look at it

I was wrong. There's no issue, just that some pieces of text are not yet reported.

0

0.4.866 should work as it was with Specs 1.

When I'll have more time, I'll try to improve support to run only one example (do you have such API? Is it same as it was in Specs1?), and navigation from test to source.

Best regards,

Aleander Podkhalyuzin.

0
Avatar
Permanently deleted user

There are several options which can be passed to the command line as arguments.

In the context of IDEA I think that the following make sense:

  • ex: regular expression to filter examples to execute. Example: reporter.main(Array("MySpec", "ex", ".*test.*"))
  • include: comma-separated tags to include. Example: reporter.main(Array("MySpec", "include", "unit,integration"))
  • exclude: comma-separated tags to exclude. Example: reporter.main(Array("MySpec", "exclude", "unit,integration"))
  • fullstacktrace: boolean to display the full stack trace without filtering anything. Example: reporter.main(Array("MySpec", "fullstacktrace"))
  • tracefilter: lists of regexs of traces to include and traces to exclude. Example: reporter.main(Array("MySpec", "tracefilter", "com.mycompany.*,com.myothercompany.*/org.specs2.*,scala.*"))


That being said, those arguments can, for now, be added in the specification itself by the user. On the other hand if we execute a specification with 2 "contexts" we'll get a display with all examples grouped at once:HelloWorld-specs2-idea-2 systems.png
So that might be the first thing to work on.

Eric.



Attachment(s):
HelloWorld-specs2-idea-2 systems.png
0
Avatar
Permanently deleted user

I've added a few new features to the Specs Runners as an early Easter present!

Run a single example


Select the name of the example, CTRL-SHIFT-F10. (Specs and Specs2)

Screen shot 2011-04-22 at 2.48.48 PM.png
Screen shot 2011-04-22 at 2.49.01 PM.png
This is done with an Example Filter, so if there are multiple test with the same name in different contexts, they would all be run.

Navigation to Source


I've also added navigation from the Test Tree back to the source. (Specs2 only)

Screen shot 2011-04-22 at 2.49.33 PM.png

Text Diffs


Tests failing with a actual/expected error can now trigger a text diff pop-up. Multi-line strings differences are shown with a hyperlink. (Specs and Specs2)

Screen shot 2011-04-22 at 2.50.08 PM.png
Screen shot 2011-04-22 at 2.50.18 PM.png
I've opened an issue in Specs2 to help us implement this more cleanly: https://github.com/etorreborre/specs2/issues/9

Contexts

Nested contexts are correctly displayed, and errors and failures are now correctly colour-coded.
Screen shot 2011-04-22 at 3.31.44 PM.png

0
Avatar
Permanently deleted user

Breakpoints in call-by-name arguments, e.g the body of Specs example, are now working.

0
Avatar
Permanently deleted user

Jason, you're my hero!

I've added the necessary Details object to the Notifier interface in the latest snapshot.

I can't wait for the next nightly plugin :).

Eric.

0
Avatar
Permanently deleted user

I've added that overload to our notifier in readiness. I will test it out in the next day or two.

0
Avatar
Permanently deleted user

Hi Jason,

Would that be possible to get the options in the "Test options:" field of a run configuration being passed to specs2 notifier runner?

Thanks,

Eric.

0
Avatar
Permanently deleted user

Try the next nightly.

Screen shot 2011-05-10 at 11.57.04 PM.png

0
Avatar
Permanently deleted user

It works fine for me, thanks!

0

Please sign in to leave a comment.