-
Notifications
You must be signed in to change notification settings - Fork 9
Robot Framework
We use Robot Framework as a tool to test the web app. Currently the test object is the dev stage.
To run tests locally have a look at the README under /src/test/robotframework
.
The web app is tested in the following browsers:
Tags are used to define when and by which browser they are executed.
Used tags:
- smoketest Tests, which are short and follow important workflows. Used in tests which are run everytime a commit is done.
- chromeonly Tests, which are longer, but still follow important workflows. Used only in chrome tests which are run everytime a commit is done.
- firefoxonly Tests, which are longer, but still follow important workflows. Used only in firefox tests which are run everytime a commit is done.
- noslowpoke
Tests, which are part of the smoketests, but would take too much time in
browsers IE and edge.
Several tests do not work on their own and depend on several conditions which the testing environment must meet. The common setup process checks if the needed projects (not the concepts) exist.
- Public user tests all need the project
gra2005
with all the content the graduate panel of 2005 comprises. - Tests which create surveys require the project
robotproject
(without "s" between "robot" and "project"). The project itself must not contain anything. - The following survey edit tests require the
fileuploadproject
: upload_file, check_versioning and check_attachment_versioning. The project needs to contain a survey which is validly filled with every necessary input. Additionaly it has to have exactly one attachment. - Also needed are the following projects and datasets:
- the complete
cmp2014
project testanalysispackage
robotprojectrelease4[BROWSERNAME]
robotproject4[BROWSERNAME]
conceptproject[BROWSERNAME]
- concept
Roll Back Concept [BROWSER] De
with one previous version with the title "Roll Back Concept [BROWSER] De_Rollback" - concept
Referenced Concept [BROWSER] De
, which needs to be referenced in at least one instrument
- the complete
Some tests create test projects that are deleted after execution. Before running the tests there must be no projects with the following names:
temprobotcheckaccess[BROWSERNAME]
temprobotassignroles[BROWSERNAME]
temprobotdeleteroles[BROWSERNAME]
-
atemprobotcheckicons[BROWSERNAME]
(needs ana
at the beginning because of sorting) tempdatapackage[BROWSERNAME]
tempanalysis[BROWSERNAME]
The following libraries are used:
There are several keywords that we built and use differently than the standard keywords.
- Click Element Through Tooltips Firefox had several problems with tooltips as it can't execute properly the keywords Mouse Over and Focus, so there was no possible way to get a tooltip to vanish and make the hidden button available. So a JavaScript-code was written, which is executed. We use them also in Chrome and Edge due to the speed of the keyword in comparison with the standard way.
-
Install python and pip:
sudo apt get update
sudo apt install python3.8.0
sudo apt install python3-pip
-
Install ChromeDriver: Download https://chromedriver.chromium.org/ and extract it to
.local/bin
in your home directory. -
Execute the
setup.sh
file in the directorysrc/test/roboframework
to install the necessary packages. -
Start the tests from the command-line with:
robot -P ./src/test/robotframework/libs -d target/test/robotframework/logs/chrome -v BROWSER:chrome --include publicuserNOTfirefoxonlyNOTlocalonly ./src/test/robotframework
-
You can find more test configuration examples in the github workflow defnition file
-
Useful Parameter
-
-t
Select tests by name or by long name. Name is case and space insensitive. E.g.-t CreateAnalysisPackage
-
-s
Select test suits by name or by long name. Name is case and space insensitive. E.g.-s analysispackagemanagement
-
-X
Exit on failure
Robot Framework information every tester should read:
Developer Docs
- Entwickler:innen-Doku
- Scrum Artifacts
- Architecture
- Domain
- Search
- UI
- DevOps Process
- Authentication and Authorization
User Docs
- ID-Generation
- Metadata Import
- Metadata and DOI registration at dara
- Variable (Data Set) Reports
- Übersicht R-Scripte
- Web Analytics