ich eine Antwort wie diese haben sparen:Wie einen Booleschen Wert in soapui Eigenschaft mit groovy Skript
{
"timestamp": "2016-05-03T12:55:54Z",
"data": {
"update_by": null,
"create_at": "2016-05-03T12:55:54Z",
"delete_by": null,
"update_at": "2016-05-03T12:55:54Z",
"create_by": null,
"primary": true,
"address": "[email protected]",
"delete_at": null,
"type": "public",
"id": "c770b810-5895-88fa-aa90-88bba76678dd"
},
"success": true
}
und ich verwende diesen starken Code einige Daten zu speichern. import groovy.json.JsonSlurper
def response = context.expand('${create_email#Response#declare namespace ns1=\'https://zenith.io/ns/20780518\'; //ns1:create_person_email_resp[1]/ns1:item[1]/ns1:response[1]}')
def slurper = new JsonSlurper()
def result = slurper.parseText(response)
log.info result.data.id
log.info result.data.address
log.info result.data.type
log.info result.data.primary
testRunner.testCase.setPropertyValue("email_id", result.data.id)
testRunner.testCase.setPropertyValue("email", result.data.address)
testRunner.testCase.setPropertyValue("type", result.data.type)
testRunner.testCase.setPropertyValue("primary", result.data.primary)
die Daten mit boolean (primären) nicht gespeichert werden kann. ich sehe diesen Fehler:
groovy.lang.MissingMethodException: No signature of method: com.eviware.soapui.impl.wsdl.WsdlTestCasePro.setPropertyValue() is applicable for argument types: (java.lang.String, java.lang.Boolean) values: [primary, false] Possible solutions: setPropertyValue(java.lang.String, java.lang.String), getPropertyValue(java.lang.String) error at line: 17
Wie kann ich den Booleschen Wert in Immobilien für Primär speichern?
Vielen Dank, schön es funktioniert. –
Bitte lesen und befolgen Sie http://stackoverflow.com/help/someone-answers :-) – Vampire