我熟悉在数据驱动的 Robot Framework 测试中使用模板关键字,并且知道可以使用文本文件和 csv 文件等外部数据源来提供测试数据。但是,我工作的组织希望使用数据库中保存的数据作为测试用例数据的来源。有人知道这是否可能吗?我搜索了 Stack Exchange、Stack Overflow 和其他资源,但找不到答案或任何示例。
这是我熟悉的数据驱动方法的示例,只是为了让您了解我们现在所处的位置。
*** Settings ***
Library Selenium2Library
Library AFRCLibrary
| Test Template | Suspend Region
*** Variables ***
*** Test Cases ***
| Pillar 1 BPS 2019 Suspend Region | Pillar 1 | 2019 | BPS | BPS Region 1 | Pillar 1 BPS 2019 Suspend Region Comments |
| Pillar 2 FGS 2018 Suspend Region | Pillar 2 | 2018 | FGS | FGS Region 1 | Pillar 2 FGS 2018 Suspend Region Comments |
*** Keywords ***
| Suspend Region
| | [Arguments] | ${pillar} | ${year} | ${scheme} | ${region} | ${comments} |
| | Futures Open Application | http://ags125p01:8080/operationalsite/login | ff |
| | FuturesPublicsiteWM | root | gtn | http://ags125p01:8080/operationalsite/futures/maintain_budget |
| | Select Pillar | ${pillar} | ${year} |
| | Select Scheme | ${scheme} |
| | View |
| | Suspend And Confirm | ${region} | ${comments} |
| | Futures Close Application |
| |