这些参数是相互关联的,因为它们同时在同一页起作用。如果行太大,就没有放置图形的空间。如果有太多的字号,程序则可能会用光内存。本例非常需要把各个变量组合到一起来测试,可是这样就会产生大量组合方式。
Imagine writing 100 scripts to test a mere 100 of these combinations. If one element of the interface should change—for example, if Caption Typeface moves from one dialog box to another—then you might have to revise each script.]
假设编写100段脚本来测试仅仅100种这样的组合方式。如果某界面的一个元素改变,例如,标题字体从一个对话框转移到另外一个,那么你就可能不得不重新编写每一个脚本。
Figure 2 The first few rows of a test matrix for a table formatter
图2 某表格格式的测试矩阵的前几行
Now imagine working from a test matrix. A test case is specified by a combination of the values of the many parameters. In the matrix, each row specifies a test case and each column is a parameter setting. For example, Column 1 might specify the Caption Location, Column 2 the Caption Typeface, and Column 3 the Caption Style. There are a few dozen columns.
现在,假设根据一个测试矩阵来工作。我们用很多参数值的一种组合来确定一个测试用例。在矩阵中,每一行确定了一个测试用例,而每一列则代表一个参数。例如,第1列可以是标题位置,第2列可以是标题字体 ,而第3列则是标题风格。这样就会得到若干列。
Create your matrix using a spreadsheet, such as Excel.
接着,用一个电子表格制作软件来创建你的矩阵,比如Excel.
To execute these test cases, write a script that reads the spreadsheet, one row (test case) at a time, and executes mini-scripts to set each parameter as specified in the spreadsheet. Suppose that we’re working on Row 2 in Figure 2’s matrix. The first mini-script would read the value in the first column (Caption Location), navigate to the appropriate dialog box and entry field, and set the Caption Location to Right, the value specified in the matrix . Once all the parameters have been set, you do the rest of the test. In this case, you would print the table and evaluate the output.
文章来源于领测软件测试网 https://www.ltesting.net/