Tag: soapui

在尝试添加xpath断言时在groovy脚本中出错

我正在尝试执行下面的代码时遇到下面的exception: 缺less属性exception groovy脚本中的代码将xpath断言添加到testing用例中。 有没有可能的解决scheme来解决这个错误? 它的testing套件名称为“ManagePostpayInsurance_1_0”,testing步骤名称为“getInsuranceDetails_1_FTC_005”。 log.info("Testing Start") TSName = "ManagePostpayInsurance_1_0" StepName = "getInsuranceDetails_1_FTC_005" project.getTestSuiteList().each { if(it.name == TSName) { TS = it.name it.getTestCaseList().each { TC =it.name def asserting = project.getTestSuiteByName(TS).getTestCaseByName(TC).getTestStepByName(StepName).getAssertionByName("XPath Match") if (asserting instanceof com.eviware.soapui.impl.wsdl.teststeps.assertions.basic.XPathContainsAssertion) { project.getTestSuiteByName(TS).getTestCaseByName(TC)getTestStepByName(StepName).removeAssertion(asserting) } def assertion = project.getTestSuiteByName(TS).getTestCaseByName(TC)getTestStepByName(StepName).addAssertion("XPath Match") assertion.path = "declare namespace cor='http://soa.o2.co.uk/coredata_1';\ndeclare namespace man='http://soa.o2.co.uk/managepostpayinsurancedata_1';\ndeclare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';\n" assertion.expectedContent = "200" […]

SOAPUI:无法parsing类XSSFWorkBook错误

在SoapUI中使用Apache POI时出现以下错误。 无法解决类XSSFWorkBook错误 我在SOAPUI中导入POI,并将poi jar文件放在/ bin / ext中。 我试着版本3.14以及3.15testing版。 (我附上了错误)。 我在这里错过了什么? 任何帮助将不胜感激。 这里是代码: import org.apache.poi.xssf.usermodel.* import org.apache.poi.xssf.usermodel.XSSFWorkbook; def fs = new FileInputStream ("C:\\Users\\JDoe\\Desktop\\SOAP_Learn\\SOAP_Test_Data.xlsx") def wb = new XSSFWorkBook (fs) //–>> gives error in this line def ws = wb.getSheet("Sheet1") def r = ws.getPhysicalNumberOfRows() enter code here << Stack Trace >> org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: Script5.groovy: 14: […]

java.lang.NoClassDefFoundError:org / openxmlformats / schemas / spreadsheetml / x2006 / main / ctextensionlist in groovy

我试图访问现有的Excel工作表,并试图创build一个新的工作表和更新工作表的一些值,在执行我得到下面的错误行“rowHeader.createCell((short)count).setCellValue(”test1“ );” Java.lang.NoClassDefFoundError:org / openxmlformats / schemas / spreadsheetml / x2006 / main / ctextensionlist执行下面的代码时出错 Foll是我使用的jar子的列表 公地编解码器1.9 共享logging-1.1.3 公网-3.3-FTP 基于JUnit 4.12, JXL-2.6.6来源, JXL-2.6, log4j的-1.2.17, MasterExcelReport, ojdbc6, POI-3.13-20150929, POI-3.15-β1, POI-例子-3.13-20150929, POI-例子-3.15-β1, POI-excelant-3.13-20150929, POI-excelant-3.15-β1, POI-OOXML-3.5 beta5的, POI-OOXML-3.13-20150929, POI-OOXML-3.15-β1, POI-OOXML-架构 – 3.13-20150929, POI-OOXML-模式-3.15-β1, POI暂存器,3.13-20150929, POI暂存器-3.15-β1, PostgreSQL相关9.3-1102.jdbc41, sqljdbc42,xmlbeans-2.6.0 import java.io.*; import java.util.*; import java.util.List; import javax.xml.parsers.*; import javax.xml.xpath.*; import […]

使用POI将数据写入xlsx文件时遇到麻烦Apache – Excel之后会损坏

我已经删除了很多代码,主要是试图捕获块,并粘贴在这里,我相信这很容易让你看,并build议我解决我所面临的问题。 我在SoapUI工具的Groovy Script步骤中运行下面的脚本。 大部分variables数据types遵循Groovy语言语法。 当我运行这个代码时,会创build一个带有destPathvariables中提到的文件名的xlsx文件,但其大小为0 KB。 当我试图打开文件时,由于文件格式或文件扩展名无效,我看到“Excel无法打开文件的文件名”消息,请确认文件没有被破坏,文件的扩展名与文件。” 我看不出我在哪里犯错。 def srcPath = "C:\\Test Data\\Test Data2.xlsx" def destPath = "C:\\Test Data\\Results\\destSheet.xlsx" def setData = new SetData(log,srcPath,destPath) log.info setData.setCellData("Result",0,"Testing123") class SetData{ def log; //log variable to print values on the console String srcPath; String destPath; XSSFWorkbook workbook; OPCPackage pkg; SetData(log,srcPath,destPath){ this.log = log; this.srcPath =srcPath; this.destPath = destPath} […]

只有第一个响应正在写在saopui的excel文件中

我是saopUI和groovy的新手。我想从excel文件中读取数据并运行请求并将数据写回excel文件。 我的阅读和执行部分工作正常。 但是当我写回应excel只有第一个响应正在写入。 但是,当我看到日志所有三个请求都成功运行。 请帮我解决这个问题。 这是我的groovy脚本: import jxl.* import jxl.write.* def dataFileLocation="D:/SOAP/input.xls" //Datasheet read start def workbook = Workbook.getWorkbook(new File(dataFileLocation)) def sheet = workbook.getSheet(0) int count=workbook.getNumberOfSheets() def rowCount = sheet.getRows() def colCount = sheet.getColumns() def myTestCase = context.testCase propTestStep = myTestCase.getTestStepByName("Properties"); def arr=[] //Datasheet read end //Content Write start WritableWorkbook workbook1 = Workbook.createWorkbook(new File("D:/SOAP/output1.xls")) WritableSheet […]

VBSCRIPT上的multidimensional array。 插入到excel

所以我必须从SOAPUI插入数据到Excel,但我有一个问题,直到数据到达买方价格,在这里的图片。 如何插入数据以excel后买方价格? 我需要multidimensional array或不? in_result = 1 'arrResult(iResult) = header data = 0 kolom = 1 Dim kolom For iResult = 1 To total_arrResult-1 Step 1 Hasil = Replace(Replace(Replace(Replace(Replace(arrResult(iResult + 1), """", ""), chr(10), ""), "}", ""), "]", ""), " ", "") wait(0.2) arrHasil = Split(Hasil, ",") wait(0.2) ' =================== get "countryCode", "alpha3Code", "numericCode", "shortName" […]