简体   繁体   English

Robot Framework中的Robot Resource File和Robot Test Suite有什么区别

[英]What is the difference between Robot Resource File and Robot Test Suite in Robot Framework

I'm working on Robot framework using python. 我正在使用python开发机器人框架。 I integrated that with my Eclipse IDE using RED plugin which is available at market place. 我使用市售的RED插件将其与Eclipse IDE集成在一起。 My question is, when I created my robot framework project there are resourcefile.robot and testsuitefile.robot in it. 我的问题是,当我创建机器人框架项目时,其中包含resourcefile.robot和testsuitefile.robot。 But both of them containing same tabs and everything looks like same. 但是它们都包含相同的选项卡,并且所有内容看起来都一样。 What is the basic difference of it. 它的基本区别是什么。 Can you please explain and add some referral links if possible. 能否请您解释一下并添加一些引荐链接。 Thank You. 谢谢。

enter image description here 在此处输入图片说明

A resource file is pretty much the same as a test suite except that it can't have test cases. 资源文件与测试套件几乎相同,除了它没有测试用例。 There are a few other small differences. 还有其他一些小差异。 The main purpose of a resource file is to act as a container for a set of reusable keywords. 资源文件的主要目的是充当一组可重用关键字的容器。

From the robot framework users guide : 来自机器人框架用户指南

The higher-level structure of resource files is the same as that of test case files otherwise, but, of course, they cannot contain Test Case tables. 资源文件的高级结构与测试用例文件的结构相同,但是,它们当然不能包含测试用例表。 Additionally, the Setting table in resource files can contain only import settings (Library, Resource, Variables) and Documentation. 此外,资源文件中的“设置”表只能包含导入设置(库,资源,变量)和文档。 The Variable table and Keyword table are used exactly the same way as in test case files. 变量表和关键字表的使用方式与测试用例文件中使用的方式完全相同。

Another point to add is when the user tries to add a Test Case section in the Robot Resource File a file content mismatch message pops up. 添加的另一点是,当用户尝试在机器人资源文件中添加“测试用例”部分时,会弹出文件内容不匹配的消息。 So if the user proceeds further by accepting the changes then that file would be recognized as-as tests suite file. 因此,如果用户通过接受更改进一步进行操作,则该文件将被视为测试套件文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM