This project aims to improve the readability, reusability, and maintainability of the test script by separating assistive keywords from operative keywords. The concept is based on Claire's and Ingrid's thesis.
-
Download Python 3.6
- Install
- Path of python36 and python36\Scripts have to set as environmental variables
-
Download Chromedriver version 2.37
- Unzip folder
- Put chromedriver.exe into the path of python location
-
Install requirement libraries using pip:
pip install -r requirements.txt
-
Install development environment RED from Here
-
Import the project in RED, following the step : File->Import->Existing Projects into Workspace->Next->Select the project located place.
We provide twitter_valid_user_login.robot sample test case.
You can run "robot -d ./out --listener aspect.actionListener.py twitter_valid_user_login.robot"
in command line directly.
The command above -d ./out means put all output file (e.g report, log...) in the out folder.
Or following below steps set listener option in RED
-
Window->Preferences->Robot Framework->Launching->Default Launch Configurations->Setting arguments like below
-d ./out --listener aspect/actionListener.py
-
Then you can run the sample test like below
-
The generated report looks like below, the red frame means that assistive keywords (written in twitter_valid_user_login_akw) are weaved into the test script successfully.
-
The project would also create a pickle file (listener.pickle), this file is used for saving the status of objects which contain library path and aspect that avoid rereading files when the next time running test scripts.
If your aspect keywords are written in python (customized keyword), please make sure the library is being referenced by RED.