官术网_书友最值得收藏!

A small exercise

To demonstrate the Robot Framework, we will create a simple dummy application as follows:.

  1. Create a folder named simpleapp, this will serve as the application root folder.
  2. Inside this, create a folder named testsuites, this will contain all the test configuration files.
  3. Within the testsuites folder create a file, Test_Case_1.txt, with the following contents:
    ***Test Cases***
    
    First Test Action  log  this is a basic test
    Note

    Note that there are two spaces before and after the log keyword.

  4. Now run the project by calling Pybot script and passing the testsuites folder as an argument. You should get something similar to the following screenshot:

This confirms that the project has run successfully. You can view the results and log from generated HTML pages and perform future calculations over the data by using the XML file.

As we used a simple log statement, you get a logged message in the out log, as shown in the following screenshot:

The generated XML is also easy-to-read (as shown in the following screenshot), which can then be used by any other external tool as an input parameter—thereby reducing the human intervention between different stages of testing if this process is also automated.

主站蜘蛛池模板: 汨罗市| 高尔夫| 若羌县| 咸阳市| 江山市| 南召县| 新源县| 阿克陶县| 深州市| 霍林郭勒市| 旌德县| 湖北省| 碌曲县| 京山县| 出国| 陈巴尔虎旗| 普陀区| 高阳县| 昌吉市| 延川县| 乐安县| 长治县| 青州市| 青海省| 余姚市| 和静县| 湖州市| 邹平县| 尼玛县| 广安市| 马鞍山市| 焉耆| 垫江县| 德庆县| 安多县| 萝北县| 江油市| 浦县| 象山县| 揭阳市| 临澧县|