木吟

导航

2016年5月23日 #

Read excel and put cell data into HashMap

摘要: //Read excel row by row, put cell name and cell value to a map for each row. HashMap getExpectedResult(int rowNum, String filePath, String sheetName){ HashMap map = new HashMap(); ... 阅读全文

posted @ 2016-05-23 17:26 木吟 阅读(337) 评论(0) 推荐(0) 编辑

2016年3月4日 #

使用WebDriverWait类处理等待(sleep)的问题

摘要: 用selenium进行web UI的自动化开发时,经常遇到loading需要等待的时候,或者需要验证一个action之后某个dialog是否呈现或者消失。对于这类情况是不建议用sleep(xx)来死等,因为你无法准确判断要等多久,少了就会报error,多了就会浪费整个脚本跑的时间。聪明的做法就是灵活 阅读全文

posted @ 2016-03-04 16:52 木吟 阅读(3177) 评论(0) 推荐(0) 编辑

2016年1月13日 #

常用的CSS定位,XPath定位和JPath定位

摘要: CSS定位 XPath定位 JPath定位 阅读全文

posted @ 2016-01-13 11:24 木吟 阅读(2611) 评论(0) 推荐(0) 编辑

2015年12月3日 #

移除project,testsuite,testcase级别所有的custom properties

摘要: // Remove all custom properties on Project level. If removed, custom properties cannnot be injected to Project in new environment except default env def removeProjectProperties(){ def propertyNam... 阅读全文

posted @ 2015-12-03 17:04 木吟 阅读(478) 评论(0) 推荐(0) 编辑

Groovy解析xml并且注入Project,TestSuite,TestCase级别的custom properties

摘要: import com.eviware.soapui.support.GroovyUtils import groovy.util.XmlParser def groovyUtils = new GroovyUtils( context ) def xmlFilePath = groovyUtils.getProjectPath()+"\\Properties.xml" def testA... 阅读全文

posted @ 2015-12-03 16:46 木吟 阅读(844) 评论(0) 推荐(0) 编辑

SoapUI中如何获取当前active环境

摘要: // Get the current selected Environment def activeEnv = testRunner.testCase.testSuite.project.getActiveEnvironment().getName() 阅读全文

posted @ 2015-12-03 16:09 木吟 阅读(309) 评论(0) 推荐(0) 编辑

2015年11月13日 #

SoapUI API + Groovy API + Difference with Java

摘要: 用soapUI进行webservice测试过程中,必不可少的要用到soapUI封装的代码。我们一起学习吧:) SoapUI 5.1.2 API:http://www.soapui.org/apidocs/index.html SoapUI中我们经常会用到Groovy script,想不起来groov 阅读全文

posted @ 2015-11-13 14:10 木吟 阅读(604) 评论(0) 推荐(0) 编辑

2015年10月27日 #

SoapUI中如何传递cookie

摘要: import com.eviware.soapui.support.types.StringToStringMap //Get all the cookies in the response def cookiesList = testRunner.testCase.getTestStepByName("Login").testRequest.response.responseHeader... 阅读全文

posted @ 2015-10-27 11:44 木吟 阅读(3697) 评论(0) 推荐(0) 编辑

获取本地soapUI项目路径

摘要: def projectDir = ${projectDir} 阅读全文

posted @ 2015-10-27 11:21 木吟 阅读(865) 评论(0) 推荐(0) 编辑