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

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.

主站蜘蛛池模板: 南开区| 青冈县| 马关县| 磐石市| 翼城县| 江门市| 米脂县| 堆龙德庆县| 宜春市| 临湘市| 阜阳市| 徐闻县| 浏阳市| 赣州市| 西盟| 保靖县| 陵川县| 江川县| 西峡县| 夏津县| 伊宁县| 昌乐县| 深泽县| 剑阁县| 辽阳市| 琼结县| 周宁县| 涪陵区| 大石桥市| 十堰市| 乌兰察布市| 康乐县| 航空| 海安县| 乐平市| 绥棱县| 开原市| 伊吾县| 镇宁| 山西省| 宜兴市|