Discussion:
[Cucumber:6059] Re: Cucumber-In-The-Yard (Documentation)
(too old to reply)
Franklin Webber
2010-10-29 00:41:56 UTC
Permalink
Raw Message
Matt et al,

Cucumber-In-The-YARD,http://github.com/burtlo/Cucumber-In-The-Yard,
now matches step transforms to the steps that have be matched to their
step definition (given that all the constants used in them have been
loaded).

Example: http://recursivegames.com/cukes/requirements/step_transformers.html#definition_1-stepdefinition

I ran into that performance nightmare that I worried about where my
large cucumber project (129 features / 524 scenarios) took about 2
hours to complete documentation! After some quick optimizations I got
the process down to 16 minutes. Before I proceed with the next
iteration I wanted to share some thoughts to brainstorm ideas and also
to ensure I am not reproducing work.


I have completed the first two steps:

Step 1. Cache the Step Definitions and Step Transforms instead of
looking in the YARD::Registry each time.

Step 2. Retrieve all Step Definition and Step Transform comparison
values, turn them into regular expressions, and create a hash
structure with the regex as the key and StepDefinition/StepTransform
object as the value.


Here are my thoughts about future optimization:

Step 3. Step Definition and Step Transforms that have been matched are
moved to the top of the list; allowing the next comparison of the step
to benefit.

* Scenario Outlines are very often the same series of steps mapped to
step definitions so this could be further optimized, for very minor
gain, by queuing up the steps in order of the scenario outline.

* Step Transforms are maintained in order of how often they are used
instead of last time they were used. In the current project, and I am
guessing other projects, that certain step transforms are used more
than others and it would be more efficient to maintain them in most
used order. This again would be a minor improvement over simply
bringing the last matched item to the top of the list.


Any suggestions, ideas or comments?
--
You received this message because you are subscribed to the Google Groups "Cukes" group.
To post to this group, send email to cukes-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To unsubscribe from this group, send email to cukes+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit this group at http://groups.google.com/group/cukes?hl=en.
Franklin Webber
2010-10-29 19:33:06 UTC
Permalink
Raw Message
Post by Franklin Webber
Step 3. Step Definition and Step Transforms that have been matched are
moved to the top of the list; allowing the next comparison of the step
to benefit.
* Scenario Outlines are very often the same series of steps mapped to
step definitions so this could be further optimized, for very minor
gain, by queuing up the steps in order of the scenario outline.
Upon further conversion with a co-worker suggested more of a cache
list but I realize that I have not taken into consideration steps
matching multiple step definitions. So this optimization is not idea
if I wanted to share in the documentation the ambiguous step
definitions.
Post by Franklin Webber
* Step Transforms are maintained in order of how often they are used
instead of last time they were used.  In the current project, and I am
guessing other projects, that certain step transforms are used more
than others and it would be more efficient to maintain them in most
used order.  This again would be a minor improvement over simply
bringing the last matched item to the top of the list.
My large project has 33 Transforms and any benefit here would be
extremely marginal.
Post by Franklin Webber
Any suggestions, ideas or comments?
--
You received this message because you are subscribed to the Google Groups "Cukes" group.
To post to this group, send email to cukes-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To unsubscribe from this group, send email to cukes+***@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cukes?hl=en.
Dave McNulla
2012-06-13 04:38:05 UTC
Permalink
Raw Message
Was there any progress for this? I was thinking that I needed something
like this and was about to start writing some mickey mouse parser when I
decided to look first. Thanks,

Dave
aslakhellesoy et al,
I recently finished some preliminary work on an Cucumber YARD
extension. Cukes-in-the-YARD is able to parse features, scenarios,
tags, and step definitions/transforms. Creating searchable
documentation (by feature, tag, scenario, and step) and mapping steps
to step definitions.
http://recursivegames.com/cukes/
Project Home: http://github.com/burtlo/Cucumber-In-The-Yard
Gem information: http://rubygems.org/gems/cucumber-in-the-yard
I initially started out utilizing a very poor custom feature file
parser that I a later replaced with Gherkin. There are more
optimizations and clean up in store for the project.
One feature of the gem performs mapping steps to step definitions. At
the moment, after I have loaded a feature, I look through all the
steps and find a regexp match to a step definition and establish that
link. I feel as though I am being horribly inefficient O(n^2) in this
area and I am also likely re-creating functionality (similar to the
parser) that already exists in Cucumber. I wanted to know if there
were some tactics that any of you have employed with regards to step
to step definition/transform mapping.
Thank you aslakhellesoy and to every contributor to the Cucumber
project.
Cheers,
Frank
-- Rules --

1) Please prefix the subject with [Ruby], [JVM] or [JS].
2) Please use interleaved answers http://en.wikipedia.org/wiki/Posting_style#Interleaved_style
3) If you have a question, don't reply to an existing message. Start a new topic instead.

You received this message because you are subscribed to the Google Groups Cukes group. To post to this group, send email to cukes-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org To unsubscribe from this group, send email to cukes+***@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/cukes?hl=en
DEEPAK KUMAR
2017-10-13 10:17:22 UTC
Permalink
Raw Message
Thanks guys.

You guys are awsm.

Could you please let me know that now java support is available or not. I
am looking to parse java step definition. If yes, please let me the steps
to produce document from java step definition files because I am new for
ruby.

Thanks in advance.

Looking for your help.
--
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
80Vikram
2017-10-23 15:36:06 UTC
Permalink
Raw Message
Hi Deepak,

Using yard cucumber is quite simple and doesn't need detailed Ruby
knowledge.

You can refer to blog
https://nileshdk.wordpress.com/2014/03/16/bdd-living-documentation-using-yard-cucumber/

Regards,
Vikram
Post by DEEPAK KUMAR
Thanks guys.
You guys are awsm.rd
Could you please let me know that now java support is available or not. I
am looking to parse java step definition. If yes, please let me the steps
to produce document from java step definition files because I am new for
ruby.
Thanks in advance.
Looking for your help.
--
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...