怎么用python进行测试

 我来答
又擲彝猜僭僦Au
2017-11-06 · TA获得超过6323个赞
知道大有可为答主
回答量:2305
采纳率:14%
帮助的人:510万
展开全部

These instructions explain how to run this guide yourself. If you are not interested in that, you can nevertheless view the results online.

Installations

The recommended approach to install Robot Framework on Python is using pip. Once you have both of these preconditions installed, you can simply run:

pip install robotframework

See Robot Framework installation instructions for alternative installation approaches and more information about installation in general.

This demo is written using reStructuredText markup language with Robot Framework test data in code blocks. Executing tests in this format requires installing additional docutils module:

pip install docutils

Notice that Robot Framework 3.0 is the first Robot Framework version to support Python 3. See the aforementioned installation instructions for information about Python 2 vs Python 3.

Execution

After installations you still need to get the demo itself. It is easiest to download a certain release or grab the latest contentand extract the  package somewhere, but it is also possible to clone the project repository.

After installations and with all other preconditions in place, you can run the demo on the command line by using the robotcommand:

robot QuickStart.rst

If you use Robot Framework 2.9 or older, instead of the robot command you need to use pybot:

pybot QuickStart.rst

You can also configure the execution with various command line options:

robot --log custom_log.html --name Custom_Name QuickStart.rst

For a list of available options run robot --help.

Viewing results

Running the demo generates the following three result files. These files are linked to pre-executed files available online, but executing the demo creates them locally.

  • report.html

  • Higher level test report.

  • log.html

  • Detailed test execution log.

  • output.xml

  • Results in machine readable XML format.

推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式