01-Robot Framework教程-hello robot(一)


1. 创建一个文件 :

test.robot

2. 添加一点代码:

#--START--

*** Settings ***

*** Variables ***

*** Test Cases ***
#测试用例名称
HelloRobot
   #说明文档
   [Documentation]    Hello Robot
   #在控制台输出
   Log To Console     " print this message robot "

*** Keywords ***


#--END--

3. 运行文件 :

robot test.robot

4. 运行结果

==============================================================================
Test                                                                          
==============================================================================
HelloRobot :: Hello Robot                                             " print this message robot "
HelloRobot :: Hello Robot                                             | PASS |
------------------------------------------------------------------------------
Test                                                                  | PASS |
1 critical test, 1 passed, 0 failed
1 test total, 1 passed, 0 failed
==============================================================================
Output:  /home/rango/Robot-framework-Tutorials-examples/basics/output.xml
Log:     /home/rango/Robot-framework-Tutorials-examples/basics/log.html
Report:  /home/rango/Robot-framework-Tutorials-examples/basics/report.html