Data Tables Line break / Wrap

251 views
Skip to first unread message

N Kuruba

unread,
May 21, 2015, 5:43:01 AM5/21/15
to geb-...@googlegroups.com
I am using Geb/Groovy/Spock framework and working on parameterizing my tests with the data tables.

eg. 

where:
            name   |    address   |   occupation
             'John'  |    'London'   |   'Manager'
             'Tom'  |    'Zurich'     |   'Architect'

I have long list of attributes which makes my table row much longer, is there a way to present the data table in parts with a possible line break ?
As the data table goes alongside the code (BDD style) ... it becomes harder to reach to the columns while entering data.

Thanks!

    

Bob Brown

unread,
May 21, 2015, 6:00:28 AM5/21/15
to geb-...@googlegroups.com
Note that you don’t have to have your parameters inline. You can get them from pretty much anywhere. The spock doc gives an example using a database:

https://code.google.com/p/spock/wiki/Parameterizations

“””
It is very easy to write a custom data provider. Just implement the methods next() and hasNext() (as defined in java.util.Iterator) and optionally size() and close(), and you are ready to go!
“””

And even a spreadsheet is possible:

http://wordpress.transentia.com.au/wordpress/2012/11/11/testing-and-evaluating-a-simple-set-of-classes/

HTH

BOB
> --
> You received this message because you are subscribed to the Google Groups "Geb User Mailing List" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to geb-user+u...@googlegroups.com.
> To post to this group, send email to geb-...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/geb-user/b34debae-c7c4-48b9-bfc7-2fc36ed86bcf%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

N Kuruba

unread,
May 21, 2015, 6:20:54 AM5/21/15
to geb-...@googlegroups.com
thanks for your reply, in BDD style I was under the impression that inline tables are the best way of parameterization, in terms of maintainabiity etc.
I may be wrong though, however it would be great if there is a way to break/wrap the inline data table

Thanks.
Reply all
Reply to author
Forward
0 new messages