Learning to use the robot Framework automated Testing Framework (i)--Brief introduction and installation method

Source: Internet
Author: User

Recently, the company's project team used the robot framework automated testing framework to perform part of the testing, a keyword-driven automated testing framework that can be used in project testing on multiple platforms and is very easy to use. features of the 1.Robot framework

A brief description of the characteristics of the robot framework, here is a summary of the pest division:
1. Easy to use
Create and organize test cases with tabular syntax, like editing data in Exel to write test cases. The corresponding test reports are also displayed in HTML format for easy viewing.
2. Rich class library support different platform, different types of application test Web Automation test: Seleniumlibrary,selenium2library and other Windows GUI test: autoitlibrary Database test: Databases library (Java), database Library (Python), MongoDB Library and other file comparison test: Diff Library HTTP Test: HTTP library ( livetest), HTTP Library (requests)

Install the appropriate libraries according to your project needs.
3. You can write test cases like programming
Although it is a tabular syntax, it is possible to invoke Python functions by using loops, judgments, variables, and so on in the Builtin library to construct complex logic like programming.
4. support Self-developed system keywords
Although the Robot framework has a rich library of classes, there are still some test requirements that can not be satisfactorily met in the actual project. Can't be satisfied even if. Of course not.
If you are familiar with Python development, testers can develop a set of key fonts on their own, or make appropriate modifications to the original library to achieve a higher degree of fit with the project. A good tool should give users an opportunity for scalability and two development, which is one of the reasons why the robot framework can be popular.

Because I also need to use it, so have studied, consulted a lot of information and blog. Through their own attempts and practice, now will be related to the knowledge to do a summary, by the way of the sub-article slowly organized. Because is also a beginner, also just will have learned the knowledge record and individual thought down, if has the wrong place, also please the message to correct, extremely thanks.

The next blog is mainly about Web project testing, and the subsequent may learn and update the mobile side of the section, but the core idea of testing is the same. 2.Robot Framework Environment preparation and installation 2.1 Environments and tools you need to use

The first article first introduces the relevant environment and tools that the robot framework uses for Web project testing

Python: Download link please poke here.
The Robot framework is Python-based and requires a Python-based environment, preferably with version 2.7, which is currently incompatible with Python3.

Wxpython download link please poke here.
A well-known Python GUI library to support the ride graphical operations tool behind.

Robot Framework Download link please poke here.
Robot framework itself, here is not much to do with the introduction.

Robot framework-ride Download link please poke here.
The Robot Framework IDE is abbreviated as ride, a tool that has a graphical interface for creating, organizing, and running tests. The example operations for subsequent chapters are based on ride.

Robot framework-selenium2library Download link please poke here.
The Robot framework version of the selenium library encapsulates the core system operations and keywords that need to be used. 2.2 Installation Method

There are a number of installation methods, here is a brief introduction to the Windows operating system 2 traditional methods are to each site to download the appropriate installation package, the order to complete the installation. Note After completing the Python installation, you need to manually configure the environment variables, the default installation path is C:\PYTHON27, and you need to configure the C:\Python27\Scripts more convenient way
Sequential installation of ActivePython and Wxpython installation packages, no need to configure environment variable download links please poke here.
Then, in the command line, enter the following command sequentially, and wait a few moments for the installation to complete. But this process is to access the resources outside the wall, need attention.

Pip install robotframework
pip install robotframework-ride
pip install robotframework-selenium2library

You can open the ride tool by entering ride.py on the command line (the full path is C:\Python27\Scripts\ride.py because the appropriate environment variable is already configured).

If it is opened for the first time without data, some prompts will appear on the interface. This is the default open interface after the test case operation, so the interface display may not be the same.

See the above page to show that the basic environment is ready. Please take a break and see the next article in the series blog.

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.