我有以下结构:
test_init
|__________resources
| |__________ keywords.robot
|__________tests
|__________ __init__.txt
|__________ TestInit.robot
Run Code Online (Sandbox Code Playgroud)
keyword.robot 包含:
*** Keywords ***
Keyword for init
Log init
Run Code Online (Sandbox Code Playgroud)
__init__.txt 包含:
*** Settings ***
Documentation This is from init file
Resource ${EXECDIR}/resources/keywords.robot
Run Code Online (Sandbox Code Playgroud)
TestInit.robot 包含:
*** Test Cases ***
Testing the Init
Log Vimal
Keyword for init
Run Code Online (Sandbox Code Playgroud)
并从 test_init 目录中的命令行,如果我执行如下:
> pybot tests
Run Code Online (Sandbox Code Playgroud)
我收到错误说:
No keyword with name 'Keyword for init' found
Run Code Online (Sandbox Code Playgroud)
我在想,初始化文件也导入了资源文件。但是 init 文件被文档识别,我在我的报告中得到了它。
我对初始化文件的用法有点困惑,请帮助我更好地理解它。
| 归档时间: |
|
| 查看次数: |
11071 次 |
| 最近记录: |