I'm trying to write a script that sets some fields in the testSteps table from other values I already have, and I can't figure out the format. When I do a workItem.getTestCase().getTestSteps();
on the item I get back
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:
]}];
How would I say, change the first testSteps value of step from 1 to 3 and then set it back?
TestSteps are basically a two dimensional array of text objects. As it seems, you are using a customized config for the Steps and Polarion sent you the first line of the teststep-field with first element ("step") pre-filled as "1" and the other fields (most probably) empty. The Text Objects can be displayed with
".getContent()"
method.For setting Teststeps you need to construct this nested list of lists (for every step you need a list with the same number (9 in your example) of Textobjects, the first element is a number)