Forum Discussion
JKambli
Staff
You can save the hashmap as TestSuite property and then re convert string to hashmap and refer it in another case. Since TestSuite property can be shared between testCases if they are in the same suite.
testRunner.testCase.testSuite.setPropertyValue( "Map", Map.toString())
swety
8 years agoNew Contributor
Thanks for your answers, I want to use context to transfert my map between two TestCase
I create and write to the map in TestCase1
// create map inside testcase1 def Map = [Login :"Login", Nom: "Nom"] //set the map in the context context.setProperty("Map", "Map)
But in testcase2 when I try to get the map using context I get nothing : the variable is not passed into it
testRunner.testCase.testSuite.project.testSuites.testCases['testcase1'].context.Map
Thanks advance for your help