[Future Task]: Add better tests
Bug #189572 reported by
Markus Korn
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-launchpad-bugs |
Fix Released
|
Medium
|
Markus Korn |
Bug Description
py-lp-bugs definitely needs better and more complete testing code.
Such tests should be able to
* point us to changes in launchpad (representation of data etc.)
* provide testcases to test changes in py-lp-bugs itself
Steps to fix this bug:
1.) work on the Error messages in py-lp-bugs (Bug 188307)
2.) rework/ add testcases, I suggest using the unittest framework
Markus
Related branches
Changed in python-launchpad-bugs: | |
importance: | Undecided → Medium |
Changed in python-launchpad-bugs: | |
milestone: | none → intrepid |
To post a comment you must log in.
I started to work on this bug over the weekend, let me give you a short overview of the current state:
* I'm using python's unittest-module as a testing framework run_tests. py -l
* I added a cmdl. tool to run/manage the testcases, to get a list of all available testcases run:
$ python testing/
** this return something like:
testmodul1
.testclass1
.testcase1
.testcase2
.testclass2
.testcase1
testmodul2
.testclass1
.testcase1
* to run all testcases run: run_tests. py -a
$ python testing/
* if you want to test py-lp-bugs against python2.4 run: run_tests. py -a
$ python2.4 testing/
* if you want to run only a subset of the testcases, you can use the '-s' option: run_tests. py -s testmodul1 testmodul2. testclass1 testmodul. testclass2. testcase1
$ python testing/
** the number of arguments given to '-s' is arbitrary
** the arguments are path-like strings; to get an summary of all available pathes use the '-l' option described above
* you can also ignore testcases with the '-i' option: run_tests. py -a -i testmodul1. testclass2. testcase10 testmodule2 testclass2. testcase10 and all testcases in testmodul2
$ python testing/
** this will ignore the testcase testmodul1.
** there is also some basic RegEx support
* some testcases needs information like the path to a cookiefile or password/email of your launchpad.net account, to run these testcases you need to create "~/.python- launchpad- bugs/test. cfg" with the following content:
[config]
password = mypassword
email = myemail
cookiefile = path-to-cookie-file
The next step will be to create more testcases.
Markus