首页 > 技术文章 > [Training Video - 2] [Groovy Introduction]

MasterMonkInTemple 2015-10-08 12:32 原文

  • 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 "Some error"
log.info "help"

 Result:

  • Auto-saving project-Very Imp

 File-->Preference

  • Variable , if statements, loops in Groovy
// variables
// if statements
// loops

def x = 200   // integer
int a = 200
def y = "hello world"  // string
String b = "temp"
def z = "290.378"

if(x == 100){
	log.info "Value of x is "+x
}else{
	log.info "value of x is not 100 but it is "+x
}
for(def i=0;i<100;i++){
	log.info i
}

 

推荐阅读