Home > Java, SOA Suite > Unit testing file transfers

Unit testing file transfers

I recently wrote an application for managed file transfers with FTP, FTPS and SFTP. Naturally I wanted good unit tests and I found an excellent solution that made it possible to run real transfers in a controlled way: MockFtpServer and Apache SSHD. This way I could fire up an FTP server and an SSH server from jUnit, run a test and be in full control over both the client (my application) and the servers.

The same approach can be used to test file-based integrations in general driven from jUnit, possibly with a continuous integration engine such as Jenkins running the tests.

To use the libraries with Maven, include:



You may need additional dependencies as well, for example SLF4J and BouncyCastle.

Categories: Java, SOA Suite

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Get every new post delivered to your Inbox.

%d bloggers like this: