Spock's next release?

210 views
Skip to first unread message

pangea

unread,
Nov 12, 2011, 11:50:56 AM11/12/11
to spockfr...@googlegroups.com
We have been using spock for our functional automation and are pleased with it. Appreciate if the committers can tell me 

1. When is the spock's next release planned?
2. What are the new features that we can expect?
3. When a verification fails, it currently doesn't print the text from the "THEN" block in the report. Is there any plan to add this support in the subsequent releases?

Peter Niederwieser

unread,
Nov 14, 2011, 11:07:25 PM11/14/11
to Spock Framework - User


On Nov 12, 10:50 am, pangea <yarav...@gmail.com> wrote:
> We have been using spock for our functional automation and are pleased with
> it. Appreciate if the committers can tell me
>
> 1. When is the spock's next release planned?

0.6 is long overdue and will hopefully be released soon.

> 2. What are the new features that we can expect?

No major new features, but lots of improvements and fixes, and support
for Grooovy 1.8, Groovy 2.0, and Grails 2.0.

> 3. When a verification fails, it currently doesn't print the text from the
> "THEN" block in the report. Is there any plan to add this support in the
> subsequent releases?

This has been discussed a few times in the past. In my opinion, the
most useful form of this would be a BDD-style test report that shows
which block(s) failed. We'd be happy to accept contributions for a
well-designed HTML report.

Cheers,
Peter

pangea

unread,
Nov 15, 2011, 11:25:29 AM11/15/11
to spockfr...@googlegroups.com
We would like to start coding for this with basic html and then we can improve on it. Could you please provide me the details on how to approach on collecting which "then" block has failed...

Peter Niederwieser

unread,
Nov 15, 2011, 6:42:20 PM11/15/11
to spockfr...@googlegroups.com
Right now you can write an extension that  processes the descriptions of each block (e.g. turning them into a report). You can find out which method failed, but not which block failed. This is a non-trivial feature that will require changes deep down in Spock's internals. Can you shed some light on how you would make use of this feature? Would you produce a report? Who would look at this report, and when/why?

Cheers,
Peter

Cheers,
Peter

On 15.11.2011, at 10:25, pangea wrote:

We would like to start coding for this with basic html and then we can improve on it. Could you please provide me the details on how to approach on collecting which "then" block has failed...

--
You received this message because you are subscribed to the Google Groups "Spock Framework - User" group.
To view this discussion on the web visit https://groups.google.com/d/msg/spockframework/-/m_L4m19eIlYJ.
To post to this group, send email to spockfr...@googlegroups.com.
To unsubscribe from this group, send email to spockframewor...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/spockframework?hl=en.

pangea

unread,
Nov 15, 2011, 7:29:15 PM11/15/11
to spockfr...@googlegroups.com
Currently we are using spock for unit and integration testing and the whole team is very much pleased. We want to leverage the same framework for our functional end-to-end black box testing. Idea is for the business users and other stakeholders to write executable/verifiable specifications or stories and share with developers. These same stories will end up as regression tests. I have looked at various BDD frameworks like easyb, JBehave etc but we want the team to be familiar with 1 library for all of this. We wrote few simple support extensions to spock for

1. Printing the entire set of GIVEN/WHEN/THEN/AND block text to console before running every test
2. Our domain specific Categories so that we can selectively run tests
3. Leverage Excel files for data driven tests

Currently the regression tests are run every night through hudson but the junit report generated is not business friendly. This is where we need your help. If you can provide the basic plumbing you are talking about then I can use my web design guy to help come up with a report template.

Luke Daley

unread,
Nov 16, 2011, 4:50:11 AM11/16/11
to spockfr...@googlegroups.com
Peter, 

Perhaps you could paste the quick extension you wrote to do this in plaintext @ SpringOne as a starting point.

--
You received this message because you are subscribed to the Google Groups "Spock Framework - User" group.
To view this discussion on the web visit https://groups.google.com/d/msg/spockframework/-/xd0yZxAxMTYJ.

pangea

unread,
Nov 17, 2011, 4:32:34 PM11/17/11
to spockfr...@googlegroups.com
Peter - Could please share that extension...

pangea

unread,
Nov 21, 2011, 3:27:22 PM11/21/11
to spockfr...@googlegroups.com
Peter - Can you please share the code as requested by Luke

Peter Niederwieser

unread,
Nov 23, 2011, 12:52:44 AM11/23/11
to Spock Framework - User
On Nov 21, 9:27 pm, pangea <yarav...@gmail.com> wrote:> Peter - Can

you please share the code as requested by Luke
You said that you already print the block descriptions to the console.
That's exactly what I demo in my talks. You can look at an
implementation here:

