Index: src/docbkx/developer.xml =================================================================== --- src/docbkx/developer.xml (revision 1353086) +++ src/docbkx/developer.xml (working copy) @@ -488,6 +488,51 @@ + +
+Integration Tests +HBase integration Tests are tests that are beyond HBase unit tests. They +are generally long-lasting, sizeable (the test can be asked to 1M rows or 1B rows), +targetable (they can take configuration that will point them at the ready-made cluster +they are to run against; integration tests do not include cluster start/stop code), +and verifying success, integration tests rely on public APIs only; they do not +attempt to examine server internals asserring success/fail. Integration tests +are what you would run when you need to more elaborate proofing of a release candidate +beyond what unit tests can do. They are not generally run on the Apache Continuous Integration +build server. + + +Integration tests currently live under the src/test directory +in the hbase-it submodule and will match the regex: **/IntegrationTest*.java. + +HBase 0.92 added a verify maven target. +Invoking it, for example by doing mvn verify, will +run all the phases up to and including the verify phase via the +maven failsafe plugin, +running all the above mentioned HBase unit tests as well as tests that are in the HBase integration test group. +If you just want to run the integration tests, you need to run two commands. First: + mvn failsafe:integration-test +This actually runs ALL the integration tests. + This command will always output BUILD SUCCESS even if there are test failures. + + At this point, you could grep the output by hand looking for failed tests. However, maven will do this for us; just use: + mvn failsafe:verify + The above command basically looks at all the test results (so don't remove the 'target' directory) for test failures and reports the results. + +
+ Running a subset of Integration tests + This is very similar to how you specify running a subset of unit tests (see above). +To just run IntegrationTestClassXYZ.java, use: + mvn failsafe:integration-test -Dtest=IntegrationTestClassXYZ + Pretty similar, right? + The next thing you might want to do is run groups of integration tests, say all integration tests that are named IntegrationTestClassX*.java: + mvn failsafe:integration-test -Dtest=*ClassX* + This runs everything that is an integration test that matches *ClassX*. This means anything matching: "**/IntegrationTest*ClassX*". + You can also run multiple groups of integration tests using comma-delimited lists (similar to unit tests). Using a list of matches still supports full regex matching for each of the groups.This would look something like: + mvn failsafe:integration-test -Dtest=*ClassX*, *ClassY + +
+