Robot Framework — Checkout Suite
A complete Robot Framework suite with all four common sections, scalar, list and dictionary variables, a continued line using ..., and user keywords with arguments. Robot separates arguments on two or more spaces, so a parser splitting on a single space merges every keyword call into one token.
*** Settings ***
Documentation Checkout totals for the Novus Checkout Service, a fictional shop.
Library CartLibrary
Library Collections
Suite Setup Start Sample Service
Suite Teardown Stop Sample Service
Test Timeout 30 seconds
*** Variables ***
${BASE URL} https://www.example.com
${TAX RATE} 20
@{SKUS} NX-1042 NX-2087
&{PRICES} NX-1042=12.99 NX-2087=4.50
*** Test Cases ***
Applies The Unit Price
[Documentation] A single item shows its own price as the subtotal.
[Tags] pricing smoke
Empty The Cart
Add To Cart NX-1042 1
Subtotal Should Be 12.99
Applies Tax To The Subtotal
[Tags] pricing
Empty The Cart
Add To Cart NX-1042 1
Tax Should Be 2.60
Total Should Be 15.59
Rejects A Negative Quantity
[Tags] pricing validation
Empty The Cart
Run Keyword And Expect Error ValueError: quantity must be positive
... Add To Cart NX-1042 -1
*** Keywords ***
Empty The Cart
Remove All Items
Subtotal Should Be
[Arguments] ${expected}
${actual} = Get Subtotal
Should Be Equal As Numbers ${actual} ${expected}
Specifications
- Seed
- 61200
- Encoding
- UTF-8
- Line Endings
- LF
- Syntax
- space-separated plain text
- Sections
- 4
- Test Cases
- 3
- Keywords
- 2
- Libraries
- 2
- Variables
- 4
- Argument Separator
- four spaces
- Has Continuation
- true
- Has Suite Setup
- true
Testing contract
Expected to pass- Scenario
- Parse a Robot Framework suite into tests, keywords and variables.
- Expected result
- 3 test cases and 2 user keywords are found, ${TAX RATE} resolves to 20, and the ... line is joined to the keyword call above it rather than read as a fourth test.
What is a .robot file?
A .robot file is a Robot Framework test suite written in the framework's plain-text tabular syntax. Sections introduced by headers such as *** Settings ***, *** Variables ***, *** Test Cases ***, and *** Keywords *** hold library imports, variable definitions, keyword-driven test cases, and user-defined keywords, with arguments separated by two or more spaces. Tags, documentation, setup, and teardown are declared inline as settings.
How to use this file
Use an example .robot file to test Robot Framework parsers, linters, and editor tooling — checking section handling, the two-space argument separator, variable substitution, and keyword resolution against a suite whose structure is documented.
How to use this file for testing
“Robot Framework — Checkout Suite” is a deterministic Novus Examples fixture for Code parsing, Editor testing, Conversion testing. Short, known-correct source files in many languages with classes, functions, generics, enums, and error handling — for testing parsers, linters, formatters, language detection, and diff viewers.
Documented properties for this file: seed 61200 · UTF-8 · LF. Compare results against paired or grouped companions on this page when present (clean↔damaged, searchable↔scanned, or format twins) so scores stay reproducible across runs.
Download the file once, keep the path stable in CI or local scripts, and treat the spec table as the contract: dimensions, seeds, field lists, and roles are intentional. Corrupt or invalid samples are labelled as such — expect parsers to fail loudly rather than silently accept them.
Test and coverage reports document their totals (suites, cases, passes, failures, skips, covered lines) in the spec table. Point your CI dashboard, coverage gate, or report converter at the file and assert those counts survive; format twins carry identical numbers so a conversion can be scored exactly.
Related files
- featureGherkin — Background, Feature Tags and HooksA named Background whose two steps are prepended to all three scenarios, plus feature-level tags that every scenario inherits and scenario-level tags that only some carry. Tag filtering is where this file earns its keep: @slow selects one scenario by its own tag and all three by inheritance from the feature.

- featureGherkin — Checkout Feature (Background, Outline, Doc String)The source feature for this whole group: a Background with a data table, a plain scenario, a Scenario Outline expanded by two Examples tables, and a scenario asserting against a doc string. It compiles to exactly six pickles and 32 pickle steps — the numbers the cucumber-messages and cucumber.json twins next to it report.

- featureGherkin — Data Table and Doc String ArgumentsA step argument table with a header row, followed by two doc strings — one plain and one carrying a json content type after the opening delimiter. Doc string indentation is relative to the delimiter, so the receipt body must keep its internal column alignment while losing the six leading spaces.

- featureGherkin — Rule Keyword (Gherkin 6)Two Rule blocks, the first with its own Background that applies only to the examples inside it. Parsers written before Gherkin 6 either reject Rule outright or, worse, hoist the Background to the whole feature and add a step to the third example that was never there.

- featureGherkin — Scenario Outline with Two Examples TablesOne outline expanded by two separate Examples tables, the second of which carries its own @edge tag. Expansion must produce five scenarios, and only the two from the tagged table may match a run filtered on @edge — a distinction parsers that flatten the tables lose.

- featureGherkin — Step Argument and Expression TypesSteps exercising every argument shape a step-definition matcher has to handle: quoted strings with escaped inner quotes, integers, decimals, a comma-and-and list, the But keyword, and angle brackets in a plain Scenario where they are literal text rather than outline placeholders.

Generated by generation/testing.py. Free for any use, no attribution required — license.