How to set up a Robot custom execution server demo,Robot execution server #241
Quali-Community
started this conversation in
Useful Tips & Guides
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
robot-execution-server-user-guide-v10docx.zip
^ Robot execution server user guide
This demo environment is intended to run on a single laptop with a custom SnQ test execution server running under a Linux VirtualBox VM.
Install VirtualBox: https://virtualbox.org
Download the VM image: https://qualisystems.brickftp.com/f/1d5a2b96f
Extract rh72.7z in %USERPROFILE%\VirtualBox VMs\ so there's a new folder there rh72 containing the vbox files.
Run VirtualBox
Probably need to edit the network card so it's bridged to your actual NIC instead of mine
Make sure the VM CPU type is x86_64
Before you can do anything with the execution server:
Under JOB SCHEDULING / Edit Execution Server Types, create type named "Robot", other fields blank.
Then in the VM:
Log in as root / qs1234
ip addr
Update the code:
rm -rf /root/robot-execution-server
git clone --recursive https://github.com/QualiSystems/robot-execution-server
cd /root/robot-execution-server
Copy config_sample1.json or config_sample2.json to /root/config.json.
Edit /root/config.json:
- point to your CloudShell IP
- point to a repo of Robot tests, such as
https://github.com/ericrqs/robot-tests (no credentials needed)
You can use a GitHub or BitBucket URL, or the path to any local directory on the Linux machine that is under Git control (contains a .git directory).
How to set up a local test repo if your laptop won't have internet:
cd /root
git clone https://github.com/ericrqs/robot-tests
Use /root/robot-tests as the git_repo_url in config.json
This repo will be cloned every time a test is run.
Run the server:
python3 robot_custom_execution_server.py --config /root/config.json
Then you can create the suite of type Robot in the portal:
Add a job
Attach an env to the job
Increment job duration by 1 minute
Add 2 tests:
Name: test1.robot Arguments: --variable EXAMPLE_INPUT_1:xyz
Name: test_fail.robot Arguments: (leave blank)
Then you should be able to run it. It should end with state Failed since one of the tests intentionally fails. If it ends with Error, something is wrong.
You can also do Run Custom and choose a specific version for each test by adding something like TestVersion=tag5 or TestVersion=branch1 to the arguments.
For test1.robot:
TestVersion=tag5 --variable EXAMPLE_INPUT_1:xyz
For test_fail.robot it would be just:
TestVersion=tag5
About the global input for the test version, if you add an input to the environment named TestVersion, edit the job, and "publish" the TestVersion input, then when you run the suite you can put a version like tag5 in the TestVersion global input and it will use that version when running both tests.
To shut down the execution server cleanly:
pkill python3
Wait up to 2 minutes till it says it finishes shutting down
If the server is not shut down cleanly, the next future job will fail to start, but subsequent jobs will work fine.
Attachments:
Eric Rosenquist (Eric.R) - 04/28/2017 12:57 AM
· 1319 ·
Beta Was this translation helpful? Give feedback.
All reactions