An open API service indexing awesome lists of open source software.

https://github.com/crsdet/robotframework-sequencelibrary

Robot Framework library for running keywords in sequence
https://github.com/crsdet/robotframework-sequencelibrary

python robotframework

Last synced: 2 months ago
JSON representation

Robot Framework library for running keywords in sequence

Awesome Lists containing this project

README

          

# RobotFramework-SequenceLibrary

[![GitHub Actions status](https://github.com/crsdet/robotframework-sequencelibrary/actions/workflows/tests.yml/badge.svg)](https://github.com/crsdet/robotframework-sequencelibrary/actions) [![Version](https://img.shields.io/pypi/v/robotframework-sequencelibrary.svg?label=version)](https://pypi.python.org/pypi/robotframework-sequencelibrary) [![License](https://img.shields.io/pypi/l/robotframework-sequencelibrary.svg)](https://github.com/crsdet/robotframework-sequencelibrary/blob/main/LICENSE)

**RobotFramework-SequenceLibrary** is a [Robot Framework](https://robotframework.org) library for running keywords in sequence. The purpose is to streamline the execution of common operations by providing a condensed syntax that allows users to perform tasks with fewer lines of code.

## Installation

You can install robotframework-sequencelibrary via [pip](https://pip.pypa.io/en/stable):

~~~sh
pip install robotframework-sequencelibrary
~~~

## Usage

Documentation can be found at .

~~~robotframework
*** Settings ***
Library SequenceLibrary

*** Test Cases ***
Test Generate Random Int And Set A Test Variable
${num} Run Sequence
... Random Int 18 100
... AND
... Set Test Variable $RANDOM_NUMBER
Variable Should Exist ${RANDOM_NUMBER}
Should Be Equal ${num} ${RANDOM_NUMBER}

Test Replace Last Returned Value
${num} Run Sequence
... Random Int 18 100
... AND
... Set Test Variable $RANDOM_NUMBER
... AND
... Evaluate $_ + 10
... AND
... Set Test Variable $RANDOM_NUMBER_PLUS_10
Variable Should Exist ${RANDOM_NUMBER}
Variable Should Exist ${RANDOM_NUMBER_PLUS_10}
Should Be Equal ${RANDOM_NUMBER + 10} ${RANDOM_NUMBER_PLUS_10}
Should Be Equal ${num} ${RANDOM_NUMBER_PLUS_10}

Test Last Returned Value Remains If Previous Keyword Does Not Return A Value
${num} Run Sequence
... Random Int 18 100
... AND
... Log
... AND
... Set Test Variable $RANDOM_NUMBER
Variable Should Exist ${RANDOM_NUMBER}
Should Be Equal ${num} ${RANDOM_NUMBER}

~~~

You can also specify a different separator or replace string:

~~~robotframework
*** Settings ***
Library SequenceLibrary separator=${SEPARATOR} replace=${REPLACE}

*** Variables ***
${SEPARATOR} ->
${REPLACE} %
~~~

## License

RobotFramework-SequenceLibrary is open source software provided under the [MIT License](https://github.com/crsdet/robotframework-sequencelibrary/blob/main/LICENSE).