Robotframework 如何从robot框架执行简单的python脚本

Robotframework 如何从robot框架执行简单的python脚本,robotframework,Robotframework,我是python和Robot框架的新手。我在下面的位置“C:\Python33\sample.py”有一个python脚本 我已经安装了RF,并且在同一位置有一个robot文件(test.robot),其中包含以下内容 # example.robot *** Settings *** | Library | Process *** Test Cases *** | | ${result}= | run process | python | /C:/Python33/sample.py 当我试图

我是python和Robot框架的新手。我在下面的位置“C:\Python33\sample.py”有一个python脚本

我已经安装了RF,并且在同一位置有一个robot文件(test.robot),其中包含以下内容

# example.robot
*** Settings ***
| Library | Process
*** Test Cases ***
| | ${result}= | run process | python | /C:/Python33/sample.py
当我试图从命令提示符执行文件时,出现错误

C:\Python33>robot test.robot

Error: "Testcase name cannot be empty"

请帮助我修改机器人文件testcase is passing中的以下代码来修复此问题

*** Settings ***
| Library | Process

*** Test Cases ***
Using Kwargs
| | ${result}= | run process | python | "C:/Python33/sample.py"

为了完整性,我想补充一点,您还可以使用robotframework关键字“Evaluate”来计算简单的python表达式。
*** Settings ***
| Library | Process

*** Test Cases ***
Using Kwargs
| | ${result}= | run process | python | "C:/Python33/sample.py"