Forum Discussion

caz88's avatar
caz88
Occasional Contributor
6 years ago

Is there a way I can input a specific value what will only run tests with that value

Hey Folks,    I'm wanting to input a specific value before running my tests that will allow me to only run tests that have that specific value in the Datasource.    Would I be able to do this...
  • meinTest's avatar
    6 years ago

    Hi Caz88,

     

    if I understand you correctly, your question is only, how you access the global properties from a groovyScript, right?

     

    If yes, the answer is as follows:

    def objGlobalProperties = com.eviware.soapui.SoapUI.globalProperties;
    
    //set the global property -> if the property does not exist then it will be created automatically
    objGlobalProperties.setPropertyValue("globalPropertyName", "globalPropertyValue");
    
    //get the global property 
    def strValue = objGlobalProperties.getPropertyValue("globalPropertyName");
    
    log.info("The value is:" + strValue);

     

    Best regards 

     

    sign.png

      meinTest GmbH

      www.meinTest.software

     

     SmartBear preferred value-added Service

     Provider in the DACH region