Skip to main content

Robot Framework SchemathesisLibrary to automatically create test cases from API specifications.

Project description

Robot Framework SchemathesisLibrary

Robot Framework SchemathesisLibrary is a library build top of the Schemathesis. Schemathesis automatically generates thousands of test cases from your OpenAPI or GraphQL schema and finds edge cases that break your API.

SchemathesisLibrary uses DataDriver to create test cases from the Schemathesis Case object.

Installation

Install with pip, uv or any package manager that supports PyPi

pip install robotframework-schemathesislibrary

Keyword documentation

See keyword documentation for more details. A link older keyword documentation can be found from versions page

Usage

Test are automatically generated based your API specification, SchemathesisLibrary uses DataDriver internally, but you need to create template suite, so that DataDriver is able to create needed test for your test suite.

SchemathesisLibrary must be imported by url or path argument, which tell where the API specification can obtained. As like with Datadriver, there must be Test Template setting defined. The template keyword must take one argument, usually referred as ${case} and the template keyword must call Call And Validate keyword with the ${case} argument.

Example test suite:

*** Settings ***
Library             SchemathesisLibrary    url=http://127.0.0.1/openapi.json

Test Template       Wrapper


*** Test Cases ***
All Tests   # This test is deleted by DataDriver
    Wrapper    test_case_1


*** Keywords ***
Wrapper
    [Arguments]    ${case}
    Call And Validate    ${case}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

robotframework_schemathesislibrary-0.41.0.tar.gz (9.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file robotframework_schemathesislibrary-0.41.0.tar.gz.

File metadata

File hashes

Hashes for robotframework_schemathesislibrary-0.41.0.tar.gz
Algorithm Hash digest
SHA256 9760761fac2abb152ae516c78493d0abe46635ce1fa414af083740530a4b894c
MD5 93edb5ca8c672390f6c4a8e192a36c41
BLAKE2b-256 6f0bb9f779271cb78269ac511c8e084c2062b20933b3c95aca8780a92221e545

See more details on using hashes here.

File details

Details for the file robotframework_schemathesislibrary-0.41.0-py3-none-any.whl.

File metadata

File hashes

Hashes for robotframework_schemathesislibrary-0.41.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a5adb0639bf42a1ad70b31c6c15c9e9ddfc319462623f9f61cbcfc6bbf7ed9a5
MD5 eb8e49c9f6abab4407ceee79be53feaf
BLAKE2b-256 999f017c50422cb60a0eea4f8bf3e9b69a76a5a92cf225826bdf5a8f8e2097fd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page