Skip to content
Browse files

Complete doc

  • Loading branch information...
1 parent 14e6441 commit 659ec22e2e63213cdde9a9c8645fcb344579c49b @nicoulaj committed May 24, 2011
View
37 pom.xml
@@ -26,11 +26,11 @@
<groupId>net.ju-n.benchmark</groupId>
<artifactId>mock-webapp</artifactId>
- <version>1.0.0-SNAPSHOT</version>
+ <version>1.0.0-alpha-1-SNAPSHOT</version>
<packaging>war</packaging>
<name>mock-webapp</name>
- <description>Mock web application for performance or integration testing</description>
+ <description>Mock web application for performance or integration testing.</description>
<url>http://nicoulaj.github.com/mock-webapp</url>
<inceptionYear>2011</inceptionYear>
@@ -59,31 +59,35 @@
</site>
</distributionManagement>
+ <properties>
+ <java.version>1.5</java.version>
+ <servlet-api.version>2.5</servlet-api.version>
+ <jaxb.version>2.2.2</jaxb.version>
+ <commons-vfs.version>1.0</commons-vfs.version>
+ <httpunit.version>1.7</httpunit.version>
+ <doxia-module-markdown.version>1.0.0</doxia-module-markdown.version>
+ </properties>
+
<dependencies>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
- <version>2.5</version>
+ <version>${servlet-api.version}</version>
</dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
- <version>2.2.2</version>
+ <version>${jaxb.version}</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
- <version>2.2.2</version>
+ <version>${jaxb.version}</version>
</dependency>
<dependency>
<groupId>commons-vfs</groupId>
<artifactId>commons-vfs</artifactId>
- <version>1.0</version>
- </dependency>
- <dependency>
- <groupId>de.sven-jacobs</groupId>
- <artifactId>loremipsum</artifactId>
- <version>1.0</version>
+ <version>${commons-vfs.version}</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
@@ -93,7 +97,7 @@
<dependency>
<groupId>httpunit</groupId>
<artifactId>httpunit</artifactId>
- <version>1.7</version>
+ <version>${httpunit.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
@@ -110,8 +114,8 @@
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
- <source>1.5</source>
- <target>1.5</target>
+ <source>${java.version}</source>
+ <target>${java.version}</target>
<optimize>true</optimize>
<showWarnings>true</showWarnings>
<showDeprecation>true</showDeprecation>
@@ -127,7 +131,6 @@
<plugin>
<groupId>com.sun.tools.jxc.maven2</groupId>
<artifactId>maven-jaxb-schemagen-plugin</artifactId>
- <version>1.2</version>
<executions>
<execution>
<id>generate-xsd-schema</id>
@@ -177,7 +180,7 @@
<dependency>
<groupId>net.ju-n.maven.doxia</groupId>
<artifactId>doxia-module-markdown</artifactId>
- <version>1.0.0</version>
+ <version>${doxia-module-markdown.version}</version>
</dependency>
</dependencies>
</plugin>
@@ -240,7 +243,7 @@
<artifactId>maven-pmd-plugin</artifactId>
<version>${maven-pmd-plugin.version}</version>
<configuration>
- <targetJdk>1.5</targetJdk>
+ <targetJdk>${java.version}</targetJdk>
</configuration>
</plugin>
<plugin>
View
12 src/main/java/net/nicoulaj/benchmark/mockwebapp/config/then/package-info.java
@@ -17,6 +17,18 @@
/**
* The treatments that can be applied to requests responses.
*
+ * TODO: Implement following {@link ThenStatement}s:
+ * * Response content (random content, lorem ipsum, content from file)
+ * * Response MIME type
+ * * Response header
+ * * Response cookie
+ * * Response encoding
+ * * Redirection
+ * * Gaussian delay
+ * * Other delay types implementations (user provided, Groovy ?)
+ * * Memory leak
+ * * JVM crash
+ *
* @author Julien Nicoulaud <julien.nicoulaud@gmail.com>
* @since 1.0.0
*/
View
8 src/main/java/net/nicoulaj/benchmark/mockwebapp/config/when/package-info.java
@@ -17,6 +17,14 @@
/**
* The conditions that can be used to match requests.
*
+ * TODO: Implement following {@link WhenStatement}s:
+ * * Authentication or not
+ * * Authentication type
+ * * Protocol
+ * * Port
+ * * Request has content
+ * * Request content matching
+ *
* @author Julien Nicoulaud <julien.nicoulaud@gmail.com>
* @since 1.0.0
*/
View
10 src/site/markdown/index.md → src/site/markdown/index.md.vm
@@ -1,4 +1,4 @@
-**mock web application for performance or integration testing.**
+**${project.description}**
Sometimes you need to test how the architecture around your application (frontal server, SSO system, etc)
behaves in particular situations, that can be hard to reproduce.
@@ -29,11 +29,3 @@ This mock web application can easily be setup to behave as you need, through a s
</mapping>
</mock-web-app>
-
-
-How to use ?
-------------
-
-1. [Download it](usage/1-download.html)
-2. [Configure it](usage/2-configure.html)
-3. [Deploy it](usage/3-deploy.html)
View
3 src/site/markdown/usage/1-download.md
@@ -1,3 +0,0 @@
-TODO
-====
-
View
4 src/site/markdown/usage/1-download.md.vm
@@ -0,0 +1,4 @@
+Download ${project.name}
+------------------------
+
+Grab the ${project.version} release ${project.packaging} of ${project.name} at [Maven Central repository](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22${project.groupId}%22%20AND%20a%3A%22${project.artifactId}%22).
View
3 src/site/markdown/usage/2-configure.md
@@ -1,3 +0,0 @@
-TODO
-====
-
View
23 src/site/markdown/usage/2-configure.md.vm
@@ -0,0 +1,23 @@
+Configure ${project.name}
+-------------------------
+
+ * Grab the XSD schema at [Maven central repository](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22${project.groupId}%22%20AND%20a%3A%22${project.artifactId}%22).
+ * Start writing your configuration file:
+
+ <?xml version="1.0" encoding="UTF-8"?>
+ <mock-web-app xmlns="net.nicoulaj.benchmark.mockwebapp:mock-web-app"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="net.nicoulaj.benchmark.mockwebapp:mock-web-app mock-web-app.xsd">
+
+ <mapping>
+ <when>
+ <!-- insert conditions here -->
+ </when>
+ <then>
+ <!-- insert actions here -->
+ </then>
+ </mapping>
+
+ </mock-web-app>
+
+ * You can also find some examples [here](${project.scm.url}/tree/master/src/test/resources/net/nicoulaj/benchmark/mockwebapp/test/configs/valid).
View
3 src/site/markdown/usage/3-deploy.md
@@ -1,3 +0,0 @@
-TODO
-====
-
View
7 src/site/markdown/usage/3-deploy.md.vm
@@ -0,0 +1,7 @@
+Deploy ${project.name}
+----------------------
+
+ * Deploy the ${project.artifactId}-${project.version}.${project.packaging} to your favorite servlet container (such as [Tomcat](http://tomcat.apache.org) or [Jetty](http://jetty.codehaus.org)).
+ * Start the server with the pah to the configuration file as Java option:
+
+ <start command> -Dmock-web-app-conf=file:path/to/conf/file.xml
View
24 src/site/site.xml
@@ -18,8 +18,32 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/DECORATION/1.0.0 http://maven.apache.org/xsd/decoration-1.0.0.xsd">
+ <skin>
+ <groupId>net.ju-n.maven.skins</groupId>
+ <artifactId>maven-default-code-highlighting-skin</artifactId>
+ <version>1.0.0</version>
+ </skin>
+
<body>
+ <head>
+ <script type="text/javascript">
+ var _gaq = _gaq || [];
+ _gaq.push(['_setAccount', 'UA-2189278-12']);
+ _gaq.push(['_trackPageview']);
+ (function()
+ {
+ var ga = document.createElement('script');
+ ga.type = 'text/javascript';
+ ga.async = true;
+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') +
+ '.google-analytics.com/ga.js';
+ var s = document.getElementsByTagName('script')[0];
+ s.parentNode.insertBefore(ga, s);
+ })();
+ </script>
+ </head>
+
<menu name="Usage">
<item name="1. Download" href="/usage/1-download.html"/>
<item name="2. Configure" href="/usage/2-configure.html"/>

0 comments on commit 659ec22

Please sign in to comment.
Something went wrong with that request. Please try again.