Forum Discussion

johan_l's avatar
johan_l
New Contributor
9 years ago
Solved

Problem with hexadecimals in JDBC Request

Hi! I am using SoapUi Pro 5.1.2. I got this problem with hexadecimals when I try to fetch it from the database.   For example, I make a JDBC request where I just try to get the id from the table. S...
  • nmrao's avatar
    9 years ago
    May be you can introduce a groovy script as intermediate step or add a script assertion step and do the following:
    Get the required value, concatenet it with missing string and set it as a test case property, then use it in the next step.
  • johan_l's avatar
    johan_l
    9 years ago

    Wrote this little script

     

    def fooVariable= testRunner.testCase.testSuite.getPropertyValue("fooVariable")
    if(!fooVariable.substring(0,2).equals("0x")){
    testRunner.testCase.testSuite.setPropertyValue("fooVariable","0x"+fooVariable)
    }

    seems to work