3. Get Code Stubs

Applies to TestLeft 15.40, last modified on March 17, 2022

When the feature story is ready, you can get code snippets for step definitions.

  1. Right-click within the window of the open feature file and select Generate Step Definitions from the context menu:

    SpecFlow test with TestLeft: Generating step definitions

    Click the image to enlarge it.

  2. In the subsequent dialog, you can select steps from which you want to generate definitions, specify a name for a new class and choose a step definition style.

    Leave the default values and click Generate:

    SpecFlow test with TestLeft: The Generate Step Definition Skeleton dialog
  3. In the next dialog, specify where to save a new class.

SpecFlow will generate code snippets for the selected test steps:

SpecFlow test with TestLeft: Generated code snippets

Click the image to enlarge it.

Prev     Next

See Also

Behavior-Driven Development
About Behavior-Driven Development

Highlight search results