Contributions
Re: How pass groovy HashMap via testcase ?
Thanks for your answers, I want to use context to transfert my map between two TestCase I create and write to the mapin TestCase1 // create map inside testcase1 def Map = [Login :"Login", Nom: "Nom"] //set the map in the context context.setProperty("Map", "Map) Butin 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 help8 years agoPlace ReadyAPI QuestionsReadyAPI Questions3.3KViews0likes2CommentsHow pass groovy HashMap via testcase ?
I want to do the following in soapUI using Groovy: TestCase1: Select values (Lastname, firstname) from database Create hashMap with dynamique value def Map = [Login :"$Login", Nom: "$Nom"] I need my map to be transferred to another TestCase, for this i trying to put my Map into properties > testRunner.testCase.setPropertyValue( "Map", Map) But i have error: > groovy.lang.MissingMethodException: No signature of method: > com.eviware.soapui.impl.wsdl.WsdlTestCasePro.setPropertyValue() is > applicable for argument types: (java.lang.String, > java.util.LinkedHashMap) values: [OuvInfoPersoMap, > [Login:dupond0001, Nom:Dupond]] Possible solutions: > setPropertyValue(java.lang.String, java.lang.String), > getPropertyValue(java.lang.String) error at line: 123 I found some posts on internet that suggests to use metaClass groovy property > context.testCase.metaClass.map = Map log.info context.testCase.map But I don't think it enough in my case I would like to be able to pass a map to Testcase2 Testcase2: > createMap = > testRunner.testCase.testSuite.project.testSuites.testCases["TestCase1"] > createMap.map Hopefully you can help me solving this problem. Thanks advance3.3KViews0likes4Comments