First test
Write and run a simple .stk scenario
Create a file
Save as login.stk:
Group: Authentication
Scenario: User login happy path
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"Every web scenario needs a starting page via navigate to "…". Use a full URL or an environment variable such as "$BASE_URL". There is no STK_BASE_URL.
Run it
strikekit run login.stk
strikekit run --browsers chrome login.stk
strikekit run --headed --browsers chrome login.stkProgress appears on stderr. Structured NDJSON events go to stdout.
Labels, not selectors
Quoted values like "username" and "Login" are plain labels. StrikeTest finds elements automatically (id, data-testid, aria-label, visible text, and related strategies). Do not put CSS or XPath in .stk files.
Step prefixes
| Prefix | Meaning |
|---|---|
Given I | Precondition / starting state |
When I | Primary user action |
And I | Continuation of the previous step type |
Then I | Assertion / expected outcome |
The I is optional when you type; the formatter always outputs the canonical Given I / When I / And I / Then I form.
Filter runs
# Only scenarios tagged @smoke
strikekit run --tag smoke login.stk
# Only when Group: matches
strikekit run --group "Authentication" login.stkTag scenarios on the Scenario: line:
Scenario: User login @smokeNext
- Examples — full
.stkscenario files to copy - Language — file structure, blocks, syntax, slots
- Commands reference
- Qualifiers reference