Robot framework 5: run the robot framework on CentOS and automatically send the test results

Source: Internet
Author: User

Operating system version: centos 6.0 x86_64

To run a test case of the robot framework on linux, install the following tools and software:

1. Install python 2.7.6. First, check whether python is installed in the system and whether the python version is used.

Python 2.6.5

Python 2.6.5 has been installed, download python2.7.6,: https://www.python.org/download#pubkeys Selection: Python 2.7.6 compressed source tarball (for Linux, Unix or Mac OS X)

Log On with the root user, the downloaded file upload the file Python-2.7.6.tgz to the root user directory through the rz command

Run the following command to install:
tarZxvf Python-2.7.6.tgz
3 cd Python-2.7.6
4 ./configure --prefix=/usr/local
5 make && make altinstall
After installation, run python2.7 -- version to verify that the installation is complete. The installation directory is/usr/local/lib/python2.7, which is easy to distinguish from python2.6.5 in the system, use python2.7 instead when running python. 2. Install robotframework-2.8.4.tar.gz,: https://pypi.python.org/pypi/robotframework
Run the tar-zxvf robotframework-2.8.4.tar.gzcd robotframewZ plugin? Http://www.bkjia.com/kf/ware/vc/ "target =" _ blank "class =" keylink "> encrypt/decrypt + IKCta00NA8YnI + encrypt + decrypt + c1_vcd4kpha + decrypt =" help "," copyright ", "credits" or "license" for more information.
>>> Import Selenium2Library
>>>

The last blank line indicates that the installation is successful!

Note: you may need to install ez_setup.py first: https://pypi.python.org/pypi/setuptools/#unix-wget

Run python2.7 ez_setup.py.

4. Upload the script directory test to linux and run it by executing pybot./cases.txt or python-m robot. run./test.

5. Run the script on linux and display is required. The solution is to install vnc or xvbf and vns:

Yum-y groupinstall "X Window System" "Desktop" "Fonts" "General Purpose Desktop"


Rpm-ivh/mnt/Server/vnc-server-4.1.2-9.el5.x86_64.rpm

Service vncserver start

Vncserver: 1

After vncserver is started, you will be prompted to enter the initial password. After you enter and confirm the password, you can download http://www.realvnc.com/download/login to this linux machine with a mouse operation.

My vncserver cannot work normally after it is installed, so the second method is used to install xvbf.

Yum-y install xorg-x11-server-Xvfb

Yum-y install mesa-dri-drivers

Alibaba-uuidgen-ensure

Run: After Xvbf is run, the script can be successfully run. It is best to use English to name the main script.

Next, I will introduce how to automatically execute test cases and send results emails.




Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.