Ask a Question

validate soapfault via groovy script

RJanecek
Regular Contributor

validate soapfault via groovy script

Hi,
is possible to validate response if it is soapfault via groovy script or is possible to validate it as assertation but turn it off sometime when some patameter will by off
4 REPLIES 4
RJanecek
Regular Contributor

I found something similar :

context.getTestSuite().getTestCaseByName("teststep1").getTestStepByName("Zadost").addAssertion("SOAP Fault")

but this isnt exactly what I want
SmartBear_Suppo
SmartBear Alumni (Retired)

Hi,

you could either add the assertion and enable/disable it via a script;

context.getTestSuite().getTestCaseByName("teststep1").getTestStepByName("Zadost").getAssertionByName( "..." ).disabled = true/false

but you would have to do this before the request is submitted..

would that work?

regards!

/Ole
SmartBear Software

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
RJanecek
Regular Contributor

yes this works but it isnt still what I want. this solution change code in sopaUI project what I dont want
SmartBear_Suppo
SmartBear Alumni (Retired)

Hi,

then you would have to do it via a groovy script - just search for the soap fault element in the response..

regards,

/Ole
SmartBear Software

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
cancel
Showing results for 
Search instead for 
Did you mean: