Testing

Differences between revisions 2 and 5 (spanning 3 versions)
Revision 2 as of 2012-06-11 20:03:24
Size: 1499
Editor: 99-41-167-234
Comment:
Revision 5 as of 2012-11-16 04:25:55
Size: 2126
Editor: c-76-25-23-72
Comment:
Deletions are marked like this. Additions are marked like this.
Line 9: Line 9:

'''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.
Line 20: Line 22:
You will want to ensure that your `~/.config/accomplishments/.accomplishment` file has the location of your accomplishments branch included (e.g. accompath = `/path/to/branch:/usr/share/accomplishments`) so that battery can see it. 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.
Line 26: Line 28:
Let's imagine your accomplishment id is `ubuntu-community/my-accom`. To test it just run the following command: Let's imagine your accomplishment id is `ubuntu-community/my-accom`.

To test it just run the following command:
Line 33: Line 37:

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.

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)