lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Lucene-java Wiki] Update of "RunningTests" by SteveRowe
Date Mon, 16 Apr 2012 20:41:59 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Lucene-java Wiki" for change notification.

The "RunningTests" page has been changed by SteveRowe:
http://wiki.apache.org/lucene-java/RunningTests?action=diff&rev1=7&rev2=8

Comment:
Switch test case and method descriptions to tests.class and tests.method; describe how the
current directory affects which tests get run

  
  == Basic Operations ==
  === Running all tests ===
- To run all tests, just run {{{ant test}}}
+ To run all tests, just run {{{ant test}}}.
  
+ You can run tests at the project, product, module, or sub-module level:
+ 
+  * At the top-level (containing {{{lucene/}}} and {{{solr/}}}), all Lucene and Solr tests
will be run.
+  * Under {{{lucene/}}}, all Lucene tests will be run.
+  * Under {{{lucene/core/}}}, only Lucene core tests will be run.
+  * etc.
+ 
+ === Running only a specific test class ===
+ To run a specific test class, use {{{-Dtests.class}}}
+ 
+ {{{tests.class}}} filters full class names (including package) using a shell-like glob pattern.
+ 
+ For example, to run only {{{TestIndexWriter}}}: {{{ant test -Dtests.class="*.TestIndexWriter"}}}
+ 
+ (The quotations around the glob pattern prevent shell expansion.)
+ 
+ {{{-Dtestcase=Xyz}}} is an alias of {{{-Dtests.class="*.Xyz"}}}
+ 
+ 
+ === Running only a specific test method ===
+ To run just a single method in a test, use {{{-Dtests.method}}}
+ 
+ {{{tests.method}}} filters method names using a shell-like glob pattern.
+  
+ For example: {{{ant test -Dtests.class="*.TestIndexWriter" -Dtests.method="test*Count"}}}
+ 
+ {{{testmethod}}} is an alias of {{{tests.method}}}.
+ 
+  
  === Running all tests in a specific package ===
  To run tests in a specific package, use {{{-Dtests.class}}}
  
- For example: {{{ant test -Dtests.class=*.search.*}}}
+ For example: {{{ant test -Dtests.class="*.search.*"}}}
  
- === Running only a specific test class ===
- To run a specific test class, use {{{-Dtestcase}}}
- 
- For example: {{{ant test -Dtestcase=TestIndexWriter}}}
- 
- === Running only a specific test method ===
- To run just a single method in a test, use {{{-Dtestmethod}}}
- 
- For example: {{{ant test -Dtestcase=TestIndexWriter -Dtestmethod=testDocCount}}}
  
  == Test Options ==
  The following options can be use to modify the behavior of tests.
@@ -44, +64 @@

  ||tests.timezone ||sets the JVM default timezone for a test to run under ||random ||{{{-Dtests.timezone=Australia/Lindeman}}}
||
  ||tests.directory ||sets the lucene directory impl for a test to use ||random ||{{{-Dtests.directory=FSDirectory}}}
||
  ||tests.multiplier ||multiplier to increase the work done by random tests ||1 ||{{{-Dtests.multiplier=3}}}
||
- ||tests.asserts.gracious ||relax test framework's java-assertions-enabled requirement ||false
||{{{-Dtests.asserts.gracious=true}}} ||
  

Mime
View raw message