StrikekitStrikekit

File structure

Group, Scenario / Feature, and step lines in a .stk file

Every .stk file has three levels:

LevelPurposeExample
GroupWraps related scenarios into a suiteGroup: Authentication Tests
Scenario / FeatureOne independent test caseScenario: User login happy path
StepsOne instruction per lineWhen I fill "username" with "chamodh"

Scenario: and Feature: mean the same thing. Indentation is for readability only — the keyword at the start of each line matters.

Example

Group: Authentication

    Scenario: User login @smoke
        Given I navigate to "https://example.com/login"
        When I fill "username" with "chamodh"
        And I fill "password" with "1234"
        And I click on "Login"
        Then I should see "Welcome back"

Step prefixes

Every step starts with (Given|When|And|Then) [I]:

PrefixMeaning
Given IPrecondition / starting state
When IPrimary user action
And IContinuation of the previous step type
Then IAssertion / expected outcome

I is optional when typing; the formatter always outputs the canonical Given I / When I / And I / Then I form.

Tags and filters

Scenario: / Feature: lines may include @tag tokens (not a step command):

Scenario: Login happy path @smoke @auth
strikekit run --tag smoke login.stk
strikekit run --group "Authentication" login.stk

On this page