Contributions
Run a batch file from Groovy Script
I have a batch file that sorts a pipe delimited file. I put the batch file at the project level directory. I then put the following in a Groovy Script: Runtime.runtime.exec("test1.bat") I receive the following error:java.io.IOException: Cannot run program "test1.bat": CreateProcess error=2, The system cannot find the file specified error at line: 1 Something else I need to do to get it to find the file that is ACTUALLY there?9 years agoPlace ReadyAPI QuestionsReadyAPI Questions7.8KViews0likes5CommentsRe: Script Assertion checking dateTime
nevermind. Figured it out... import groovy.time.TimeCategory ---- ----- ------ def now = new Date() use(TimeCategory){ adjDate = now + 4.days } def dateFormat = adjDate.format("YYYY-MM-dd HH:mm:ss") log.info dateFormat9 years agoPlace ReadyAPI QuestionsReadyAPI Questions2.5KViews0likes0CommentsScript Assertion checking dateTime
I am new to SoapUI, and have a question about a script assertion I need to put together. I have a DB DateTime in UTC value that I need to check against. So basically I have def SQL_Departure = context.expand( ' ${yada_yada.Segment#ResponseAsXml#//Results[1]//resultSet[1]/row[1]//Departure[1]}; ).replace(".000000 ", "") With the assert, I need to ensure that the table is not getting populated with records with a departure datetime less than 96 hours, so somewhat like: assert SQL_Departure >= getUTCDate() + 4 //or 96 for hours instead of 4 for days. Would anyone know the best way of going about this? Thanks, SteveSolved9 years agoPlace ReadyAPI QuestionsReadyAPI Questions2.5KViews0likes1Comment