Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
titleIterate over test steps
Total number of associated test steps: ${TestStepsCount}

// Iterating each test step
#{for teststeps}
	 Action: ${TestSteps[n].Action}
     Data: ${TestSteps[n].Data}
     Expected Result: ${TestSteps[n].ExpectedResult}
     Step Number: ${TestSteps[n].StepNumber}
	 // Replace the placeholder text to export any newly created test step field
	 Test Step Field:${Tests[n].<Test Step Field>}
     // Iterating over attachments for each test step
     #{for l=TestSteps[n].AttachmentsCount}
     	Id: ${TestSteps[n].Attachments[l].Id}
        Name: ${TestSteps[n].Attachments[l].Name}
        Image: ${TestSteps[n].Attachments[l].Attachment}
        FileURL: ${TestSteps[n].Attachments[l].FileURL}
     #{end}
#{end}
 
or
 
// Iterating each test step
#{for j=TestStepsCount}
	Action: ${TestSteps[j].Action}
    Data: ${TestSteps[j].Data}
	Expected Result: ${TestSteps[j].ExpectedResult}
    Step Number: ${TestSteps[j].StepNumber}
	// Replace the placeholder text to export any newly created test step field
	Test Step Field:${Tests[n].TestSteps[m].<Test Step Field>}
    // Iterating over attachments for each test step
    #{for l=TestSteps[j].AttachmentsCount}
		Id: ${TestSteps[j].Attachments[l].Id}
        Name: ${TestSteps[j].Attachments[l].Name}
		Image: ${TestSteps[n].Attachments[l].Attachment}
		FileURL: ${TestSteps[n].Attachments[l].FileURL}
    #{end}
#{end}

Exporting Modular Test Steps from a Test

For each Modular Test Step you can export the following fields:

  • IsCalledTest (which will be true if the step is a called test; false if it's a normal step)
  • IsDeletedCalledTest (which will indicate if the called step issue was deleted)

  • IsInvalidIssueTypeCalledTest (which will indicate if the called step issue type has changed)

  • CalledTestParameters (the Called Test Dataset Parameters in Json format)
  • CalledTest.Field (The issue called. You can export all the data from a Test)

Below you can find an example on how to iterate over the list of Modular TestSteps associated with a Test.

Code Block
titleIterate over test steps
Total number of associated test steps: ${TestStepsCount}

// Iterating each test step
#{for teststeps}	#{if (%{${TestSteps[n].IsCalledTest}})}
        #{if (%{${TestSteps[n].IsDeletedCalledTest}})}
            Called test issue not found.
        #{end}
        #{if (%{${TestSteps[n].IsInvalidIssueTypeCalledTest}})}
            Called test issue type is invalid.
        #{end}
        #{if (%{!${TestSteps[n].IsDeletedCalledTest} && !${TestSteps[n].IsInvalidIssueTypeCalledTest}})}
            ${TestSteps[n].CalledTestParameters}
            ${TestSteps[n].CalledTest.Key}
            ${TestSteps[n].CalledTest.Summary}
        #{end}
    #{end}
#{end}

Exporting Modular Test Steps Parameters from a Test

You can iterate over the Test Call Parameters:

Code Block
titleIterate over test steps
Total number of associated test steps: ${TestStepsCount}

// Iterating each test step
#{for teststeps}
    #{if (%{${TestSteps[n].IsCalledTest}})}
        #{for p=TestSteps[n].CalledTestParametersCount}
            ${TestSteps[n].CalledTestParameters[p].Name}
            ${TestSteps[n].CalledTestParameters[p].Value}
        #{end}
    #{end}
#{end}

Exporting Preconditions from a Test

...