2. Create a Feature Story

Applies to TestLeft 4.91, last modified on July 1, 2021

Let’s create a feature story for the SpecFlow test.

  1. Right-click the project in the Solution Explorer and select Add > New Item:

    SpecFlow test with TestLeft: Adding a new item to the project

    Click the image to enlarge it.

  2. In the subsequent dialog, select SpecFlow Feature File, give it a name and click Add:

    SpecFlow test with TestLeft: Adding a feature file

    Click the image to enlarge it.

  3. Write a feature story to the created file:

    Feature: Run the "Undo" command using hotkeys
      In order to check the undo functionality
      As a user
      I want Notepad to run the "Undo" command using the hotkeys Ctrl + z

     Scenario: Run the "Undo" command using hotkeys
        Given I open Notepad
            And there is no text in Notepad
        When I type "Some text"
            And I press [Ctrl + z]
        Then I should see no text in Notepad

    This feature story contains only one scenario: the user types “Some text” in the Notepad window and then presses Ctrl+Z to undo the action. Notepad should remove the typed text and show no text.

Prev     Next

See Also

Behavior-Driven Development
About Behavior-Driven Development

Highlight search results