How to capture screen shots only on Error

123 views
Skip to first unread message

rajeshwar lokineni

unread,
Jul 29, 2016, 11:21:17 AM7/29/16
to Geb User Mailing List
Hi,

I am currently using GEB with SPOCK.

I am able to capture screen shots using report() available in GebReportingSpec() class.

I am getting screenshots even for success tests which i dont want to happen. I even tried "reportOnTestFailureOnly = true" in GebConfig file but still i see getting screen shots for every method.

Any suggestions will be appreciated.

Thanks,
Rajeshwar

Raviteja Lokineni

unread,
Jul 29, 2016, 2:36:22 PM7/29/16
to geb-...@googlegroups.com
Probably debugging at line 48 in https://github.com/geb/geb/blob/master/module/geb-spock/src/main/groovy/geb/spock/GebReportingSpec.groovy should be a start.

If it's a bug and you found the root cause, a pull request would be a good start ☺.

--
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/44ca7f0b-aa25-43f5-a10c-1c534029a9f2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Raviteja Lokineni | Business Intelligence Developer
TD Ameritrade


Raviteja Lokineni

unread,
Jul 29, 2016, 3:29:59 PM7/29/16
to geb-...@googlegroups.com
FYI, not reproducible for me. (I was curious so tried debugging it)

Attached the test project.
test-geb.zip

Craig Atkinson

unread,
Jul 29, 2016, 4:27:14 PM7/29/16
to geb-...@googlegroups.com
The line you added into GebConfig.groovy looks correct. 

The reportOnTestFailureOnly feature is pretty recent in Geb (I think it was added in Geb 0.13.0) - just to double-check, which version of Geb are you using?

Reply all
Reply to author
Forward
0 new messages