一句话:为 Robot Framework 引入基于行为树的测试用例规约库 RobotBT,提升复杂用例的表达力与可读性。
Robot Framework 是一种流行的测试自动化框架,它将测试用例规约抽象为自然语言,适合实现高层测试用例;但当功能较复杂、需要自定义且深度嵌套的规格时,测试用例可读性会下降。本文提出 RobotBT,一个为 Robot Framework 增加行为树支持的库,用行为树这一基于控制流模型的方法来编排功能执行,从而规约复杂行为。作者在 G DATA CyberDefense AG 的 GUI 测试套件上评估 RobotBT,并访谈其工程师以了解可用性、可读性与适用性。结果表明,行为树能够提升 Robot Framework 测试用例的表达力与可读性,并可应用于实际问题。
The Robot Framework is a popular and widely used test automation framework that abstracts test case specifications toward natural language specifications. This makes it well suited for implementing high-level test cases, at least as long as the functions provided by Robot can support the intended functionality. For more complicated test cases, custom and often deeply nested functionality specifications are required, and the readability of Robot test cases tends to decrease. We present RobotBT, a library for the Robot framework that addresses these shortcomings by adding support for specifying test cases using behavior trees. Behavior trees are a comprehensive method for specifying complex behaviors based on a control flow model that orchestrates the execution of functionality. We evaluated RobotBT on a test suite for GUI testing from G~DATA CyberDefense AG and interviewed their engineers about the usability, readability, and applicability of RobotBT. Our results show that BTs improve the expressiveness and readability of Robot Framework test cases and are applicable to practical problems.