cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <>
Subject [Cassandra Wiki] Update of "HowToContribute" by TylerHobbs
Date Thu, 25 Sep 2014 15:46:56 GMT
Dear Wiki user,

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

The "HowToContribute" page has been changed by TylerHobbs:

Update instructions for running tests

  == Testing and Coverage ==
  Setting up and running system tests:
+ === Running the Unit Tests ===
+ Simply run `ant` to run all unit tests. To run a specific test class, run `ant<ClassName>`.
 To run a specific test method, run `ant<ClassName> -Dtestsome.methods=<comma-separated
list of method names>`.
- === Running the functional tests for Thrift RPC ===
-  1. Install CQL: `svn checkout; cd drivers/py;
python build; sudo python install`.
-  1. Install the [[|nose]] test
runner (`aptitude install python-nose`, `easy_install nose`, etc).
-  1. Install the Thrift compiler (see InstallThrift) and Python libraries (`cd thrift/lib/py
&& python install`).
-  1. Generate Cassandra's Python code using `ant gen-thrift-py`.
-  1. Build the source `ant clean build`.
-  1. Run `nosetests test/system/` from the top-level source directory.
- If you need to modify the system tests, you probably only need to care about test/system/
 (test/system/ takes care of spawning new cassandra instances for each test and
cleaning up afterwards so they are isolated.)
+ You can also run tests in parallel: `ant test -Dtest.runners=4`.
+ === Running the dtests ===
+ The dtests use [[|ccm]] to test a local cluster.
+  1. Install ccm.  You can do this with pip by running `pip install ccm`.
+  1. Install nosetests.  With pip, this is `pip install nose`.
+  1. Clone the dtest repo:
+  1. Set `$CASSANDRA_DIR` to the location of your cassandra checkout.  For example: `export
CASSANDRA_DIR=/home/joe/cassandra`.  Make sure you've already built cassandra in this directory.
+  1. Run all tests by running `nosetests` from the dtest checkout.  You can run a specific
module like so: `nosetests`.  You can run a specific test method like this: `nosetests`
  === Running the code coverage task ===
   1. Unzip this one:

View raw message