Skip to content

Universal RobotFramework test library for implementing Python based keywords

License

Notifications You must be signed in to change notification settings

amochin/SingleTestLib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SingleTestLib

Universal RobotFramework test library for implementing Python based keywords

Introduction

RobotFramework is an incredible test automation framework with great features for writing keyword-driven tests and reporting. It has a lot of test libraries, e.g. SeleniumLibrary, AutoItLibrary or SikuliLibrary.

However using low-level keywords from these libraries directly in RF test cases is often not really comfortable (think about loops, some logical, arithmetic and string operations etc.).

A solution is moving the mid-level keywords to test libraries and implementing them with the whole power of a programming language (e.g. Python or Java). There are different tools and approaches for that. Basically you can either create your own test libraries or take one of already existing solutions - and SingleTestLib is one of them.

Unlike other tools, SingleTestLib doesn't help you to create multiple RF test libraries - instead, it acts as a single entry point to all your keywords (though allowing to structure them).

With SingleTestLib you implement keywords just as usual Python functions, ordering them in the module structure. One module might correspond to one web page or a logical part of your web app.

The SingleTestLib scans all functions in .py modules in the keywords subfolder and makes them available as keywords in RF test cases.

Architecture

Architecture picture

Key points

  • Implement complex keywords in Python
  • No need to include every module as separate test library in RF test cases and maintain the list - you just reference the SingleTestLib only once
  • Keywords are available in RF via module name.function name names - easy search and use
  • Enjoy all benefits of RIDE intelligent functions - autocomplete, getting arguments and docs
  • Works with any Python-ready automation library (e.g. Selenium, AutoIt or Sikuli)
  • Automatic taking screenshots in case of failed keyword execution

Quick Start

  • Reference the SingleTestLib.py file as a test library in your .robot test cases
  • Create .py modules in the keywords subfolder and implement functions inside modules
  • That's it! Functions are immediately available from the .robot test cases via combined names module name.function name

See module and test case examples.

Requirements

About

Universal RobotFramework test library for implementing Python based keywords

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published