Skip to main content

Robot Framework test library for serial connection

Project description

This is a serial port test library for Robot Framework.

Example:

*** settings ***
Library    SerialLibrary    loop://    encoding=ascii

*** test cases ***
Hello serial test
     Write Data    Hello World
     Read Data Should Be    Hello World

Another Example:

*** settings ***
Library    SerialLibrary

*** test cases ***
Read Until should read until terminator or size
    [Setup]    Add Port    loop://    timeout=0.1
    ${bytes} =    Set Variable
    Write Data    01 23 45 0A 67 89 AB CD EF
    ${read} =    Read Until
    Should Be Equal As Strings    ${read}    01 23 45 0A
    ${read} =    Read Until   size=2
    Should Be Equal As Strings    ${read}    67 89
    ${read} =    Read Until   terminator=CD
    Should Be Equal As Strings    ${read}    AB CD
    ${read} =    Read Until
    Should Be Equal As Strings    ${read}    EF
    ${read} =    Read Until
    Should Be Equal As Strings    ${read}    ${EMPTY}
    [Teardown]    Delete All Ports

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-seriallibrary-0.4.3.tar.gz (9.9 kB view hashes)

Uploaded Source

Built Distribution

robotframework_seriallibrary-0.4.3-py2.py3-none-any.whl (9.7 kB view hashes)

Uploaded Python 2 Python 3

Supported by

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