Forum Discussion

Ramiz1234's avatar
Ramiz1234
Regular Visitor
6 years ago
Solved

Looking for groovy script for updating SSL Keystore in RestTestREquest Properties.

Hi,

I am looking for updating the SSL KEystore in REST TestRequest Properties using groovy.

 

The groovy which i have is updating the WS-Security Configurations > Keystore. 

 

But, I need to update in the propeties section. Please help me.:)

-Ramiz

  • Hi Ramiz1234,

     

    Try

    // YourStepName
    def request = testRunner.testCase.testSteps["YourStepName"].testRequest
    request.setSslKeystore("") // input your string
    
    // if you want to update Rest test step, try below
    
    def request = testRunner.testCase.getTestStepsOfType(com.eviware.soapui.impl.wsdl.teststeps.RestTestRequestStep.class).each{teststep - >
    teststep.testRequest.setSslKeystore("") // input your string
    }
    

     

    Regards,

    /Aaron

1 Reply

  • aaronpliu's avatar
    aaronpliu
    Frequent Contributor

    Hi Ramiz1234,

     

    Try

    // YourStepName
    def request = testRunner.testCase.testSteps["YourStepName"].testRequest
    request.setSslKeystore("") // input your string
    
    // if you want to update Rest test step, try below
    
    def request = testRunner.testCase.getTestStepsOfType(com.eviware.soapui.impl.wsdl.teststeps.RestTestRequestStep.class).each{teststep - >
    teststep.testRequest.setSslKeystore("") // input your string
    }
    

     

    Regards,

    /Aaron