Steve Molitor
2008-Dec-12 20:39 UTC
[rspec-users] cucumber features HTML output bug with more than 100 steps
I''m having the following problem: With the format as html, the output of cucumber stops coloring successful steps green after step #100. This last line in the HTML is: <script type="text/javascript">stepPassed(100)</script> Steps 101 -n are colored grey. The <body> tag is not closed but all steps are displayed. When running with ''format --pretty'' everything works fine and all steps are colored green. This is happening with jruby 1.1.4 on OS X and RedHat Linux. Any ideas? Could this be a bug? Steve -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20081212/442cce99/attachment-0001.html>
aslak hellesoy
2008-Dec-12 21:07 UTC
[rspec-users] cucumber features HTML output bug with more than 100 steps
On Fri, Dec 12, 2008 at 9:39 PM, Steve Molitor <stevemolitor at gmail.com>wrote:> I''m having the following problem: > > With the format as html, the output of cucumber stops coloring successful > steps green after step #100. This last line in the HTML is: > > <script type="text/javascript">stepPassed(100)</script> > > Steps 101 -n are colored grey. The <body> tag is not closed but all steps > are displayed. When running with ''format --pretty'' everything works fine > and all steps are colored green. This is happening with jruby 1.1.4 on OS X > and RedHat Linux. > > Any ideas? Could this be a bug? >It could. Please raise a ticket and attach the generated HTML. http://github.com/aslakhellesoy/cucumber/wikis/get-in-touch Aslak> > Steve > > _______________________________________________ > 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/20081212/5072f3a3/attachment.html>
Hi So I built a custom formatter as the default html provided seems to lack few information (like number of scenarios that passed,failed, skipped ..) I cannot seem to load my custom scenario I called it my_formatter.rb and class is MyFormatter. I tried cucumber -r my_formatter mytest.feature I tried cucumber -r my mytest.feature and no matter what I am getting the help menu with invalid format... also, is there a place to understand all the available hooks and order they are called? Looking at the html, pretty and progress , I can see a lot of available hooks with some that requires to call an accept method... Any ideas? Thanks Emmanuel
On Sat, Dec 13, 2008 at 12:55 AM, Emmanuel Pinault <seatmanu at gmail.com>wrote:> Hi > > So I built a custom formatter as the default html provided seems to lack > few information (like number of scenarios that passed,failed, skipped ..) > > I cannot seem to load my custom scenario > > I called it my_formatter.rb and class is MyFormatter. > > I tried cucumber -r my_formatter mytest.feature > I tried cucumber -r my mytest.feature > > and no matter what I am getting the help menu with invalid format... >Is the explanation of --format not clear? Have you tried: cucumber -r my_formatter -f MyFormatter mytest.feature> also, is there a place to understand all the available hooks and order they > are called? Looking at the html, pretty and progress , I can see a lot of > available hooks with some that requires to call an accept method... >What do you mean by hooks? This? http://github.com/aslakhellesoy/cucumber/wikis/hooks #accept is part of the internal API to traverse the internal structure of features. It''s using the visitor pattern. Are you familiar with that? Aslak> > Any ideas? > > Thanks > > Emmanuel > > _______________________________________________ > 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/20081213/9db20839/attachment.html>
> > Is the explanation of --format not clear? Have you tried: > > cucumber -r my_formatter -f MyFormatter mytest.featureYes, I tried that too and it is not working still. I started to digg in the cli.rb and clearly there is a registration process happening in the build_formatter_broadcaster. But somehow it is not finding my formatter .. trying to debug it more> > > > also, is there a place to understand all the available hooks and > order they are called? Looking at the html, pretty and progress , I > can see a lot of available hooks with some that requires to call an > accept method... > > What do you mean by hooks? This? http://github.com/aslakhellesoy/cucumber/wikis/hooksSorry I should have been more clear about the hooks.. I meant the formatter hooks. I see the main one used in the pretty_formatter and that are called by the executor. But It seems in the html_formatter that you are even using some other hook (likely those are called during the tree parsing ... just a guess) but cannot see all the one that are available and when. I am actually writing formatter to understand the order of calls.> > > #accept is part of the internal API to traverse the internal > structure of features. It''s using the visitor pattern. Are you > familiar with that?Yes I am and notice you use that pattern but I am not familiar with treetop. But seems a bit complicated for a custom reporter to have to mess with that. the HTML Report clearly will break without those calls at the right place... so a simple diagram would hel understanding how calls are made. Once I am able to rrun that custom report, I can try to make one and send it to you to add to the wiki Thanks Emmannuel> > Aslak > > > Any ideas? > > Thanks > > Emmanuel > > _______________________________________________ > 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/20081212/ea4cfc3e/attachment.html>
OK, I think I figured out the problem. I had the following module Cucumber module Formatters class MyFormatter As soon I as removed it from that module, then it started to work. I am not seeing different call and steps in the visitor printing ... maybe a nice simple example of create a formatter would have helped :) thanks Emmanuek On Fri, Dec 12, 2008 at 4:22 PM, Emmanuel Pinault <seatmanu at gmail.com> wrote:> > Is the explanation of --format not clear? Have you tried: > > cucumber -r my_formatter -f MyFormatter mytest.feature > > Yes, I tried that too and it is not working still. I started to digg in the > cli.rb and clearly there is a registration process happening in the > build_formatter_broadcaster. > But somehow it is not finding my formatter .. trying to debug it more > > > >> >> also, is there a place to understand all the available hooks and order >> they are called? Looking at the html, pretty and progress , I can see a lot >> of available hooks with some that requires to call an accept method... > > What do you mean by hooks? This? > http://github.com/aslakhellesoy/cucumber/wikis/hooks > > Sorry I should have been more clear about the hooks.. I meant the formatter > hooks. I see the main one used in the pretty_formatter and that are called > by the executor. But It seems in the html_formatter that you are even using > some other hook (likely those are called during the tree parsing ... just a > guess) but cannot see all the one that are available and when. I am actually > writing formatter to understand the order of calls. > > > #accept is part of the internal API to traverse the internal structure of > features. It''s using the visitor pattern. Are you familiar with that? > > Yes I am and notice you use that pattern but I am not familiar with > treetop. But seems a bit complicated for a custom reporter to have to mess > with that. the HTML Report clearly will break without those calls at the > right place... > so a simple diagram would hel understanding how calls are made. Once I am > able to rrun that custom report, I can try to make one and send it to you to > add to the wiki > Thanks > Emmannuel > > Aslak > >> >> Any ideas? >> >> Thanks >> >> Emmanuel >> >> _______________________________________________ >> 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 >
On Sat, Dec 13, 2008 at 1:22 AM, Emmanuel Pinault <seatmanu at gmail.com>wrote:> > Is the explanation of --format not clear? Have you tried: > > cucumber -r my_formatter -f MyFormatter mytest.feature > > > Yes, I tried that too and it is not working still. I started to digg in the > cli.rb and clearly there is a registration process happening in the > build_formatter_broadcaster. > But somehow it is not finding my formatter .. trying to debug it more > > > > > >> also, is there a place to understand all the available hooks and order >> they are called? Looking at the html, pretty and progress , I can see a lot >> of available hooks with some that requires to call an accept method... >> > > What do you mean by hooks? This? > http://github.com/aslakhellesoy/cucumber/wikis/hooks > > > Sorry I should have been more clear about the hooks.. I meant the formatter > hooks. I see the main one used in the pretty_formatter and that are called > by the executor. But It seems in the html_formatter that you are even using > some other hook (likely those are called during the tree parsing ... just a > guess) but cannot see all the one that are available and when. I am actually > writing formatter to understand the order of calls. > > > > #accept is part of the internal API to traverse the internal structure of > features. It''s using the visitor pattern. Are you familiar with that? > > Yes I am and notice you use that pattern but I am not familiar with > treetop. But seems a bit complicated for a custom reporter to have to mess > with that. the >You''re right. And one of my first goals is to make it simpler. I started to investigate a new internal design for Cucumber today that will make several things easier - among them custom formatters. More info as I make progress. Aslak> HTML Report clearly will break without those calls at the right place... > so a simple diagram would hel understanding how calls are made. Once I am > able to rrun that custom report, I can try to make one and send it to you to > add to the wiki > > Thanks > > Emmannuel > > > Aslak > > >> >> Any ideas? >> >> Thanks >> >> Emmanuel >> >> _______________________________________________ >> 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/20081213/e0073be7/attachment.html>
On Sat, Dec 13, 2008 at 1:37 AM, Emmanuel Pinault <seatmanu at gmail.com>wrote:> OK, I think I figured out the problem. > > I had the following > > module Cucumber > module Formatters > class MyFormatter > > > As soon I as removed it from that module, then it started to work. I > am not seeing different call and steps in the visitor printing ... > maybe a nice simple example of create a formatter would have helped > :) >Did you try -f Cucumber::Formatters::MyFormatter ? That should have worked.> > thanks > > Emmanuek > > On Fri, Dec 12, 2008 at 4:22 PM, Emmanuel Pinault <seatmanu at gmail.com> > wrote: > > > > Is the explanation of --format not clear? Have you tried: > > > > cucumber -r my_formatter -f MyFormatter mytest.feature > > > > Yes, I tried that too and it is not working still. I started to digg in > the > > cli.rb and clearly there is a registration process happening in the > > build_formatter_broadcaster. > > But somehow it is not finding my formatter .. trying to debug it more > > > > > > > >> > >> also, is there a place to understand all the available hooks and order > >> they are called? Looking at the html, pretty and progress , I can see a > lot > >> of available hooks with some that requires to call an accept method... > > > > What do you mean by hooks? This? > > http://github.com/aslakhellesoy/cucumber/wikis/hooks > > > > Sorry I should have been more clear about the hooks.. I meant the > formatter > > hooks. I see the main one used in the pretty_formatter and that are > called > > by the executor. But It seems in the html_formatter that you are even > using > > some other hook (likely those are called during the tree parsing ... just > a > > guess) but cannot see all the one that are available and when. I am > actually > > writing formatter to understand the order of calls. > > > > > > #accept is part of the internal API to traverse the internal structure of > > features. It''s using the visitor pattern. Are you familiar with that? > > > > Yes I am and notice you use that pattern but I am not familiar with > > treetop. But seems a bit complicated for a custom reporter to have to > mess > > with that. the HTML Report clearly will break without those calls at the > > right place... > > so a simple diagram would hel understanding how calls are made. Once I am > > able to rrun that custom report, I can try to make one and send it to you > to > > add to the wiki > > Thanks > > Emmannuel > > > > Aslak > > > >> > >> Any ideas? > >> > >> Thanks > >> > >> Emmanuel > >> > >> _______________________________________________ > >> 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/20081213/0ec8c443/attachment.html>
> > > Did you try -f Cucumber::Formatters::MyFormatter ? > That should have worked. >Yep works as well. Now that I have all the different possible hooks printed and ordering of events,. I can work on creating my template :) If you are interested I ll send you some of the improvments. I am using a combination of rspec and cucumber as both have good information style but could be improved slightly Emmanuel> > thanks > > Emmanuek > > On Fri, Dec 12, 2008 at 4:22 PM, Emmanuel Pinault > <seatmanu at gmail.com> wrote: > > > > Is the explanation of --format not clear? Have you tried: > > > > cucumber -r my_formatter -f MyFormatter mytest.feature > > > > Yes, I tried that too and it is not working still. I started to > digg in the > > cli.rb and clearly there is a registration process happening in the > > build_formatter_broadcaster. > > But somehow it is not finding my formatter .. trying to debug it > more > > > > > > > >> > >> also, is there a place to understand all the available hooks and > order > >> they are called? Looking at the html, pretty and progress , I can > see a lot > >> of available hooks with some that requires to call an accept > method... > > > > What do you mean by hooks? This? > > http://github.com/aslakhellesoy/cucumber/wikis/hooks > > > > Sorry I should have been more clear about the hooks.. I meant the > formatter > > hooks. I see the main one used in the pretty_formatter and that > are called > > by the executor. But It seems in the html_formatter that you are > even using > > some other hook (likely those are called during the tree > parsing ... just a > > guess) but cannot see all the one that are available and when. I > am actually > > writing formatter to understand the order of calls. > > > > > > #accept is part of the internal API to traverse the internal > structure of > > features. It''s using the visitor pattern. Are you familiar with > that? > > > > Yes I am and notice you use that pattern but I am not familiar with > > treetop. But seems a bit complicated for a custom reporter to have > to mess > > with that. the HTML Report clearly will break without those calls > at the > > right place... > > so a simple diagram would hel understanding how calls are made. > Once I am > > able to rrun that custom report, I can try to make one and send it > to you to > > add to the wiki > > Thanks > > Emmannuel > > > > Aslak > > > >> > >> Any ideas? > >> > >> Thanks > >> > >> Emmanuel > >> > >> _______________________________________________ > >> 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-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20081212/8eea89c7/attachment-0001.html>