Author: krosenvold
Date: Tue Apr 13 09:42:11 2010
New Revision: 933532

URL: http://svn.apache.org/viewvc?rev=933532&view=rev
Log:
o Added documentation section on the junit providers, including info on 
concurrent junit

Added:
    
maven/surefire/trunk/maven-surefire-plugin/src/site/apt/examples/junit.apt.vm   
(with props)
Modified:
    maven/surefire/trunk/maven-surefire-plugin/src/site/apt/index.apt
    maven/surefire/trunk/maven-surefire-plugin/src/site/site.xml

Added: 
maven/surefire/trunk/maven-surefire-plugin/src/site/apt/examples/junit.apt.vm
URL: 
http://svn.apache.org/viewvc/maven/surefire/trunk/maven-surefire-plugin/src/site/apt/examples/junit.apt.vm?rev=933532&view=auto
==============================================================================
--- 
maven/surefire/trunk/maven-surefire-plugin/src/site/apt/examples/junit.apt.vm 
(added)
+++ 
maven/surefire/trunk/maven-surefire-plugin/src/site/apt/examples/junit.apt.vm 
Tue Apr 13 09:42:11 2010
@@ -0,0 +1,70 @@
+ ------
+ Using Junit
+ ------
+ Kristian Rosenvold <krosenv...@apache.org>
+ ------
+ 2010-04-12
+ ------
+
+Using Junit
+
+* Configuring Junit
+
+  To get started with junit, you need to add the required version of junit to 
your project:
+
++---+
+  [...]
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>4.8.1</version>
+      <scope>test</scope>
+    </dependency>
+  [...]
++---+
+
+
+  This is the only step that is required to get started - you can now create 
tests in your test source directory
+  (eg, <<<src/test/java>>>.
+
+* Generations of junit support
+
+  Surefire supports three different generations of junit: Junit3.8.x, Junit 
4.x (serial provider) and Junit 4.7 (junitcore provider
+   with parallel support). The provider is selected based on the junit version 
in your project and the configuration parameters (for parallel).
+
+* Running tests in parallel
+
+  From junit 4.7 and onwards you can run your tests in parallel. To do this, 
you must set the
+  <<<parallel>>> parameter, and may change the <<<threadCount>>> or 
<<<useUnlimitedThreads>>> attribute.
+  For example:
+
++---+
+    [...]
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <version>${project.version}</version>
+        <configuration>
+          <parallel>methods</parallel>
+          <threadCount>10</threadCount>
+        </configuration>
+      </plugin>
+    [...]
++---+
+
+* Using Junit core provider
+
+  If your tests specify any value for the "parallel" attribute and your 
project uses junit4.7+, your request will be routed to
+  the concurrent junit provider, which uses the JUnit JUnitCore testrunner.
+
+  This is particularly useful for slow tests that can have high concurrency, 
or to quickly and roughly assess the independance
+  and thread safety of your tests and code.
+
+  The JUnitCore test-runner has stricter test-compliance checking than earlier 
versions of junit; with this provider
+  your test must be legitimate junit tests to be run, whereas the old 4.x 
provider would also run tests that were not according to
+  junit spec.
+
+
+
+
+  For more information on JUnit, see the {{{http://www.junit.org}Junit web 
site}}.

Propchange: 
maven/surefire/trunk/maven-surefire-plugin/src/site/apt/examples/junit.apt.vm
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: maven/surefire/trunk/maven-surefire-plugin/src/site/apt/index.apt
URL: 
http://svn.apache.org/viewvc/maven/surefire/trunk/maven-surefire-plugin/src/site/apt/index.apt?rev=933532&r1=933531&r2=933532&view=diff
==============================================================================
--- maven/surefire/trunk/maven-surefire-plugin/src/site/apt/index.apt (original)
+++ maven/surefire/trunk/maven-surefire-plugin/src/site/apt/index.apt Tue Apr 
13 09:42:11 2010
@@ -77,6 +77,8 @@ Maven Surefire Plugin
 
   * {{{./examples/testng.html}Using TestNG}}
 
+  * {{{./examples/junit.html}Using JUnit}}
+
   * {{{./examples/skipping-test.html}Skipping Tests}}
 
   * {{{./examples/inclusion-exclusion.html}Inclusions and Exclusions of Tests}}

Modified: maven/surefire/trunk/maven-surefire-plugin/src/site/site.xml
URL: 
http://svn.apache.org/viewvc/maven/surefire/trunk/maven-surefire-plugin/src/site/site.xml?rev=933532&r1=933531&r2=933532&view=diff
==============================================================================
--- maven/surefire/trunk/maven-surefire-plugin/src/site/site.xml (original)
+++ maven/surefire/trunk/maven-surefire-plugin/src/site/site.xml Tue Apr 13 
09:42:11 2010
@@ -31,6 +31,7 @@
     </menu>
     <menu name="Examples">
       <item name="Using TestNG" href="examples/testng.html"/>
+      <item name="Using JUnit" href="examples/junit.html"/>
       <item name="Skipping Tests" href="examples/skipping-test.html"/>
       <item name="Inclusions and Exclusions of Tests" 
href="examples/inclusion-exclusion.html"/>
       <item name="Running a Single Test" href="examples/single-test.html"/>


Reply via email to