Forum Discussion

andreasb's avatar
andreasb
New Contributor
9 months ago

Command Line Runner - Set HTTPSettings encoded urls

We are running ReadyAPI within our CI/CD Pipelines using the command line runner. What would be an appropriate way to set the encoded URL option within the HTTPSettings using the command line arguments? We would like to forego needing to define a complete custom readyapi-settings.xml. If however necessary, is it possible to construct a minimal readyapi-settings.xml? If so, do templates exist?

  • nmrao's avatar
    nmrao
    Champion Level 3

    andreasb 

    Would you please show the relevant part of the custom settings.xml file related to HTTPSettings?

     

  • nmrao's avatar
    nmrao
    Champion Level 3

    andreasb 

    It is possible to achieve what you are looking for without additional settings.xml.

    All it is required is to go to Project, Load Script and add below

    import com.eviware.soapui.SoapUI 
    import com.eviware.soapui.settings.HttpSettings 
    
    SoapUI.getSettings().setBoolean(HttpSettings.ENCODED_URLS, true) 
    SoapUI.saveSettings()

    Of course, if you want to pass value i.e., true or false from command line, please use project property instead of true in the above.

    NOTE: the above worked on Open Source, not tried with ReadyAPI.