Skip to content
Novus Examples
robot768 B

Robot Framework — Shared Keyword Resource

A resource file: keywords, variables and imports with no *** Test Cases *** section at all, meant to be imported by the suites next to it. Tooling that requires at least one test case rejects a perfectly ordinary resource, and keyword defaults such as ${qty}=1 are where argument parsers usually stop.

Preview — first 27 linesrobot
*** Settings ***
Documentation     Shared keywords for the checkout suites. Imported, never run directly.
Library           CartLibrary

*** Variables ***
${DEFAULT SKU}    NX-1042

*** Keywords ***
Start Sample Service
    [Documentation]    Starts the fictional checkout service used by every suite.
    Start Service    https://www.example.com
    Wait Until Ready    timeout=10s

Stop Sample Service
    Stop Service

Add To Cart
    [Arguments]    ${sku}=${DEFAULT SKU}    ${qty}=1
    [Documentation]    Adds ${qty} of ${sku}; both arguments have defaults.
    Post To Cart    sku=${sku}    qty=${qty}

Total Should Be
    [Arguments]    ${expected}
    ${actual} =    Get Total
    Should Be Equal As Numbers    ${actual}    ${expected}
    RETURN    ${actual}

Specifications

Seed
61200
Encoding
UTF-8
Line Endings
LF
Syntax
space-separated plain text
Test Cases
0
Keywords
4
Has Default Arguments
true
Has Named Arguments
true
Has Return Statement
true
Importable
true

Testing contract

Expected to pass
Scenario
Import a Robot resource file that declares keywords but no tests.
Expected result
4 keywords are exposed with their default and named arguments intact, and the absence of a test-case section is not an error.

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 — Shared Keyword Resource” 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.

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