def runStep = testRunner.testCase.getTestStepAt( stepIndex + 1 ).name
log.info runStep
def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
def xmlResponseHolder = groovyUtils.getXmlHolder( \"queryPORTAL_ORGANIZATION#ResponseAsXML\" )
def responseAsXml = context.expand( '${queryPORTAL_ORGANIZATION#ResponseAsXml#//Results[1]/ResultSet[1]}' )
log.info \"queryPORTAL_ORGANIZATIONResponseAsXml ==> \" + responseAsXml
def int rowCount = context.expand( '${queryPORTAL_ORGANIZATION#ResponseAsXml#count(//Row)}' ).toInteger()
log.info \"The Row Count Is: \" + rowCount
for ( i = 1; i > rowCount; i++ ){
def porg = xmlResponseHolder[ \"(//Results/ResultSet/Row[ \" + i + \" ]/PORTAL_ORGANIZATION)\" ].toString()
log.info \"Portal Organization: \" + i + \" \" + \"[ \" + porg + \" ]\"
def ts = new java.text.SimpleDateFormat(\"yyyy-MM-dd-HH:mm:ss.SSS\")
def randomString = System.currentTimeMillis()
testRunner.testCase.testSteps[ \"inputValues\" ].setPropertyValue( \"PORTAL_ORGANIZATION\", porg.toString())
testRunner.testCase.testSteps[ \"inputValues\" ].setPropertyValue( \"trackingkey\", randomString.toString())
testRunner.testCase.testSteps[ \"inputValues\" ].setPropertyValue( \"timestamp\", ts.toString())
testRunner.runTestStepByName( runStep )
}
stepIndex = stepIndex + 2
testRunner.gotoStep( stepIndex )
Per your last response. Currently what I do for that is I have an Event (TestRunListener.afterStep) that logs the request/response and status.
def testStepName = context.currentStep.label\nlog.info testStepName + \" REQUEST \" + context.currentStep.getPropertyValue(\"RawRequest\")\nlog.info testStepName + \" RESPONSE \" + context.currentStep.getPropertyValue(\"RawResponse\")\nlog.info testStepName + \" TestStep has status \" + \"[\" + testStepResult.status + \"]\"
I plan on trying your script out though. Gathering the properties sounds smart to me.
Thanks for your all of your help.
","body@stripHtml({\"removeProcessingText\":false,\"removeSpoilerMarkup\":false,\"removeTocMarkup\":false,\"truncateLength\":200})@stringLength":"208","kudosSumWeight":1,"repliesCount":0,"postTime":"2017-06-15T14:56:55.466-07:00","lastPublishTime":"2017-06-15T14:56:55.466-07:00","metrics":{"__typename":"MessageMetrics","views":12414},"visibilityScope":"PUBLIC","placeholder":false,"showMoveIndicator":false,"originalMessageForPlaceholder":null,"isEscalated":null,"solution":false,"replies":{"__typename":"MessageConnection","pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null},"edges":[]},"customFields":[],"attachments":{"__typename":"AttachmentConnection","edges":[],"pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null}}}}}},"page":"/forums/ForumMessagePage/ForumMessagePage","query":{"boardId":"readyapi-questions","messageSubject":"how-to-loop-test-suites-or-test-cases","messageId":"144035","replyId":"144231"},"buildId":"3XH0qYWYCnEYycuN5W4S8","runtimeConfig":{"buildInformationVisible":false,"logLevelApp":"info","logLevelMetrics":"info","surveysEnabled":true,"openTelemetry":{"clientEnabled":false,"configName":"smartbear","serviceVersion":"25.4.0","universe":"prod","collector":"http://localhost:4318","logLevel":"error","routeChangeAllowedTime":"5000","headers":"","enableDiagnostic":"false","maxAttributeValueLength":"4095"},"apolloDevToolsEnabled":false,"quiltLazyLoadThreshold":"3"},"isFallback":false,"isExperimentalCompile":false,"dynamicIds":["components_seo_QAPageSchema","components_community_Navbar_NavbarWidget","components_community_Breadcrumb_BreadcrumbWidget","components_messages_TopicWithThreadedReplyListWidget","components_messages_MessageListForNodeByRecentActivityWidget","components_messages_RelatedContentWidget","components_customComponent_CustomComponent","components_messages_MessageView_MessageViewStandard","components_messages_EscalatedMessageBanner","shared_client_components_common_List_UnstyledList","components_messages_MessageView","components_messages_MessageView_MessageViewInline","shared_client_components_common_Pager_PagerLoadMore","components_customComponent_CustomComponentContent_TemplateContent"],"appGip":true,"scriptLoader":[]}