What can Madcow do for you? Check out the quick example below.
Open your favourite text editor and add the following:
then save the file into the Madcow 2.0 tests
folder as GoogleTest.grass
.
Now create a new file with the following:
and save the file into the Madcow 2.0 mappings
folder as google.grass
.
Then open up a command prompt or terminal window on Mac and type…
You should see a lot of things start to happen. Don’t worry this is just your test running.
It is running the above GoogleTest.grass
file, which will basically do the following steps:
Note: Each one of those steps listed here directly correlates to the step in the testcase.
Once completed you will then want to see the results of your test. To do this simply open the index.html
file in the results\madcow-results
folder in your browser of choice.
or run at the command line in Mac
or in Windows
It should look similar to this:
Here you can see that it all passed successfully. To see further details about the test run click on the “GoogleTest” link and you should see more details step-by-step results showing what the Madcow test did.
Whoa!
Want to know more about how that all worked?
Check out Writing Tests for more informaiton.