1.symbols 主要在表间传递信息,做用于一个page中,相似于局部变量express
SaveRecordInDatabase |
name |
date |
=key? |
Bob |
today |
bobKey |
Bill |
later |
billKey |
在方法名前加=表示要把结果存储在symbol中,而不是跟方法的返回结果做比较测试
FetchRecordsFromDatabase |
key= |
fetch() |
name |
date |
billKey |
true |
Bill |
later |
bobKey |
true |
Bob |
today |
在入参的列中加入=表示使用单元格中的symbol值fetch
symbol是在测试执行中赋值this
2.variables 相似全局变量,只要在父级页面定义了,就能够在子级页面使用spa
定义的方法主要有三种code
- !define var {text} - as a delimited block of text
- !define var othervar - by copying the value of another variable
- !define var {${= 10 / 2 =}} - as an expression
例子:it
!define myVariable {
This is the
text of
my
variable
}
variable defined: myVariable= this is the text of my variable
io
!define n 10
variable defined:
n=10
!define q 2
variable defined: q=2
!define d {${= ${n}
/ ${q} =}}
variable defined: d=${= ${n} / ${q} =}
${d} is : 5
IMPORTANT: If the variables
used in the expression change than also the result changes!
!define q 5
variable defined: q=5
${d} is : 2table
variables在测试执行前定义好,在测试过程当中不会改变class