Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use robotframework to realize Interface Automation Test in python

2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article introduces how to use robotframework to achieve interface automation testing in python, the content is very detailed, interested friends can refer to, I hope it can be helpful to you.

1. Test case executes parameter configuration:

II. Test case implementation result:

The ${info} information is the information returned by calling the API.

three。 Generate a test report after the execution is complete:

Should contain assertion method: can be used as a keyword here

* * installation notes *:

1. Introduction to robotframework-ride and wxpython:

1.ride is a third-party testing tool, and wxpython is the runtime program it depends on (.exe runner).

two。 Installation version problem:

If the version of python installed is shown in the red box: 32 bit 1 on win32, the version of robotframework-ride that can be installed is:

Robotframework-ride-1.3.win32.exe

The wxPython version you need to match is: wxPython2.8-win32-unicode-2.8.12.1-py27.exe

Also need to install: robotframework-2.8.1.win32.exe

Second, installation steps:

1. Configure environment variables:

Edit the Path environment variable and add: C:\ Python27;C:\ Python27\ Scripts;C:\ Python27\ Lib\ site-packages in the edit bar

two。 First install: wxPython2.8-win32-unicode-2.8.12.1-py27.exe

3. Reinstall: robotframework-ride-1.3.win32.exe

4. Reinstall: robotframework-2.8.1.win32.exe

5.Doc command line operation commands:

Cd.. Go to the directory where the python27 installation is located, as shown in the screenshot:

Cd Python27

Cd Scripts

Pip list [check the installation list, some installers are essential]

Crypto 1.4.1 can be installed using the command: pip install crypto (enter) in the C:\ Python27\ Scripts directory. After the installation is completed, it will be installed automatically: cryptography 1.6.

If all the required programs are installed, you can use the command: python ride.py [start the ride.py file] in the directory: C:\ Python27\ Scripts

Note:

1. You cannot change the installation directory of robotframework-ride-1.3.win32.exe, wxPython2.8-win32-unicode-2.8.12.1-py27.exe and robotframework-2.8.1.win32.exe at will. Generally, it is installed at C:\ Python27\ Lib\ site-packages by default.

two。 If the shortcut to the desktop after installation: RIDE double click can not start, you can reinstall: robotframework-ride-1.3.win32.exe and install again, you can use the command: pip uninstall robotframework-ride under the directory C:\ Python27\ Scripts to uninstall, uninstall and then install.

On how to use robotframework in python to achieve interface automation testing is shared here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report