index.apt revision e8655f05c96a2674c86c187e9f0a34e2a56e8093
1		--------------------------------------------------
2								Home
3		--------------------------------------------------
4
5MockFtpServer
6~~~~~~~~~~~~~
7
8  The <<MockFtpServer>> project provides a mock/dummy FTP server implementations that can be very 
9  useful for testing of FTP client code. Two FTP Server implementations are provided, each at a different
10  level of abstraction.
11
12  <<FakeFtpServer>> provides a higher-level abstraction for an FTP server and is suitable for most testing
13  and simulation scenarios. You define a filesystem (virtual, in-memory) containing an arbitrary set of
14  files and directories. These files and directories can (optionally) have associated access permissions.
15  You also configure a set of one or more user accounts that control which users can login to the FTP server,
16  and their home (default) directories. The user account is also used when assigning file and directory
17  ownership for new files. See {{{fakeftpserver-features.html}FakeFtpServer Features and Limitations}}.
18
19  <<StubFtpServer>> is a "stub" implementation of an FTP server. It supports the main FTP commands by
20  implementing command handlers for each of the corresponding low-level FTP server commands (e.g. RETR,
21  DELE, LIST). These <CommandHandler>s can be individually configured to return custom data or reply codes,
22  allowing simulation of a complete range of both success and failure scenarios. The <CommandHandler>s can
23  also be interrogated to verify command invocation data such as command parameters and timestamps.
24  See {{{stubftpserver-features.html}StubFtpServer Features and Limitations}}.
25
26  See the {{{fakeftpserver-versus-stubftpserver.html}FakeFtpServer or StubFtpServer?}} page for more
27  information on deciding whether to use <<FakeFtpServer>> or <<StubFtpServer>>.
28
29  The <<MockFtpServer>> project is written in Java, and is ideally suited to testing Java code. But because
30  communication with the FTP server is across the network using sockets, it can be used to test FTP client 
31  code written in any language.
32
33
34* Requirements
35~~~~~~~~~~~~~~
36
37  The <<MockFtpServer>> project requires:
38
39  *  Java (JDK) version 1.4 or later
40
41  * The {{{http://logging.apache.org/log4j/index.html}Log4J}} jar, version 1.2.13 or later, accessible on the CLASSPATH.
42
43
44* Maven Support
45~~~~~~~~~~~~~~~
46
47  For projects built using {{{http://maven.apache.org/}Maven}}, <<MockFtpServer>> is now available
48  from the <<Maven Central Repository>>. Add a dependency to your POM like this:
49
50--------------------
51  <dependency>
52    <groupId>org.mockftpserver</groupId>
53    <artifactId>MockFtpServer</artifactId>
54    <version>2.2</version>
55    <scope>test</scope>
56  </dependency>
57--------------------