Testing
The Basics |
Tutorial |
Testing Your Accomplishment
With your accomplishment now complete, it is time to test that it works. Doing this is easy and we have a tool called accomplishments-battery that makes testing testing simple.
You should ensure your accomplishment passes this test before you submit it.
Please Note: you only need to test accomplishments that have needs-information (accomplishments that need verifying). Currently, we don't have a means of testing local accomplishments.
Getting Battery
accomplishments-battery is available in both the daily and releases PPA. To find out how to install one of these PPAs (releases is strongly recommended), see this page for more details.
Get it with:
sudo apt-get install accomplishments-battery
You will want to ensure that your ~/.config/accomplishments/.accomplishments file has the location of your accomplishments branch included (e.g. accompath = /path/to/branch:/usr/share/accomplishments) so that battery can see it.
Testing Your Accomplishment
Before you can test your accomplishment, you must ensure you have a test included. If you don't see this page for how to create one.
Let's imagine your accomplishment id is ubuntu-community/my-accom.
To test it just run the following command:
accomplishments-battery -s ubuntu-community/my-accom
You should now see battery test your accomplishment for success and failure. Both tests should pass. If they do, congratulations, your accomplishment works!
You can also use battery to test if you are missing schema items from your .accomplishment file. Just use the -c switch:
accomplishments-battery -c -s ubuntu-community/my-accom
You can also see attractive HTML output of the tests by running:
accomplishments-battery -c -s ubuntu-community/my-accom -o ~/Desktop/report.html
Now just load the report.html file from your Desktop in Firefox.
Accomplishments/Creating/Guide/Testing (last edited 2012-11-16 04:25:55 by c-76-25-23-72)