https://github.com/spockframework/spock-ggnyc-2011/tree/master/src/test/groovy/extension/custom

In real life I would probably turn this into a global extension that
doesn't require an annotation.

How do you selectively run tests? With JUnit's Categories or with
Spock's includes/excludes?

I will put more thoughts into how to report which block failed after
0.6 is out. I would appreciate if you helped with the report design or
shared some of your other stuff (e.g. Excel integration).

Cheers,
Peter

Benjamin Gudehus

unread,
Feb 6, 2012, 8:27:29 PM2/6/12
to spockfr...@googlegroups.com
Hi!

Are there any news about an extension for html reports of spock specifications?

Regards
Benjamin

2011/11/23 Peter Niederwieser <pnie...@gmail.com>
--
You received this message because you are subscribed to the Google Groups "Spock Framework - User" group.

Jan Ehrhardt

unread,
Feb 9, 2012, 2:27:49 AM2/9/12
to spockfr...@googlegroups.com

Hi,

Am 07.02.2012 02:27 schrieb "Benjamin Gudehus" <hast...@googlemail.com>:
>
> Hi!
>
> Are there any news about an extension for html reports of spock specifications?

this would also be interesting to me.

If not, I could try to do this in the next few weeks and contribute it.

Regards
Jan Ehrhardt

Peter Niederwieser

unread,
Feb 9, 2012, 4:54:56 PM2/9/12
to Spock Framework - User
No news at this time. If someone is willing (and able) to design an
awesome HTML report, please let us know.

Cheers,
Peter

On Feb 7, 2:27 am, Benjamin Gudehus <hasteb...@googlemail.com> wrote:
> Hi!
>
> Are there any news about an extension for html reports of spock
> specifications?
>
> Regards
> Benjamin
>
> 2011/11/23 Peter Niederwieser <pnied...@gmail.com>
>
>
>
>
>
>
>
> > On Nov 21, 9:27 pm, pangea <yarav...@gmail.com> wrote:> Peter - Can
> > you please share the code as requested by Luke
> > You said that you already print the block descriptions to the console.
> > That's exactly what I demo in my talks. You can look at an
> > implementation here:
>
> >https://github.com/spockframework/spock-ggnyc-2011/tree/master/src/te...

Guillaume Laforge

unread,
Feb 10, 2012, 2:53:21 AM2/10/12
to spockfr...@googlegroups.com
Is there an existing report to enhance to make it look nice?
What's involved here exactly?
Guillaume Laforge
Groovy Project Manager
SpringSource, a division of VMware


Benjamin Gudehus

unread,
Feb 10, 2012, 10:38:49 AM2/10/12
to spockfr...@googlegroups.com
@Jan

That would be great! I'm trilled to test this out.

Some ideas: An Ant task and the ability to use xslt on resulting xml files 
to use custom html designs.

@Guillaume

Normally we use the junit ant task with the xml formatter to output test results
and then use the junitreport task on the resulting xml files to generate a html report.

The html report only includes the method names of the fixture methods, but the
most important information is in the strings for the given-when-then and expect
blocks. This information should be also included in the html reports.

I don't know how and if we should integration the spock specification string parser
into the junit task or just create a new one.

P.S.: Is there a way to customize the ant task of org.codehaus.groovy.ant.Groovydoc?
Something like the doclet tag from the javadoc ant task. I didn't see anything in the
documenation about that.

