Forum Discussion

ebudihar's avatar
Occasional Contributor
7 years ago (No such file or directory)


I have a SOAP request test case like this


import org.apache.poi.hssf.usermodel.*
import org.apache.poi.xssf.usermodel.*

//myTestCase contains the test case
def myTestCase = context.testCase   

//open an excel file
def fs = new FileInputStream ("/Users/eko/Documents/soapUIworkspace/sky/logindata-2016.xslx")  
//def fs = new FileInputStream()

//def a workbook
Workbook wb = WorkbookFactory.create(fs)  

//def the worksheet location in the excel file
def ws = wb.getSheet("Sheet1")  

//count the rows
///def r = ws.getPhysicalNumberOfRows()  

// get the Property TestStep object
propTestStep = myTestCase.getTestStepByName("Properties - ichain-account-contact")   
project = testRunner.getTestCase().getTestSuite().getProject().getWorkspace().getProjectByName("SkyService")
testSuite = project.getTestSuiteByName("testSuite");
testCase = testSuite.getTestCaseByName("TestCase");   




when I ran this test, I got an error message, " (No such file or directory)". I checked many times the file and the directory is exist. But when ran another file, logindata.xlsx, it works, only this file works and no error. Other files give the same error, " (No such file or directory)". It is very strange. Please help.


No RepliesBe the first to reply