-
Notifications
You must be signed in to change notification settings - Fork 46
Home
-
Mapping Steps to Step Definitions and Step Transforms
-
- Cache the step definitions and step transforms
-
- Retrieve all comparison values, turn them into regular expressions, and create a data structure that allows each step to iterate through them; returning the step definition and/or step transform object back.
-
- Step Definition that have been matched are moved to the top of the list; allowing the next comparison of the step to benefit
This would definitely benefit steps as they are often repeated many times across the scenarios and feature. Scenario Outlines nearly always match to the same series of step definitions and so this could be used to optimized. The negative impact is low based on the gains.
-
- Step Transforms that have been matched are moved to the top of the list; allowing the next comparison of the step to benefit
-
- Step Transforms are maintained in order of use.
I am guessing that some transforms are used more than others and maintaining a sorted order based on match could be useful. This would be a minor improvement over simply bringing the last matched item to the top of the list.
-
Serializing to HTML Step match highlight
-
- Highlighting of each term is found and performed at time of serialization. It might be possible when the Step is mapped to the Step Definition and Step Transforms save it in some state that may be more easily serializable.
This is an attempt to create a resource to assist with the creation of handlers, parsers, code objects, templates, and other resources necessary to integrate with the YARD gem. This is a starting point to capture some of the information that I learned while creating the Cucumber extension for YARD.
-
Creating a YARD Parser
Want YARD to assist to recognize files of different types? You must first describe to YARD how to parse these files by creating a parser and then registering it.
-
Creating a YARD Handler
YARD understands the files you are after, thanks to your work creating a custom parser (or is it already processing the file type) and now you want to convert the contents into lean, mean fighting objects that YARD understands.
-
Creating or updating a YARD Template
YARD has created objects and now you want to display them in an existing template or create a new template.