// get test suite
def myTestSuite = testRunner.testCase.testSuite.project.getTestSuiteByName(\"TestSuite 1\")
// get your test case
def myTestCase = myTestSuite.getTestCaseByName(\"Login\")
// set the user and password properties in the context
context.setProperty(\"username\", context.testCase.testSuite.project.getPropertyValue(\"username\" + context.ThreadIndex))
context.setProperty(\"password\", context.testCase.testSuite.project.getPropertyValue(\"password\" + context.ThreadIndex))
// run the testCase passing the context
def contextMap = new StringToObjectMap( context )
def calledTestRun = myTestCase.run(contextMap,false);
def myContext = calledTestRun.getRunContext()
\ntoken = myContext.testCase.getPropertyValue(\"token\")
\ncontext.setProperty(\"token\", token)
\n\n
The login test case (called test case) used ${#username} and ${#password} variables in its request to use distinct login credential values for each thread.
\n\n
Similarly the groovy script inside the login test case set a 'token' property inside context.testCase.setPropertyValue(). This will be extracted by caller by getting the context.
\n\n
During the load test I have observed that in 1 in 15 times, I saw 2 threads overwriting each other's token (around 3-4 invalid token errors after say 50 successful logins).
\n\n
Can you please let me know if getRunContext() call is not thread-safe after running the test case?
","body@stringLength":"1965","rawBody":"The above issue is solved after I called the test case through Groovy script and passing a new context to it while running. Similarly returning the context from the run test case and using properties set in the run test case back in the parent test case.
\n\n
The groovy step looks like below (that calls Login test case).
\nimport com.eviware.soapui.support.types.StringToObjectMap
// get test suite
def myTestSuite = testRunner.testCase.testSuite.project.getTestSuiteByName(\"TestSuite 1\")
// get your test case
def myTestCase = myTestSuite.getTestCaseByName(\"Login\")
// set the user and password properties in the context
context.setProperty(\"username\", context.testCase.testSuite.project.getPropertyValue(\"username\" + context.ThreadIndex))
context.setProperty(\"password\", context.testCase.testSuite.project.getPropertyValue(\"password\" + context.ThreadIndex))
// run the testCase passing the context
def contextMap = new StringToObjectMap( context )
def calledTestRun = myTestCase.run(contextMap,false);
def myContext = calledTestRun.getRunContext()
\ntoken = myContext.testCase.getPropertyValue(\"token\")
\ncontext.setProperty(\"token\", token)
\n\n
The login test case (called test case) used ${#username} and ${#password} variables in its request to use distinct login credential values for each thread.
\n\n
Similarly the groovy script inside the login test case set a 'token' property inside context.testCase.setPropertyValue(). This will be extracted by caller by getting the context.
\n\n
During the load test I have observed that in 1 in 15 times, I saw 2 threads overwriting each other's token (around 3-4 invalid token errors after say 50 successful logins).
\n\n
Can you please let me know if getRunContext() call is not thread-safe after running the test case?
","author":{"__ref":"User:user:80693"},"isEscalated":null,"postTime":"2018-08-29T23:07:29.915-07:00","solution":false,"customFields":[],"attachments":{"__typename":"AttachmentConnection","edges":[],"pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null}},"kudosSumWeight":0,"repliesCount":7,"images":{"__typename":"AssociatedImageConnection","edges":[],"totalCount":0,"pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null}},"timeToRead":2,"currentRevision":{"__ref":"Revision:revision:170482_1"},"latestVersion":null,"metrics":{"__typename":"MessageMetrics","views":3212},"visibilityScope":"PUBLIC","placeholder":false,"originalMessageForPlaceholder":null,"messagePolicies":{"__typename":"MessagePolicies","canModerateSpamMessage":{"__typename":"PolicyResult","failureReason":{"__typename":"FailureReason","message":"error.lithium.policies.feature.moderation_spam.action.moderate_entity.allowed.accessDenied","key":"error.lithium.policies.feature.moderation_spam.action.moderate_entity.allowed.accessDenied","args":[]}}}},"Revision:revision:170485_3":{"__typename":"Revision","id":"revision:170485_3","lastEditTime":"2018-08-30T00:06:23.036-07:00"},"QueryVariables:ReplyList:message:265328:1":{"__typename":"QueryVariables","id":"ReplyList:message:265328:1","value":{"id":"message:265328","first":10,"sorts":{"kudosSumWeight":{"direction":"DESC","order":0},"postTime":{"direction":"ASC","order":1}},"repliesFirst":3,"repliesFirstDepthThree":1,"repliesSorts":{"kudosSumWeight":{"direction":"DESC","order":0},"postTime":{"direction":"ASC","order":1}},"useAvatar":true,"useAuthorLogin":true,"useAuthorRank":true,"useBody":true,"useKudosCount":true,"useTimeToRead":false,"useMedia":false,"useReadOnlyIcon":false,"useRepliesCount":true,"useSearchSnippet":false,"useAcceptedSolutionButton":true,"useSolvedBadge":false,"useAttachments":false,"attachmentsFirst":5,"useTags":false,"useNodeAncestors":false,"useUserHoverCard":false,"useNodeHoverCard":false,"useModerationStatus":true,"usePreviewSubjectModal":false,"useMessageStatus":true}},"CachedAsset:text:en_US-shared/client/components/users/UserAvatar-1741125846000":{"__typename":"CachedAsset","id":"text:en_US-shared/client/components/users/UserAvatar-1741125846000","value":{"altText":"{login}'s avatar","altTextGeneric":"User's avatar"},"localOverride":false},"CachedAsset:text:en_US-shared/client/components/ranks/UserRankLabel-1741125846000":{"__typename":"CachedAsset","id":"text:en_US-shared/client/components/ranks/UserRankLabel-1741125846000","value":{"altTitle":"Icon for {rankName} rank"},"localOverride":false},"CachedAsset:text:en_US-components/messages/AcceptedSolutionButton-1741125846000":{"__typename":"CachedAsset","id":"text:en_US-components/messages/AcceptedSolutionButton-1741125846000","value":{"accept":"Mark as Solution","accepted":"Marked as Solution","errorHeader":"Error!","errorAdd":"There was an error marking as solution.","errorRemove":"There was an error unmarking as solution.","solved":"Solved","topicAlreadySolvedErrorTitle":"Solution Already Exists","topicAlreadySolvedErrorDesc":"Refresh the browser to view the existing solution"},"localOverride":false},"CachedAsset:text:en_US-components/messages/ThreadedReplyList-1741125846000":{"__typename":"CachedAsset","id":"text:en_US-components/messages/ThreadedReplyList-1741125846000","value":{"title":"{count, plural, one{# Reply} other{# Replies}}","title@board:BLOG":"{count, plural, one{# Comment} other{# Comments}}","title@board:TKB":"{count, plural, one{# Comment} other{# Comments}}","title@board:IDEA":"{count, plural, one{# Comment} other{# Comments}}","title@board:OCCASION":"{count, plural, one{# Comment} other{# Comments}}","noRepliesTitle":"No Replies","noRepliesTitle@board:BLOG":"No Comments","noRepliesTitle@board:TKB":"No Comments","noRepliesTitle@board:IDEA":"No Comments","noRepliesTitle@board:OCCASION":"No Comments","noRepliesDescription":"Be the first to reply","noRepliesDescription@board:BLOG":"Be the first to comment","noRepliesDescription@board:TKB":"Be the first to comment","noRepliesDescription@board:IDEA":"Be the first to comment","noRepliesDescription@board:OCCASION":"Be the first to comment","messageReadOnlyAlert:BLOG":"Comments have been turned off for this post","messageReadOnlyAlert:TKB":"Comments have been turned off for this article","messageReadOnlyAlert:IDEA":"Comments have been turned off for this idea","messageReadOnlyAlert:FORUM":"Replies have been turned off for this discussion","messageReadOnlyAlert:OCCASION":"Comments have been turned off for this event"},"localOverride":false},"ForumReplyMessage:message:265327":{"__typename":"ForumReplyMessage","id":"message:265327","customFields":[],"revisionNum":1,"attachments":{"__typename":"AttachmentConnection","edges":[],"pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null}},"author":{"__ref":"User:user:104801"},"uid":265327,"depth":1,"hasGivenKudo":false,"subscribed":false,"board":{"__ref":"Forum:board:testcomplete-questions"},"conversation":{"__ref":"Conversation:conversation:265279"},"subject":"Re: Item cannot be found in the collection corresponding to the requested name or ordinal","readOnly":false,"editFrozen":false,"moderationData":{"__ref":"ModerationData:moderation_data:265327"},"body":"If I'm reading this correct, your answer \"Yes. But I don't spot any code error either :(\" to my previous question, suggests there's no errors during debug?
\nNow you are saying the error appears during playback and during debug? While debugging, where is the error occurring?
","body@stringLength":"296","rawBody":"If I'm reading this correct, your answer \"Yes. But I don't spot any code error either :(\" to my previous question, suggests there's no errors during debug?
\nNow you are saying the error appears during playback and during debug? While debugging, where is the error occurring?
","kudosSumWeight":0,"repliesCount":3,"postTime":"2024-06-10T09:31:58.691-07:00","images":{"__typename":"AssociatedImageConnection","edges":[],"totalCount":0,"pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null}},"timeToRead":1,"currentRevision":{"__ref":"Revision:revision:265327_1"},"latestVersion":null,"metrics":{"__typename":"MessageMetrics","views":21},"visibilityScope":"PUBLIC","isEscalated":null,"placeholder":false,"originalMessageForPlaceholder":null,"messagePolicies":{"__typename":"MessagePolicies","canModerateSpamMessage":{"__typename":"PolicyResult","failureReason":{"__typename":"FailureReason","message":"error.lithium.policies.feature.moderation_spam.action.moderate_entity.allowed.accessDenied","key":"error.lithium.policies.feature.moderation_spam.action.moderate_entity.allowed.accessDenied","args":[]}}}},"ForumReplyMessage:message:265328":{"__typename":"ForumReplyMessage","id":"message:265328","customFields":[],"revisionNum":1,"attachments":{"__typename":"AttachmentConnection","edges":[],"pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null}},"author":{"__ref":"User:user:124792"},"uid":265328,"depth":2,"hasGivenKudo":false,"subscribed":false,"board":{"__ref":"Forum:board:testcomplete-questions"},"conversation":{"__ref":"Conversation:conversation:265279"},"subject":"Re: Item cannot be found in the collection corresponding to the requested name or ordinal","readOnly":false,"editFrozen":false,"moderationData":{"__ref":"ModerationData:moderation_data:265328"},"body":"Sorry for confusion. When I said I don't spot any code error I meant that I have a problem, the code giving the error but I can't find it. Why I have this error?
And error is appears in same line which is line 12 below:
function searchForExistingRecord()\n{\n navigate_person_search_form();\n \n let page = browser.pagePersonEidss;\n page.Wait();\n let textbox = page.formPersonsearchform;\n let textbox3 = textbox.textboxPersonId;\n \n textbox3.WaitProperty(\"Enabled\", true, 2000);\n \n let str = DDT.CurrentDriver.Value(\"PersonID\");\n Log.Message(str);\n \n textbox3.setText(str);\n \n textbox.buttonSearchbutton.ClickButton();\n \n aqObject.CheckProperty(textbox.hyperLinkInGrid, \"contentText\" , cmpEqual, DDT.CurrentDriver.Value(\"PersonID\"));\n \n browser.Close();\n}
","body@stringLength":"893","rawBody":"
Sorry for confusion. When I said I don't spot any code error I meant that I have a problem, the code giving the error but I can't find it. Why I have this error?
And error is appears in same line which is line 12 below:
","kudosSumWeight":0,"repliesCount":2,"postTime":"2024-06-10T09:37:08.506-07:00","images":{"__typename":"AssociatedImageConnection","edges":[],"totalCount":0,"pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null}},"timeToRead":1,"currentRevision":{"__ref":"Revision:revision:265328_1"},"latestVersion":null,"metrics":{"__typename":"MessageMetrics","views":7},"visibilityScope":"PUBLIC","isEscalated":null,"placeholder":false,"originalMessageForPlaceholder":null,"messagePolicies":{"__typename":"MessagePolicies","canModerateSpamMessage":{"__typename":"PolicyResult","failureReason":{"__typename":"FailureReason","message":"error.lithium.policies.feature.moderation_spam.action.moderate_entity.allowed.accessDenied","key":"error.lithium.policies.feature.moderation_spam.action.moderate_entity.allowed.accessDenied","args":[]}}},"parent":{"__ref":"ForumReplyMessage:message:265327"},"replies":{"__typename":"MessageConnection","edges":[{"__typename":"MessageEdge","cursor":"MjUuMnwyLjF8b3wxMHwxNDowLDM5OjF8MQ","node":{"__ref":"ForumReplyMessage:message:265336"}}],"pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null}}},"Rank:rank:13":{"__typename":"Rank","id":"rank:13","position":19,"name":"Contributor","color":"00537C","icon":null,"rankStyle":"OUTLINE"},"User:user:124792":{"__typename":"User","id":"user:124792","uid":124792,"login":"EkremMese1","deleted":false,"avatar":{"__typename":"UserAvatar","url":"https://community.smartbear.com/t5/s/nwkab66374/m_assets/avatars/default/avatar-4.svg?time=0"},"rank":{"__ref":"Rank:rank:13"},"biography":null,"registrationData":{"__typename":"RegistrationData","status":null,"registrationTime":"2024-06-07T06:36:58.431-07:00"},"email":"","entityType":"USER","eventPath":"community:nwkab66374/user:124792"},"Category:category:TestComplete_forum":{"__typename":"Category","id":"category:TestComplete_forum","entityType":"CATEGORY","displayId":"TestComplete_forum","nodeType":"category","depth":1,"title":"TestComplete","shortTitle":"TestComplete Community","parent":{"__ref":"Category:category:top"}},"Forum:board:testcomplete-questions":{"__typename":"Forum","id":"board:testcomplete-questions","entityType":"FORUM","displayId":"testcomplete-questions","nodeType":"board","depth":2,"conversationStyle":"FORUM","description":"","title":"TestComplete Questions","shortTitle":"TestComplete Questions","parent":{"__ref":"Category:category:TestComplete_forum"},"ancestors":{"__typename":"CoreNodeConnection","edges":[{"__typename":"CoreNodeEdge","node":{"__ref":"Community:community:nwkab66374"}},{"__typename":"CoreNodeEdge","node":{"__ref":"Category:category:TestComplete_forum"}}]},"userContext":{"__typename":"NodeUserContext","canAddAttachments":true,"canUpdateNode":false,"canPostMessages":false,"isSubscribed":false},"eventPath":"category:TestComplete_forum/community:nwkab66374board:testcomplete-questions/"},"ForumTopicMessage:message:265279":{"__typename":"ForumTopicMessage","uid":265279,"subject":"Item cannot be found in the collection corresponding to the requested name or ordinal","id":"message:265279","revisionNum":1,"repliesCount":23},"Conversation:conversation:265279":{"__typename":"Conversation","id":"conversation:265279","solved":true,"topic":{"__ref":"ForumTopicMessage:message:265279"},"lastPostingActivityTime":"2024-06-13T11:50:26.329-07:00","lastPostTime":"2024-06-13T11:50:26.329-07:00","unreadReplyCount":23,"isSubscribed":false},"ModerationData:moderation_data:265328":{"__typename":"ModerationData","id":"moderation_data:265328","status":"APPROVED","rejectReason":null,"isReportedAbuse":false,"rejectUser":null,"rejectTime":null,"rejectActorType":"member"},"Revision:revision:265328_1":{"__typename":"Revision","id":"revision:265328_1","lastEditTime":"2024-06-10T09:37:08.506-07:00"},"AssociatedImage:{\"url\":\"https://community.smartbear.com/t5/s/nwkab66374/images/cmstMzMtV3lDSm9v\"}":{"__typename":"AssociatedImage","url":"https://community.smartbear.com/t5/s/nwkab66374/images/cmstMzMtV3lDSm9v","height":20,"width":20,"mimeType":"image/png"},"Rank:rank:33":{"__typename":"Rank","id":"rank:33","position":4,"name":"Champion Level 3","color":"FF730B","icon":{"__ref":"AssociatedImage:{\"url\":\"https://community.smartbear.com/t5/s/nwkab66374/images/cmstMzMtV3lDSm9v\"}"},"rankStyle":"OUTLINE"},"User:user:104801":{"__typename":"User","id":"user:104801","uid":104801,"login":"rraghvani","deleted":false,"avatar":{"__typename":"UserAvatar","url":"https://community.smartbear.com/t5/s/nwkab66374/images/dS0xMDQ4MDEtMTg1NDFpRTRGRjZBNEU5NURBMjRCOA"},"rank":{"__ref":"Rank:rank:33"},"biography":null,"registrationData":{"__typename":"RegistrationData","status":null,"registrationTime":"2022-01-18T00:46:16.751-08:00"},"email":"","entityType":"USER","eventPath":"community:nwkab66374/user:104801"},"ModerationData:moderation_data:265327":{"__typename":"ModerationData","id":"moderation_data:265327","status":"APPROVED","rejectReason":null,"isReportedAbuse":false,"rejectUser":null,"rejectTime":null,"rejectActorType":null},"Revision:revision:265327_1":{"__typename":"Revision","id":"revision:265327_1","lastEditTime":"2024-06-10T09:31:58.691-07:00"},"Revision:revision:170493_2":{"__typename":"Revision","id":"revision:170493_2","lastEditTime":"2018-08-30T00:41:12.785-07:00"},"ModerationData:moderation_data:265336":{"__typename":"ModerationData","id":"moderation_data:265336","status":"APPROVED","rejectReason":null,"isReportedAbuse":false,"rejectUser":null,"rejectTime":null,"rejectActorType":null},"ForumReplyMessage:message:265336":{"__typename":"ForumReplyMessage","uid":265336,"id":"message:265336","revisionNum":3,"author":{"__ref":"User:user:104801"},"readOnly":false,"repliesCount":1,"depth":3,"hasGivenKudo":false,"subscribed":false,"board":{"__ref":"Forum:board:testcomplete-questions"},"parent":{"__ref":"ForumReplyMessage:message:265328"},"conversation":{"__ref":"Conversation:conversation:265279"},"subject":"Re: Item cannot be found in the collection corresponding to the requested name or ordinal","moderationData":{"__ref":"ModerationData:moderation_data:265336"},"body":"
Why don't you comment out all lines of code accept for 12 and 13, to test if line 12 works?
\nAnd you are calling the following methods before searchForExistingRecord?
\nDDT.ExcelDriver(...)
DDT.CurrentDriver.DriveMethod()
Based on what you have provided, this is the results of it working by calling search_with_loop(),
\n\n","body@stripHtml({\"removeProcessingText\":false,\"removeSpoilerMarkup\":false,\"removeTocMarkup\":false,\"truncateLength\":200})@stringLength":"203","kudosSumWeight":0,"postTime":"2024-06-11T00:57:45.715-07:00","lastPublishTime":"2024-06-11T01:20:27.457-07:00","metrics":{"__typename":"MessageMetrics","views":17},"visibilityScope":"PUBLIC","placeholder":false,"originalMessageForPlaceholder":null,"isEscalated":null,"solution":false,"entityType":"FORUM_REPLY","eventPath":"category:TestComplete_forum/community:nwkab66374board:testcomplete-questions/message:265279/message:265336","replies":{"__typename":"MessageConnection","pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null},"edges":[{"__typename":"MessageEdge","cursor":"MjUuMnwyLjF8b3wzfDE0OjAsMzk6MXwx","node":{"__ref":"ForumReplyMessage:message:265363"}}]}},"ModerationData:moderation_data:265363":{"__typename":"ModerationData","id":"moderation_data:265363","status":"APPROVED","rejectReason":null,"isReportedAbuse":false,"rejectUser":null,"rejectTime":null,"rejectActorType":"member"},"ForumReplyMessage:message:265363":{"__typename":"ForumReplyMessage","author":{"__ref":"User:user:124792"},"id":"message:265363","revisionNum":1,"uid":265363,"depth":4,"hasGivenKudo":false,"subscribed":false,"board":{"__ref":"Forum:board:testcomplete-questions"},"parent":{"__ref":"ForumReplyMessage:message:265336"},"conversation":{"__ref":"Conversation:conversation:265279"},"subject":"Re: Item cannot be found in the collection corresponding to the requested name or ordinal","moderationData":{"__ref":"ModerationData:moderation_data:265363"},"body":"
When I comment out all the lines and just left the lines 12 and 13 it works.
","body@stripHtml({\"removeProcessingText\":false,\"removeSpoilerMarkup\":false,\"removeTocMarkup\":false,\"truncateLength\":200})@stringLength":"90","kudosSumWeight":0,"repliesCount":0,"postTime":"2024-06-11T13:14:58.702-07:00","lastPublishTime":"2024-06-11T13:14:58.702-07:00","metrics":{"__typename":"MessageMetrics","views":11},"visibilityScope":"PUBLIC","placeholder":false,"originalMessageForPlaceholder":null,"isEscalated":null,"solution":false,"entityType":"FORUM_REPLY","eventPath":"category:TestComplete_forum/community:nwkab66374board:testcomplete-questions/message:265279/message:265363","replies":{"__typename":"MessageConnection","pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null},"edges":[]}},"QueryVariables:ReplyList:message:170485:3":{"__typename":"QueryVariables","id":"ReplyList:message:170485:3","value":{"id":"message:170485","first":10,"sorts":{"kudosSumWeight":{"direction":"DESC","order":0},"postTime":{"direction":"ASC","order":1}},"repliesFirst":3,"repliesFirstDepthThree":1,"repliesSorts":{"kudosSumWeight":{"direction":"DESC","order":0},"postTime":{"direction":"ASC","order":1}},"useAvatar":true,"useAuthorLogin":true,"useAuthorRank":true,"useBody":true,"useKudosCount":true,"useTimeToRead":false,"useMedia":false,"useReadOnlyIcon":false,"useRepliesCount":true,"useSearchSnippet":false,"useAcceptedSolutionButton":true,"useSolvedBadge":false,"useAttachments":false,"attachmentsFirst":5,"useTags":false,"useNodeAncestors":false,"useUserHoverCard":false,"useNodeHoverCard":false,"useModerationStatus":true,"usePreviewSubjectModal":false,"useMessageStatus":true}},"Revision:revision:170482_1":{"__typename":"Revision","id":"revision:170482_1","lastEditTime":"2018-08-29T23:07:29.915-07:00"},"ModerationData:moderation_data:170486":{"__typename":"ModerationData","id":"moderation_data:170486","status":"APPROVED","rejectReason":null,"isReportedAbuse":false,"rejectUser":null,"rejectTime":null,"rejectActorType":null},"ForumReplyMessage:message:170486":{"__typename":"ForumReplyMessage","uid":170486,"id":"message:170486","revisionNum":1,"author":{"__ref":"User:user:77351"},"readOnly":false,"repliesCount":5,"depth":5,"hasGivenKudo":false,"subscribed":false,"board":{"__ref":"Forum:board:SoapUI_OS"},"parent":{"__ref":"ForumReplyMessage:message:170485"},"conversation":{"__ref":"Conversation:conversation:170417"},"subject":"Re: context.ThreadIndex is always zero in the target test case called through \"Run Test Case Step\"","moderationData":{"__ref":"ModerationData:moderation_data:170486"},"body":"Also I'm not sure what this is supposed to do:
\ndef contextMap = new StringToObjectMap( context )\ndef calledTestRun = myTestCase.run(contextMap,false);\ndef myContext = calledTestRun.getRunContext()\n
I would have thought that this is just creating two references to the same object:
\nassert contextMap.is(myContext)\n
Isn't it?
","body@stripHtml({\"removeProcessingText\":false,\"removeSpoilerMarkup\":false,\"removeTocMarkup\":false,\"truncateLength\":200})@stringLength":"203","kudosSumWeight":0,"postTime":"2018-08-29T23:51:28.130-07:00","lastPublishTime":"2018-08-29T23:51:28.130-07:00","metrics":{"__typename":"MessageMetrics","views":3209},"visibilityScope":"PUBLIC","placeholder":false,"originalMessageForPlaceholder":null,"isEscalated":null,"solution":false,"entityType":"FORUM_REPLY","eventPath":"category:soapui-os-community/community:nwkab66374board:SoapUI_OS/message:170417/message:170486","replies":{"__typename":"MessageConnection","pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null},"edges":[{"__typename":"MessageEdge","cursor":"MjUuMnwyLjF8b3wzfDE0OjAsMzk6MXwx","node":{"__ref":"ForumReplyMessage:message:170487"}}]},"customFields":[],"attachments":{"__typename":"AttachmentConnection","edges":[],"pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null}},"editFrozen":false,"body@stringLength":"365","rawBody":"Also I'm not sure what this is supposed to do:
\ndef contextMap = new StringToObjectMap( context )\ndef calledTestRun = myTestCase.run(contextMap,false);\ndef myContext = calledTestRun.getRunContext()\n
I would have thought that this is just creating two references to the same object:
\nassert contextMap.is(myContext)\n
Isn't it?
","images":{"__typename":"AssociatedImageConnection","edges":[],"totalCount":0,"pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null}},"timeToRead":1,"currentRevision":{"__ref":"Revision:revision:170486_1"},"latestVersion":null,"messagePolicies":{"__typename":"MessagePolicies","canModerateSpamMessage":{"__typename":"PolicyResult","failureReason":{"__typename":"FailureReason","message":"error.lithium.policies.feature.moderation_spam.action.moderate_entity.allowed.accessDenied","key":"error.lithium.policies.feature.moderation_spam.action.moderate_entity.allowed.accessDenied","args":[]}}}},"ModerationData:moderation_data:170487":{"__typename":"ModerationData","id":"moderation_data:170487","status":"APPROVED","rejectReason":null,"isReportedAbuse":false,"rejectUser":null,"rejectTime":null,"rejectActorType":null},"ForumReplyMessage:message:170487":{"__typename":"ForumReplyMessage","uid":170487,"id":"message:170487","revisionNum":2,"author":{"__ref":"User:user:80693"},"readOnly":false,"repliesCount":4,"depth":6,"hasGivenKudo":false,"subscribed":false,"board":{"__ref":"Forum:board:SoapUI_OS"},"parent":{"__ref":"ForumReplyMessage:message:170486"},"conversation":{"__ref":"Conversation:conversation:170417"},"subject":"Re: context.ThreadIndex is always zero in the target test case called through \"Run Test Case Step\"","moderationData":{"__ref":"ModerationData:moderation_data:170487"},"body":"Thanks for your response JHunt. Yes, both variables should point to the same one. I didn't realise that the contextMap passed on to the run() method is itself getting updated after the test case is run.
\n\n
I will try out your solution and post the response.
\nEDIT: I guess you have removed part of your advice from the above post. Shouldn't context.setProperty('token', somevalue) work from the called test case and caller extract it using contextMap.getProperty('token')?
\n","body@stripHtml({\"removeProcessingText\":false,\"removeSpoilerMarkup\":false,\"removeTocMarkup\":false,\"truncateLength\":200})@stringLength":"213","kudosSumWeight":0,"postTime":"2018-08-30T00:07:14.292-07:00","lastPublishTime":"2018-08-30T00:15:25.069-07:00","metrics":{"__typename":"MessageMetrics","views":3206},"visibilityScope":"PUBLIC","placeholder":false,"originalMessageForPlaceholder":null,"isEscalated":null,"solution":false,"entityType":"FORUM_REPLY","eventPath":"category:soapui-os-community/community:nwkab66374board:SoapUI_OS/message:170417/message:170487","replies":{"__typename":"MessageConnection","pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null},"edges":[{"__typename":"MessageEdge","cursor":"MjUuMnwyLjF8b3wxfDE0OjAsMzk6MXwx","node":{"__ref":"ForumReplyMessage:message:170491"}}]},"customFields":[],"attachments":{"__typename":"AttachmentConnection","edges":[],"pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null}},"editFrozen":false,"body@stringLength":"717","rawBody":"
Thanks for your response
\n
I will try out your solution and post the response.
\nEDIT: I guess you have removed part of your advice from the above post. Shouldn't context.setProperty('token', somevalue) work from the called test case and caller extract it using contextMap.getProperty('token')?
\n","images":{"__typename":"AssociatedImageConnection","edges":[],"totalCount":0,"pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null}},"timeToRead":1,"currentRevision":{"__ref":"Revision:revision:170487_2"},"latestVersion":null,"messagePolicies":{"__typename":"MessagePolicies","canModerateSpamMessage":{"__typename":"PolicyResult","failureReason":{"__typename":"FailureReason","message":"error.lithium.policies.feature.moderation_spam.action.moderate_entity.allowed.accessDenied","key":"error.lithium.policies.feature.moderation_spam.action.moderate_entity.allowed.accessDenied","args":[]}}}},"ModerationData:moderation_data:170491":{"__typename":"ModerationData","id":"moderation_data:170491","status":"APPROVED","rejectReason":null,"isReportedAbuse":false,"rejectUser":null,"rejectTime":null,"rejectActorType":null},"Revision:revision:170487_2":{"__typename":"Revision","id":"revision:170487_2","lastEditTime":"2018-08-30T00:15:25.069-07:00"},"Revision:revision:170486_1":{"__typename":"Revision","id":"revision:170486_1","lastEditTime":"2018-08-29T23:51:28.130-07:00"},"Revision:revision:170491_1":{"__typename":"Revision","id":"revision:170491_1","lastEditTime":"2018-08-30T00:21:51.795-07:00"}}}},"page":"/forums/ForumMessagePage/ForumMessagePage","query":{"boardId":"soapui_os","messageSubject":"context-threadindex-is-always-zero-in-the-target-test-case-called-through-run-te","messageId":"170417","replyId":"170485"},"buildId":"G6LFdF6Y8sb5g8rZyM3sC","runtimeConfig":{"buildInformationVisible":false,"logLevelApp":"info","logLevelMetrics":"info","openTelemetryClientEnabled":false,"openTelemetryConfigName":"smartbear","openTelemetryServiceVersion":"25.2.0","openTelemetryUniverse":"prod","openTelemetryCollector":"http://localhost:4318","openTelemetryRouteChangeAllowedTime":"5000","apolloDevToolsEnabled":false,"inboxMuteWipFeatureEnabled":false},"isFallback":false,"isExperimentalCompile":false,"dynamicIds":["./components/seo/QAPageSchema/QAPageSchema.tsx","./components/community/Navbar/NavbarWidget.tsx","./components/community/Breadcrumb/BreadcrumbWidget.tsx","./components/messages/TopicWithThreadedReplyListWidget/TopicWithThreadedReplyListWidget.tsx","./components/messages/MessageListForNodeByRecentActivityWidget/MessageListForNodeByRecentActivityWidget.tsx","./components/messages/RelatedContentWidget/RelatedContentWidget.tsx","./components/customComponent/CustomComponent/CustomComponent.tsx","./components/messages/MessageView/MessageViewStandard/MessageViewStandard.tsx","../shared/client/components/common/List/UnstyledList/UnstyledList.tsx","./components/messages/MessageView/MessageView.tsx","./components/messages/MessageView/MessageViewInline/MessageViewInline.tsx","../shared/client/components/common/Pager/PagerLoadMore/PagerLoadMore.tsx","./components/customComponent/CustomComponentContent/TemplateContent.tsx"],"appGip":true,"scriptLoader":[]}