Bank.log = log Bank b1 = new Bank() b1.name = "BOA" b1.minbalance = 100 b1.city="London" Bank b2 = new Bank() b2.name = "HSBC" b2.minbalance = 100 b2.city="LA" Bank b3 = new Bank("A",100,"X") log…
Building test suites, Test cases and Test steps in SOAP UI Levels : test step level test case level test suite level project level Groovy script test step Write groovy code in groovy script test step log object in SOAP UI Info and error log log.error…
出现 Error:Cannot compile Groovy files: no Groovy library is defined for module 'xxxx' 只要在 project structure 中的modules中左上角的 + 号,然后找到groovy添加即可! 具体可参考: http://stackoverflow.com/questions/43450683/errorcannot-compile-groovy-files-no-groovy-library-is-def…
1.Groovy SDK下载 Groovy SDK官网下载地址: http://www.groovy-lang.org/download.html  每个版本有五个选项可供下载,依次为: binary:二进制包 source:源文件 documentation:文档 SDK bundle:SDK包,包含前面三种类型 Windows installer:windows下的安装文件 推荐下载SDK bundle. 注:若需要用IntelliJ IDEA 配置Groovy环境,建议不要选择太高版本,最…
Employee.log=log Employee e1 = new Employee() log.info e1.add(1,2,3,4) // optional parameters in groovy log.info e1.add(2,3) log.info e1.add(2,3,10) class Employee { def static log public def add(a,b,c=3,d=10){ return a+b+c+d } } Run result: Tue Oct…
Various databases which are supported Drivers for database connection groovy.sql.Sql package SoapUI怎样支持对数据库的操作 Various databases which are supported Groovy可以支持各种不同的数据库:MySQL, SQLServer, Oracle Drivers for database connection 不同的数据库需要下载不同的JAR包来支持,下载后将…
def x = new String[3] x[0] = "A" x[1] = "B" x[2] = "C" log.info"XXXXXX 1" try{ x[3] = "D" // def z=9/0 }catch(Exception e){ log.info "Some error "+e.getMessage() // Use e.getMessage() to print ex…
Reading Properties file : Properties prop = new Properties() def path = "D:\\SoapUIStudy\\application.properties" FileInputStream fs = new FileInputStream(path) prop.load(fs) log.info prop.getProperty("name") Result : Tue Jun 16 15:12:…
Hashset: HashSet set = new HashSet() set.add("India") set.add("USA") set.add("China") log.info "Set size is : " + set.size() set.add("China") log.info "Set size is : " + set.size() Iterator iter…
Array: def x = new String[5] x[0] = "India" x[1] = "USA" x[2] = "Korea" x[3] = "Japan" x[4] = "China" log.info "Size of list is " + x.size() log.info "The first item in list is : "+x[0]…