1、前提条件,安装好python3、pycharm
2、安装robotframework:pip install robotframework

3、在pycharm中安装IntelliBot插件,遇到错误的话,参照https://www.jianshu.com/p/bdfcac3c6144
在pycharm中,File->Settings->Plugins,找到intelliBot插件下载
(安装完成intelliBot插件后需重启pycharm)

在pycharm中,File->Settings->Plugins,找到Robot Framework Support插件下载
(安装完成Robot Framework Support插件后需重启pycharm)

不安装Robot Framework Support,新建文件找不到Robot File

4、配置Robot Framework文件识别类型:File->Settings->Editor->File Types,找到Robot Feature,添加*.和*.txt。

5、运行配置页
File->Settings->Tools->External Tools.

(1)Name:自定义名称,必填项,如Robot Run Suite
(2)Description:自行定义,非必填。
(3)Program:Robot执行程序路径,如Python安装目录XXX\XXX\Python36\Scripts\robot.exe
(4)Arguments:-d log $FileName$,可直接参照填写;
(5)Working directory:$FileDir$,可直接参照填写
注:FileName为当前文件,FileDir为当前文件所在目录

6、一样的方法添加case

7、新建RobotFramework测试用例

8、编写测试用例

9、执行测试用例

网友评论