You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@gump.apache.org by Leo Simons <ls...@jicarilla.org> on 2004/03/28 23:12:28 UTC
running gump tests
Hi gang!
trying to learn something about unit testing python software...
[lsimons@lsd /data3/gump/gump-install]$ export \
PYTHONPATH=/data3/gump/gump-install/python/
[lsimons@lsd /data3/gump/gump-install]$ sh gumpytest.sh
(...)
INFO:gump:Performed [29] tests with [15] issues.
I tried running this as ajack too, which resulted in
INFO:gump:Performed [66] tests with [1] issues.
yet the output included lots of statements like
ERROR:gump:Failed to download [http://no_such_url_to_test_missing].
Details: [Errno socket error] (-2, 'Name or service not known')
* Is this to be expected?
* How am I supposed to run these tests on my local machine?
* Do I need a profile or anything like that set up?
* Are there fancy python equivalents to stuff like junitreport and
clover for python?
* Are there docs that answer these Qs somewhere?
--
thanks for your patience, and g'night!
- Leo Simons
-----------------------------------------------------------------------
Weblog -- http://leosimons.com/
IoC Component Glue -- http://jicarilla.org/
Articles & Opinions -- http://articles.leosimons.com/
-----------------------------------------------------------------------
"We started off trying to set up a small anarchist community, but
people wouldn't obey the rules."
-- Alan Bennett
---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
For additional commands, e-mail: general-help@gump.apache.org
Re: running gump tests
Posted by "Adam R. B. Jack" <aj...@trysybase.com>.
> Does gumpy support regexp nagging? If so, we could regexp against
>
> INFO:gump:Performed [68] tests with [0] issues.
>
> ie
>
> /\[[1-9]+\] issues/
No, I know Stefan wants it but I've not found time to implement it. Python
Gump is pretty much 'exit code' based, which we are getting by with for now.
FWIIW: This script sets it's exit code based off success of all, or not.
BTW: I was going to add it, but I see it is there:
http://nagoya.apache.org/jira/browse/GUMP-16
regards,
Adam
---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
For additional commands, e-mail: general-help@gump.apache.org
Re: running gump tests
Posted by Leo Simons <ls...@jicarilla.org>.
Adam R. B. Jack wrote:
> The way you did was created so this could occur:
>
> http://lsd.student.utwente.nl/gump/gump/gump-test.html
cool!
Does gumpy support regexp nagging? If so, we could regexp against
INFO:gump:Performed [68] tests with [0] issues.
ie
/\[[1-9]+\] issues/
--
cheers,
- Leo Simons
-----------------------------------------------------------------------
Weblog -- http://leosimons.com/
IoC Component Glue -- http://jicarilla.org/
Articles & Opinions -- http://articles.leosimons.com/
-----------------------------------------------------------------------
"We started off trying to set up a small anarchist community, but
people wouldn't obey the rules."
-- Alan Bennett
---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
For additional commands, e-mail: general-help@gump.apache.org
Re: running gump tests
Posted by "Adam R. B. Jack" <aj...@trysybase.com>.
> trying to learn something about unit testing python software...
Cool.
> [lsimons@lsd /data3/gump/gump-install]$ export \
> PYTHONPATH=/data3/gump/gump-install/python/
> [lsimons@lsd /data3/gump/gump-install]$ sh gumpytest.sh
>
> (...)
>
> INFO:gump:Performed [29] tests with [15] issues.
>
> I tried running this as ajack too, which resulted in
>
> INFO:gump:Performed [66] tests with [1] issues.
As :
http://wiki.apache.org/gump/GumpDevelopment
You might wish to try more directly with PYTHONPATH set, and CWD as gump's
python directory.
python gump/test/pyunit.py
You can pass wildcarded arguments, e.g.
python gump/test/pyunit.py *Properties*
> yet the output included lots of statements like
>
> ERROR:gump:Failed to download [http://no_such_url_to_test_missing].
> Details: [Errno socket error] (-2, 'Name or service not known')
> * Is this to be expected?
Yeah, I tried unit testing bad situation ('cos we hope we don't see them too
often in live metadata). I didn't find a way to tell the log not to report
them, they were only testing, so you see this.
> * How am I supposed to run these tests on my local machine?
The way you did was created so this could occur:
http://lsd.student.utwente.nl/gump/gump/gump-test.html
I'd hand run the script.
> * Do I need a profile or anything like that set up?
It is trying to use a test one in gump/test/resources/...
> * Are there fancy python equivalents to stuff like junitreport and
> clover for python?
No clue. It was only after I hacked gump.test.pyunit.py that I learned a
real pyunit exists. I've not had chance to go investigate it. I think it is
time to move from 'roll your own' to 'install Python packages' approach.
It'll slow Gump installation down, but is better for it's development, I
feel. [i.e. maybe we ought remove logging from gump/python, since it is in
Python 2.3 and can be downloaded for Python 2.2. I just hadn't wanted to
face that on all machines yet.]
> * Are there docs that answer these Qs somewhere?
Not really. We ought cut-n-paste them to:
http://wiki.apache.org/gump/GumpDevelopment
regards
Adam
---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
For additional commands, e-mail: general-help@gump.apache.org