-
Notifications
You must be signed in to change notification settings - Fork 231
Building and running tests
To run the unit and integration tests you need to have NUnit 2.6 installed.
To run the integration tests you need a working ccm on your machine and make a ccm command accessible from command line path (you can create a ccm.cmd file that executes ccm with the provided args python "<path-to-ccm>\ccm" %*
).
This way you should be able to run $ cmd.exe /c ccm help
using command line.
You can use Visual Studio 2012+ to build the solution and run the tests.
You can build the solution with msbuild using the build/build.proj
file.
Example: $ MSBuild.exe build/build.proj /v:m /t:test
Check out the MSBuild Command-Line Reference.
Clean previous builds and compiles the solution.
$ MSBuild.exe build/build.proj /v:m /t:compile
Execute compile
target and runs the test located in the Cassandra.Tests project.
$ MSBuild.exe build/build.proj /v:m /t:unit-test
To run the unit test, you will need to have the NUNIT_PATH
environment variable pointing to the bin folder of the Nunit installation path, for example: C:\Program Files (x86)\NUnit 2.6.3\bin
.
As an alternative, you can set NUNIT_PATH
as a project-level property, using the switch /p
:
$ MSBuild.exe build/build.proj /v:m /t:unit-test "/p:NUNIT_PATH=C:\Program Files (x86)\NUnit 2.6.3\bin"
Runs unit-test
target and runs the tests located in the Cassandra.IntegrationTests project.
It also requires NUNIT_PATH environment variable.
Modifies the assembly info to include the build number and runs test
target.
You will need to set the BUILD_NUMBER environment variable.
Example using environment variables:
$ MSBuild.exe build/build.proj /v:n /t:ci
Example using command line arguments:
$ MSBuild.exe build/build.proj /v:n /t:ci "/p:NUNIT_PATH=C:\Program Files (x86)\NUnit 2.6.3\bin" /p:BUILD_NUMBER=12345