Step Definitions

Step definitions are an integral part of automated testing frameworks, especially those following the behavior-driven development (BDD) or test-driven development (TDD) approach. They act as the bridge between the test scenarios or feature files written in a human-readable format and the actual implementation code.

Example:

Feature: Example test for "Then I should be on 'page'"
  As a tester
  I want to be sure I am on "page"

  Scenario: Check "Then I should be on the 'page'" step definition
    Given I am on the homepage
    When I follow "About Us"
    Then I should be on "about-us.html"
    When I move backward one page
    Then I should be on "/"