Extract the zip, creating a sibling directory to cslim called cpputest. The top-level directory name should be ~/src/cpp_fitnesse/cpputest
Switch to that directory and build cpputest:
Get FitNesse
Download fitnesse.jar, these instructions were created using the edge build #398, dated July 11, 2010, 12:49, but the release at fitnesse.org should work fine.
Move fitnesse.jar into ~src/cpp_fitnesse/
The directory should look like this before you run fitnesse for the first time:
Building cslim
Go to ~/src/cpp_fitnesse/cslim
Type make:
Run FitNesse
The first time you run FitNesse, it will extract a base wiki and then start. After the first execution, it will just start. If you replace the fitnesse.jar with a new version, starting FitNesse the first time after that will update the base wiki, but leave the pages you created alone.
The first execution looks like this
The directory structure after running FitNesse the first time should now look like this:
The next time you start FitNesse, you’ll simply see the following:
Create Top-Level Page
This assumes you’re running FitNesse on port 8080. Update the url with your port as necessary.
Edit the contents. Set it to (note, to make the columns line up, use theFormat button):
If you click theTest Button, you’ll see a bit of yellow. It’s time to write a fixture.
Writing the Fixture
This example originated from the one provided with cslim. It’s been somewhat simplified and moved closer to C++. You can review the original example in ~/src/cpp_fitnesse/cslim/fixtures/FixtureInCpp.cpp.
Go to the fixtures directory under your cslim installation (cd ~/src/cpp_fitnesse/cslim/fixtures).
Create a new file, Modulus.cpp:
Update the fixture registry in Fixtures.c. This file is in the same directory. You’ll see something close to this:
You need to add your new fixture, Modulus, in the list somewhere:
Make your CSlim_cslim executable. Switch to ~/src/cpp_fixtures/cslim and type make:
Go back to your page and hit theTest button.
If you see mostly green, congratulations. As of this writing, there’s an exception on the slim protocol version. Once this gets fixed, I’ll update these instructions
Comments