The ability to create and use custom styles (Groovydoc style, Javadoc 7 style, 
Scaladocs style) would be nice! I also saw some extensions on javadoc to create
uml diagrams with Graphviz (http://www.umlgraph.org/) and to use markdown
instead of html for the docs (http://code.google.com/p/markdown-doclet/).

Greetings
Benjamin

2012/2/10 Guillaume Laforge <glaf...@gmail.com>

Guillaume Laforge

unread,
Feb 10, 2012, 10:51:25 AM2/10/12
to spockfr...@googlegroups.com
Hi Benjamin,

On Fri, Feb 10, 2012 at 16:38, Benjamin Gudehus <hast...@googlemail.com> wrote:
[...]
@Guillaume

Normally we use the junit ant task with the xml formatter to output test results
and then use the junitreport task on the resulting xml files to generate a html report.

The html report only includes the method names of the fixture methods, but the
most important information is in the strings for the given-when-then and expect
blocks. This information should be also included in the html reports.

So how to get that information in there?
 
I don't know how and if we should integration the spock specification string parser
into the junit task or just create a new one.

I would guess a specific task would be needed to retrieve those details so that we can produce a new and different report from what good'ol JUnit generates.
 
P.S.: Is there a way to customize the ant task of org.codehaus.groovy.ant.Groovydoc?
Something like the doclet tag from the javadoc ant task. I didn't see anything in the
documenation about that.

Yes, it's not really documented, but since Groovy 1.8, you can subclass the Groovydoc task so as to provide your own templates:
 
The ability to create and use custom styles (Groovydoc style, Javadoc 7 style, 
Scaladocs style) would be nice! I also saw some extensions on javadoc to create
uml diagrams with Graphviz (http://www.umlgraph.org/) and to use markdown
instead of html for the docs (http://code.google.com/p/markdown-doclet/).

Sounds interesting, yes.

A first step seems to be to have a custom report task that would somehow plug into the junit xml files, and the spock specs.
But well, that's beyond my area of expertise there...

I can give a hand at making a report nicer (like I did for example for the CodeNarc reports), but it seems there's a bit of knowledge and work before getting to the point of just making a report prettier :-)

Guillaume

Peter Niederwieser

unread,
Feb 10, 2012, 11:47:00 AM2/10/12
to spockfr...@googlegroups.com
There's no existing report as so far we are relying on build tools to
produce a (JUnit) report. The report should read like a specification.
It should contain 1. spec names 2. feature names 3. block descriptions.
It shouldn't contain technical words like "class", "method", etc. It
should look more like a narrative than a table, and should make good use
of color (coding). It could (potentially) be a spin-off of Gradle's
JUnit report. The reports produced by Rspec, Cucumber, JBhehave, and
EasyB might also be good inspirations.

I don't want this to be an Ant task. It should be implemented as a Spock
extension so that it works in any environment. Extensions can have their
own configuration, e.g. for the report location. I'd take over the
extension part, but I need someone else to drive the report
design/implementation.

Cheers,
Peter

>>> Twitter: @glaforge <http://twitter.com/glaforge>

> Twitter: @glaforge <http://twitter.com/glaforge>

Benjamin Gudehus

unread,
Feb 10, 2012, 12:06:18 PM2/10/12
to spockfr...@googlegroups.com
2012/2/10 Peter Niederwieser <pnie...@gmail.com>

There's no existing report as so far we are relying on build tools to produce a (JUnit) report. The report should read like a specification. It should contain 1. spec names 2. feature names 3. block descriptions. It shouldn't contain technical words like "class", "method", etc. It should look more like a narrative than a table, and should make good use of color (coding). It could (potentially) be a spin-off of Gradle's JUnit report. The reports produced by Rspec, Cucumber, JBhehave, and EasyB might also be good inspirations.

+1 absolutely

So it is (1) parsing the specifications, (2) adding information to it about successful and failed junit tests (also with the output of the power assertions) and (3) generate html reports.

I see some use cases for just parse the specs (1), but __without__ running them (2) and generate the html reports (3). So I could maybe implement webserver that runs at localhost and automatically rebuilds the specs and shows them in the browser (like yardoc for ruby).

I don't want this to be an Ant task. It should be implemented as a Spock extension so that it works in any environment. Extensions can have their own configuration, e.g. for the report location. I'd take over the extension part, but I need someone else to drive the report design/implementation.

I just thought about an ant task that makes use of the functionality (e.g. the spock extension). So it shouldn't depend on ant.
 
To post to this group, send email to spockframework@googlegroups.com.

To unsubscribe from this group, send email to

For more options, visit this group at
http://groups.google.com/group/spockframework?hl=en.


--
You received this message because you are subscribed to the Google Groups
"Spock Framework - User" group.
To post to this group, send email to spockframework@googlegroups.com.

To unsubscribe from this group, send email to

For more options, visit this group at
http://groups.google.com/group/spockframework?hl=en.




--
Guillaume Laforge
Groovy Project Manager
SpringSource, a division of VMware

Blog: http://glaforge.appspot.com/
Twitter: @glaforge <http://twitter.com/glaforge>

Google+: http://gplus.to/glaforge

--
You received this message because you are subscribed to the Google Groups "Spock Framework - User" group.
To post to this group, send email to spockframework@googlegroups.com.
To unsubscribe from this group, send email to spockframework+unsubscribe@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/spockframework?hl=en.

--
You received this message because you are subscribed to the Google Groups "Spock Framework - User" group.
To post to this group, send email to spockframework@googlegroups.com.
To unsubscribe from this group, send email to spockframework+unsubscribe@googlegroups.com.

Peter Niederwieser

unread,
Feb 10, 2012, 12:22:02 PM2/10/12
to spockfr...@googlegroups.com
On 10 Feb 2012, at 18:06, Benjamin Gudehus wrote:

> So it is (1) parsing the specifications, (2) adding information to it
> about
> successful and failed junit tests (also with the output of the power
> assertions) and (3) generate html reports.

An extension has direct access to all static information (spec name,
feature names, block descriptions, etc.). It can register a listener to
get notified about test results. There's also a request to report on
which _blocks_ have passed/failed, but that's a separate feature that
will require some changes to Spock internals.

> I see some use cases for just parse the specs (1), but __without__
> running
> them (2) and generate the html reports (3).

We could add a dryRun switch to Spock's configuration to enable this,
without leaving the JUnit box (i.e. everythings still gets executed via
JUnit).

Cheers,
Peter

Jan Ehrhardt

unread,
Feb 10, 2012, 2:19:21 PM2/10/12
to spockfr...@googlegroups.com

Hi Peter,

Am 10.02.2012 17:47 schrieb "Peter Niederwieser" <pnie...@gmail.com>:
>
> There's no existing report as so far we are relying on build tools to produce a (JUnit) report. The report should read like a specification. It should contain 1. spec names 2. feature names 3. block descriptions. It shouldn't contain technical words like "class", "method", etc. It should look more like a narrative than a table, and should make good use of color (coding). It could (potentially) be a spin-off of Gradle's JUnit report. The reports produced by Rspec, Cucumber, JBhehave, and EasyB might also be good inspirations.

that is exacly what I wanted to do. I will also look at Gradle's reports.

>
> I don't want this to be an Ant task. It should be implemented as a Spock extension so that it works in any environment. Extensions can have their own configuration, e.g. for the report location. I'd take over the extension part, but I need someone else to drive the report design/implementation.

The extension part looks pretty simple. I will put it on a separate github repo. It can be moved into Spock's code base later. I'll post a link for testing soon.

Regards
Jan Ehrhardt

Jeff Winkler

unread,
Mar 6, 2012, 9:17:39 AM3/6/12
to spockfr...@googlegroups.com
Is this thread still going? :) A site with examples of HTML Reports for BDD tests is relishapp.com. It scrapes public Rails projects with Cucumber tests and does HTML reports for them.

Some examples:

https://www.relishapp.com/maxschulze/mylinkpower/docs/user/public-sneak-peak
https://www.relishapp.com/leesmith/decent-authentication/docs/user-registers

Aravind Reddy

unread,
Mar 6, 2012, 7:03:26 PM3/6/12
to spockfr...@googlegroups.com
I hope this thread is still active as I remember someone volunteered to come up with the reports. We have invested a LOT on spock (700 automated tests) and also started looking into Gen for UI automation. It is about time to make Spock, the go to tool for BDD.

--
You received this message because you are subscribed to the Google Groups "Spock Framework - User" group.
To view this discussion on the web visit https://groups.google.com/d/msg/spockframework/-/IfAJ6sdMw0gJ.

To post to this group, send email to spockfr...@googlegroups.com.
To unsubscribe from this group, send email to spockframewor...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/spockframework?hl=en.



--
Aravind . Y
248 890 7565 (Cell)

Benjamin Gudehus

unread,
Mar 6, 2012, 8:09:24 PM3/6/12
to spockfr...@googlegroups.com
Hi Jeff, hi Aravind,

as far as I can see, Jan is still working on spock-reports. Just some patience,
I think he will let us know if he has something to show :)

Greetings,
Benjamin

2012/3/7 Aravind Reddy <yara...@gmail.com>

marko

unread,
Jul 5, 2012, 12:05:28 PM7/5/12
to spockfr...@googlegroups.com
I have created a JIRA if anyone would like to vote:-)
http://jira.codehaus.org/browse/GEB-205


--
View this message in context: http://spock-framework.3207229.n2.nabble.com/Spock-s-next-release-tp6988336p7572814.html
Sent from the Spock Framework mailing list archive at Nabble.com.

Luke Daley

unread,
Jul 5, 2012, 1:46:47 PM7/5/12
to spockfr...@googlegroups.com
You've raised that against Geb, not Spock, which is a completely separate project.

I'm also curious as to why you don't just use Cucumber if you want its features.

Peter Niederwieser

unread,
Jul 5, 2012, 2:01:20 PM7/5/12
to spockfr...@googlegroups.com
I guess he's looking for a way to use Geb with Cucumber(-jvm).

Cheers,
Peter

marko

unread,
Jul 5, 2012, 5:54:34 PM7/5/12
to spockfr...@googlegroups.com
Opps, sorry for raising the Wish against Geb, the intent was Spock.

I guess i confused the issue by mentioning Cucumber.  It just served as a concrete example of some of the features i wish were added to Spock, particularly around BDD testing, acceptance specs, live doc, etc...

Spock is fantastic, particularly it's integration with Groovy/Geb/Grails, it's mocking framework, ability to unit/integration/acceptance test, etc...  I am just requesting that Spock be pushed further with respect to BDD, mostly so business users and QA can directly participate with the tool.
Reply all
Reply to author
Forward
0 new messages