ContributionsMost RecentMost LikesSolutionsRe: [Resolved] How to verify date format using groovy scripting?you don't need to use the Joda time library as the standard java one can be used it is an option though using the same general structure as above, define your date format then try to parse the value into that format, if the data doesn't adhere to the format the exception is thrown import com.eviware.soapui.support.XmlHolder import java.util.Date; import java.text.DateFormat; import java.text.SimpleDateFormat; def dateFieldValue = context.expand( 'INSERT RESPONSE ELEMENT HERE' ) assert dateFieldValue != null log.info dateFieldValue try {date = new Date().parse('dd/MM/yyyy', dateFieldValue) } catch (Exception e) { assert false } log.info "Expected date format = 'dd/MM/yyyy', value found = '"+dateFieldValue+"'" assert true Re: [Resolved] Failed to update interfaceOK sorted this now after lots of dead ends in searching for something related found this thread and the post from nov last year http://forum.soapui.org/viewtopic.php?f=4&t=22762#p52069 has the this in it 1) Open with a text editor the "soapUI-Pro-4.6.4.vmoptions" file located in the "bin" directory of the SoapUI Pro application 2) Add this line at the end of the file: -Dfile.encoding=UTF8 3) Save the file and restart SoapUI Pro Try again to load the WSDL in SoapUI Pro 4.6.4. the thread talks about default encoding used within SoapUI, checked on the guys box with the non pro version and he doesn't have that setting so I'm guessing that there's a difference between the two versions that unfortunately is an issue for pro users that isn't for non pro users[Resolved] Failed to update interfaceHi I'm trying to update a wsdl def and keep getting the error message 'Failed to update interface:[com.eviware.soapui.impl.support.definition.support.InvalidDefinitionException]' error log has this in com.eviware.soapui.impl.support.definition.support.InvalidDefinitionException at com.eviware.soapui.impl.wsdl.support.wsdl.WsdlLoader.makeInvalidDefinitionException(WsdlLoader.java:140) at com.eviware.soapui.impl.wsdl.support.wsdl.WsdlLoader.loadXmlObject(WsdlLoader.java:127) at com.eviware.soapui.impl.wsdl.support.xsd.SchemaUtils.getDefinitionParts(SchemaUtils.java:535) at com.eviware.soapui.impl.wsdl.support.xsd.SchemaUtils.selectDefinitionParts(SchemaUtils.java:565) at com.eviware.soapui.impl.wsdl.support.xsd.SchemaUtils.getDefinitionParts(SchemaUtils.java:545) at com.eviware.soapui.impl.wsdl.support.xsd.SchemaUtils.selectDefinitionParts(SchemaUtils.java:565) at com.eviware.soapui.impl.wsdl.support.xsd.SchemaUtils.getDefinitionParts(SchemaUtils.java:545) at com.eviware.soapui.impl.wsdl.support.xsd.SchemaUtils.getDefinitionParts(SchemaUtils.java:524) at com.eviware.soapui.impl.support.definition.support.AbstractDefinitionCache.update(AbstractDefinitionCache.java:97) at com.eviware.soapui.impl.support.definition.support.AbstractDefinitionContext$Loader.construct(AbstractDefinitionContext.java:236) at com.eviware.soapui.support.swing.SwingWorkerDelegator.construct(SwingWorkerDelegator.java:46) at com.eviware.soapui.support.swing.SwingWorker$2.run(SwingWorker.java:149) at java.lang.Thread.run(Unknown Source) Within the SoapUI log Tue Jun 17 11:15:49 BST 2014:ERROR:Failed to load url [XXXXXXXXXXXXXXXXXXXXX] Tue Jun 17 11:15:49 BST 2014:ERROR:An error occurred [com.eviware.soapui.impl.support.definition.support.InvalidDefinitionException], see error log for details Tue Jun 17 11:15:50 BST 2014:ERROR:An error occurred [com.eviware.soapui.impl.support.definition.support.InvalidDefinitionException], see error log for details I can take the url specified paste it into a browser and can see the xsd aok (note the xsd is a common one shared by other services that load aok into SoapUI, is there a limit on the path length??) currently running soapui pro 4.6.4 on windows 8.1 the work around for me which is arduous is I take my current project xml file and send that onto somebody else who is running the non pro version 4.6.4 on win7 he imports the project updates the def saves and then sends back to me I've tried disabling the proxy but it has no effect please helpRe: Unable to remove fileHiya thanks I'll give that a try I was using the ds loop to move onto the next row of data, I explicitly put in the test step execution because it wasn't actually being run on the ds loop invocation regards MikeRe: Unable to remove fileHiya files are created by SoapUI only, and not in use by anything else for ref due to the way the service response is returned to control the flow and ensure that all test data is returned as expected I'm iterating across the datasource using groovy as per below, the assertion test step ('Verify Data in DS') compares the response from the service request response elements to the content of the datasource the datasource uses a csv file that is created from a separate test suite that interrogates the back end db def CurrentRow def DSRowCount = testRunner.testCase.testSteps['DatasourceToUse'].rowCount log.info '## DatasourceToUse rowcount = '+ DSRowCount for (i = 1; i<=DSRowCount; i++) { CurrentRow = testRunner.testCase.testSteps['DatasourceToUse'].currentRow CurrentRow = CurrentRow.toString() log.info 'DatasourceToUse Row No = ' + CurrentRow result = testRunner.runTestStepByName("Verify Data in DS"); log.info "@@ Verify Data in DS = "+result.getStatus() result = testRunner.runTestStepByName("DataSource Loop"); log.info "@@ DataSource Loop = "+result.getStatus() } Re: Unable to remove fileHi the files are created by SoapUI, the files should only be in use during an iteration across a data row, I think what is happening is that a datasource accesses the file but does not exhaust it, the test run ends then on subsequent iteration the file cannot be deleted because the ds still has it locked at the end of an iteration (i.e. last ds loop or test run completion with either fail or success) files should be released, SoapUI appears to be doing nothing with no tests running but you cant even remove the files manually until SoapUI is closed thanks for the pointer to the method regards MikeRe: Unable to remove fileHi I'd already tried that I've got a work around whereby I create a new folder for each iteration through, its clunky but it works, preference would still be to just be able to clear existing files in a consistent fashion on each iteration through, is there no means to actually force a close of a file??Re: Unable to remove fileHiya the actual file delete isn't necessarily the problem as the script will delete the files (under the correct conditions) the issue I'm having is that during a test execution as the main test suite iterates through the rows of data sometimes the test suite that is invoked which tries to delete the files before recreating them cant delete them because they're still in use for some reason, the file locking isn't predictable and doesn't occur at the same time each pass through, if I run the tests through row by row all is fine (unless a validation fails which seems to see the files locked on the next pass) but when running through on a range of rows of data (even with validations being aok) at some point I end up with a file that hasn't been deleted and the file that is then referenced is an amalgam of data which will then fail the validation that references that file as the data comparison is failsRe: Unable to remove fileHiya already tried that but I get the following groovy.lang.MissingMethodException: No signature of method: java.io.File.close() is applicable for argument types: () values: [] Possible solutions: list(), list(java.io.FilenameFilter), use([Ljava.lang.Object;), use(java.lang.Class, groovy.lang.Closure), use(java.util.List, groovy.lang.Closure), collect() error at line: 40Re: Unable to remove filethe script will run through and remove any of the files as expected as long as they're not locked but when created as part of a 'test run' when it tries to remove the files they get locked and it cant remove them cant remove them manually either when that happens, have to close SoapUI then they can be deleted hence the query about forcing them to close or be released so that they can be deleted regardless thanks Mike