robotframeworks换行

来源:互联网 发布:卫视直播软件 电脑版 编辑:程序博客网 时间:2024/05/29 10:11

将测试数据分行

如果数据过长,需要换行,可以使用省略号(…),表示延续前一行的内容。在测试用例与用户关键字表中,省略号前必须至少含有一个空单元格。在setting与变量(variable)表中,省略号可直接填入setting name或者变量名称(variable name)单元格中。

所有表格中,会忽略省略号前的所有空单元格。

此外,Setting部分的取值可以被写到多个表中(主要是由Documents关键字使用)。解析测试数据时,这些数据会被连接起来,中间加一个空格。

以下将举例说明这些语法。在前三个表中,显示分行前的测试数据。由后三个表可以看出,将测试数据分行显示后,只需要较少的列。

分行前的测试数据

Setting

Value

Value

Value

Value

Value

Value

Dafault Tags

Tag-1

Tag-2

Tag-3

Tag-4

Tag-5

Tag-6

 

Variable

Value

Value

Value

Value

Value

Value

@{LIST}

this

list

has

quite

many

items

 

Test Case

Action

Argument

Arg

Arg

Arg

Arg

Arg

Arg

Example

[Documentation]

Documentationfor this test case. This can get quite long...

 

 

 

 

 

 

 

[Tags]

t-1

t-2

t-3

t-4

t-5

 

 

 

Do X

one

two

three

four

five

six

 

 

${var} =

Get X

1

2

3

4

5

6

分行后的测试数据

Setting

Value

Value

Value

Dafault Tags

Tag-1

Tag-2

Tag-3

Tag-4

Tag-5

Tag-6

 

Variable

Value

Value

Value

@{LIST}

this

list

has

quite

0 0
原创粉丝点击