Forum Discussion

pb1's avatar
pb1
Contributor
5 years ago

Controlling FTPTestStep from groovy

Hello there   I am currently stuck trying to transfer files with the FTP-Step provided in SoapUI Pro. The files are generated before sending, and there may be a large amount of files to send.   T...
  • pb1's avatar
    pb1
    5 years ago

    Thanks to the support for solving the problem:

     

    The ftpStep requires two additional method calls to properly transmit files, using the provided example in the OP the correct way to use the run method would be as follows:

     

    new File(path).listFiles().each{
      ftpStep.setLocalPath(it.getPath())
      ftpStep.setFileName(it.getName())
      ftpStep.prepare(testRunner, context)
      ftpStep.run(testRunner, context)
      ftpStep.finish(testRunner, context)
    }