1

我正在尝试编写一个脚本,从我已有的其他值中设置 testSteps 表中的一些字段,但我无法弄清楚格式。当我workItem.getTestCase().getTestSteps();对项目做 a 时,我会回来

keys:[step, description, classification, sampleParameters, duration, instructions, expectedResult, notes, labLocation, sampleDesc];steps:[{values=[text/html:
 1, text/html:
, text/html:
, text/html:
, text/html:
, text/html:
, text/html:
, text/html:
, text/html:
, text/html:
]}];

我怎么说,将 step 的第一个 testSteps 值从 1 更改为 3,然后将其设置回来?

4

1 回答 1

0

TestSteps 基本上是文本对象的二维数组。看起来,您正在为 Steps 使用自定义配置,Polarion 向您发送了 teststep-field 的第一行,其中第一个元素(“step”)预填充为“1”,其他字段(很可能)为空。可以使用".getContent()"方法显示文本对象。

要设置 Teststeps,您需要构建这个嵌套的列表列表(对于每个步骤,您需要一个具有相同数量(在您的示例中为 9)的 Textobjects 的列表,第一个元素是一个数字)

于 2021-04-16T18:34:34.143 回答