FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

SeleniumLibrary/utest at master · hsj51/SeleniumLibrary · GitHub

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.rst

Unit testing

Requirements

Before running the test, install the dependencies:

pip install -r requirements-dev.txt

Unit Tests

Units tests are written by using the pytest framework. Unit test can be executed by running:

python utest/run.py

The utest directory contains everything needed to run SeleniumLibrary unit tests. This includes:

  • Unit test in test folder.
  • Unit test runner: run.py

Unit test are executed using the interpreter which starts the run.py script.

ApprovalTests

For unit test, it is possible to use ApprovalTests framework. ApprovalTests provides an easy and visual way to compare strings in unit tests. For more details, please read ApprovalTests documentation and ApprovalTests blog post.

The downside of ApprovalTests is that SeleniumLibrary is mainly developed in Linux and therefore unit tests using ApprovalTests are skipped in Windows OS. This needs to be done until ApprovalTests issue #41 is fixed. To skip tests, mark test as: @unittest.skipIf(WINDOWS, reason='ApprovalTest do not support different line feeds')


Back | FazBrowse Home | New Git URL