Forum Discussion

白夜有点黑's avatar
白夜有点黑
Contributor
5 years ago
Solved

How to evaluate a String which one like a classname.methodname in SoapUI with Groovy?

I have groovy code as below: def randomInt = RandomUtil.getRandomInt(1,200); log.info randomInt def chars = (("1".."9") + ("A".."Z") + ("a".."z")).join() def randomString = RandomUtil.getRandomStrin...
  • 白夜有点黑's avatar
    白夜有点黑
    5 years ago

    solved it use full package path include evaluate String: 

     

    evaluate("com.test.apitest.util.RandomUtil.getRandomString(chars, randomInt)")