Hi, I am using Cucumber in combination with tests that drive the actual browser. Is there a place where I can easily trap an exception and take a screenshot of the browser? Regards Aidy
On Mon, Dec 22, 2008 at 9:46 PM, aidy lewis <aidy.lewis at googlemail.com>wrote:> Hi, > > I am using Cucumber in combination with tests that drive the actual > browser. > > Is there a place where I can easily trap an exception and take a > screenshot of the browser? >http://github.com/aslakhellesoy/cucumber/wikis/hooks Use AfterStep. Currently there is no easy way for the AfterStep block to figure out whether a step failed or not though. Existing tix: http://rspec.lighthouseapp.com/projects/16211-cucumber/tickets/44-ability-to-teardown-failing-or-pending-scenarios-in-different-ways http://rspec.lighthouseapp.com/projects/16211/tickets/110-after-method-status-check Aslak> > Regards > > Aidy > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20081222/d3c240d0/attachment.html>
Hi Aslak, Thanks for the heads-up, but it seems the AfterStep block is only executed if a step passes and not if it fails, is pending, skipped or non-implemented. I tried to run a debugger on it to see what happens, but I think Cucumber is opening another Ruby process and preventing me from debugging. Thanks Aidy 2008/12/22 aslak hellesoy <aslak.hellesoy at gmail.com>:> > > On Mon, Dec 22, 2008 at 9:46 PM, aidy lewis <aidy.lewis at googlemail.com> > wrote: >> >> Hi, >> >> I am using Cucumber in combination with tests that drive the actual >> browser. >> >> Is there a place where I can easily trap an exception and take a >> screenshot of the browser? > > http://github.com/aslakhellesoy/cucumber/wikis/hooks > > Use AfterStep. Currently there is no easy way for the AfterStep block to > figure out whether a step failed or not though. > Existing tix: > > http://rspec.lighthouseapp.com/projects/16211-cucumber/tickets/44-ability-to-teardown-failing-or-pending-scenarios-in-different-ways > http://rspec.lighthouseapp.com/projects/16211/tickets/110-after-method-status-check > > Aslak > >> >> Regards >> >> Aidy >> _______________________________________________ >> rspec-users mailing list >> rspec-users at rubyforge.org >> http://rubyforge.org/mailman/listinfo/rspec-users > > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >
Hi, I have not had any trouble opening the debugger in cucumber. Then "debug" do debugger stop_here = 1 end M On Tue, Dec 23, 2008 at 4:12 AM, aidy lewis <aidy.lewis at googlemail.com>wrote:> Hi Aslak, > > Thanks for the heads-up, but it seems the AfterStep block is only > executed if a step passes and not if it fails, is pending, skipped or > non-implemented. > > I tried to run a debugger on it to see what happens, but I think > Cucumber is opening another Ruby process and preventing me from > debugging. > > Thanks > > Aidy > > 2008/12/22 aslak hellesoy <aslak.hellesoy at gmail.com>: > > > > > > On Mon, Dec 22, 2008 at 9:46 PM, aidy lewis <aidy.lewis at googlemail.com> > > wrote: > >> > >> Hi, > >> > >> I am using Cucumber in combination with tests that drive the actual > >> browser. > >> > >> Is there a place where I can easily trap an exception and take a > >> screenshot of the browser? > > > > http://github.com/aslakhellesoy/cucumber/wikis/hooks > > > > Use AfterStep. Currently there is no easy way for the AfterStep block to > > figure out whether a step failed or not though. > > Existing tix: > > > > > http://rspec.lighthouseapp.com/projects/16211-cucumber/tickets/44-ability-to-teardown-failing-or-pending-scenarios-in-different-ways > > > http://rspec.lighthouseapp.com/projects/16211/tickets/110-after-method-status-check > > > > Aslak > > > >> > >> Regards > >> > >> Aidy > >> _______________________________________________ > >> rspec-users mailing list > >> rspec-users at rubyforge.org > >> http://rubyforge.org/mailman/listinfo/rspec-users > > > > > > _______________________________________________ > > rspec-users mailing list > > rspec-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/rspec-users > > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20081223/41bab15e/attachment.html>
On Tue, Dec 23, 2008 at 1:12 PM, aidy lewis <aidy.lewis at googlemail.com>wrote:> Hi Aslak, > > Thanks for the heads-up, but it seems the AfterStep block is only > executed if a step passes and not if it fails, is pending, skipped or > non-implemented. > > I tried to run a debugger on it to see what happens, but I think > Cucumber is opening another Ruby process and preventing me from > debugging. >The Cucumber Rails task is forking a new Ruby process (just like the Test::Unit and RSpec tasks). Cucumber itself is not forking anything though. Aslak> > Thanks > > Aidy > > 2008/12/22 aslak hellesoy <aslak.hellesoy at gmail.com>: > > > > > > On Mon, Dec 22, 2008 at 9:46 PM, aidy lewis <aidy.lewis at googlemail.com> > > wrote: > >> > >> Hi, > >> > >> I am using Cucumber in combination with tests that drive the actual > >> browser. > >> > >> Is there a place where I can easily trap an exception and take a > >> screenshot of the browser? > > > > http://github.com/aslakhellesoy/cucumber/wikis/hooks > > > > Use AfterStep. Currently there is no easy way for the AfterStep block to > > figure out whether a step failed or not though. > > Existing tix: > > > > > http://rspec.lighthouseapp.com/projects/16211-cucumber/tickets/44-ability-to-teardown-failing-or-pending-scenarios-in-different-ways > > > http://rspec.lighthouseapp.com/projects/16211/tickets/110-after-method-status-check > > > > Aslak > > > >> > >> Regards > >> > >> Aidy > >> _______________________________________________ > >> rspec-users mailing list > >> rspec-users at rubyforge.org > >> http://rubyforge.org/mailman/listinfo/rspec-users > > > > > > _______________________________________________ > > rspec-users mailing list > > rspec-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/rspec-users > > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20081224/822f80e4/attachment-0001.html>
>> Cucumber itself is not forking anything though.Sure it is, Cucumber is forking cool. Tim On Tue, Dec 23, 2008 at 4:49 PM, aslak hellesoy <aslak.hellesoy at gmail.com> wrote:> > > On Tue, Dec 23, 2008 at 1:12 PM, aidy lewis <aidy.lewis at googlemail.com> > wrote: >> >> Hi Aslak, >> >> Thanks for the heads-up, but it seems the AfterStep block is only >> executed if a step passes and not if it fails, is pending, skipped or >> non-implemented. >> >> I tried to run a debugger on it to see what happens, but I think >> Cucumber is opening another Ruby process and preventing me from >> debugging. > > The Cucumber Rails task is forking a new Ruby process (just like the > Test::Unit and RSpec tasks). > Cucumber itself is not forking anything though. > > Aslak > >> >> Thanks >> >> Aidy >> >> 2008/12/22 aslak hellesoy <aslak.hellesoy at gmail.com>: >> > >> > >> > On Mon, Dec 22, 2008 at 9:46 PM, aidy lewis <aidy.lewis at googlemail.com> >> > wrote: >> >> >> >> Hi, >> >> >> >> I am using Cucumber in combination with tests that drive the actual >> >> browser. >> >> >> >> Is there a place where I can easily trap an exception and take a >> >> screenshot of the browser? >> > >> > http://github.com/aslakhellesoy/cucumber/wikis/hooks >> > >> > Use AfterStep. Currently there is no easy way for the AfterStep block to >> > figure out whether a step failed or not though. >> > Existing tix: >> > >> > >> > http://rspec.lighthouseapp.com/projects/16211-cucumber/tickets/44-ability-to-teardown-failing-or-pending-scenarios-in-different-ways >> > >> > http://rspec.lighthouseapp.com/projects/16211/tickets/110-after-method-status-check >> > >> > Aslak >> > >> >> >> >> Regards >> >> >> >> Aidy >> >> _______________________________________________ >> >> rspec-users mailing list >> >> rspec-users at rubyforge.org >> >> http://rubyforge.org/mailman/listinfo/rspec-users >> > >> > >> > _______________________________________________ >> > rspec-users mailing list >> > rspec-users at rubyforge.org >> > http://rubyforge.org/mailman/listinfo/rspec-users >> > >> _______________________________________________ >> rspec-users mailing list >> rspec-users at rubyforge.org >> http://rubyforge.org/mailman/listinfo/rspec-users > > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >