Page History
...
Code Block | ||||
---|---|---|---|---|
| ||||
*** Settings *** Documentation A resource file with reusable keywords and variables. ... ... The system specific keywords created here form our own ... domain specific language. They utilize keywords provided ... by the imported SeleniumLibrary. Library SeleniumLibrary *** Variables *** ${SERVER} 192.168.56.1:7272 ${BROWSER} Firefox ${DELAY} 0 ${VALID USER} demo ${VALID PASSWORD} mode ${LOGIN URL} http://${SERVER}/ ${WELCOME URL} http://${SERVER}/welcome.html ${ERROR URL} http://${SERVER}/error.html *** Keywords *** Open Browser To Login Page Open Browser ${LOGIN URL} ${BROWSER} Maximize Browser Window Set Selenium Speed ${DELAY} Login Page Should Be Open Login Page Should Be Open Title Should Be Login Page Go To Login Page Go To ${LOGIN URL} Login Page Should Be Open Input Username [Arguments] ${username} Input Text username_field ${username} Input Password [Arguments] ${password} Input Text password_field ${password} Submit Credentials Click Button login_button Welcome Page Should Be Open Location Should Be ${WELCOME URL} Title Should Be Welcome Page |
Running the tests can be done from the command line or from within Jenkins (or any other CI tool).
Importing results is as easy as submitting them to the REST API.with a POST request (e.g. curl), or by using one of the CI plugins available for free (e.g. Xray Jenkins plugin).
Info | ||||
---|---|---|---|---|
| ||||
Running tests is primarily done using the "robot" utility which provides many options that allow you to define which tests to run, the output directory and more. You may also specify some variables and their values. Next follows some different usage examples. If you're using Python:
If you're using Java:
|
An unstructured (i.e. "Generic") A Test issue will be auto-provisioned the first time you import the results, based on the name of the test case and of the corresponding test suites.
...
Otherwise, tags are mapped as labels on the corresponding Test issue.
Importing results is as easy as submitting them to the REST API with a POST request (e.g. curl), or by using one of the CI plugins available for free (e.g. Xray Jenkins plugin).
In Jira, using Xray, the team can look at the Test Run details which include the overall result and also specifics about each keyword, including duration and status.
We can all see that a Test case/issue was auto-provisioned based on the name of the test case and of the corresponding test suites.
After running the tests and generating the Robot XML report (e.g., output.xml), it can be imported to Xray via the REST API.
If you're using Python:
No Format |
---|
robot -d output . |
If you're using Java:
No Format |
---|
java -jar robotframework-3.0.jar -d output . |
...
Info | ||
---|---|---|
| ||
Note that Robot Framework considers the base folder of the project as the first test suite. The way you run your tests also affects Robot's XML; so, if you execute the file from somewhere else or you execute the file directly by passing it as an argument, the test suite's information will potentially be different. |
You will see information about each Robot keyword A Test Execution will be created containing results for all test cases executed. In this case, you can see that it is also linked back to an existing Test Plan where you can track the consolidated results from multiple "iterations" (i.e. , step) and its corresponding status in the Context section of the Execution Details of the Generic Test.Test Executions).
Within the execution screen details, accessible from each row, you can look at the Test Run details which include the overall result and also specifics about each keyword, including duration and status.
Tracking it everywhere
...
At the Test Plan-level, the entity that defines the scope of testing and tracks its progress, we can quickly assess the latest consolidated test results (i.e. the latest result obtained for each Test being tracked).
References
Awesome Robot Framework (curated list of resources)
https://fkromer.github.io/awesome-robotframework/Automation topic in Xray’s documentation
Xray and Robot Framework integration (includes tutorials)
REST API, Jenkins, Bamboo, Team City and integration with other CI tools
https://confluence.xpand-it.com/pages/viewpage.action?pageId=21761014- Integration capabilities that Xray provides for Robot Framework XML reports