nap a écrit :
>
>  
>
>     Jean, do you about setting up "Test result", "code coverage" and
>     pylint
>     results into Hudson? Do you need help for that.
>
> Not yet, so I take all help you can :p
For Pylint reports:

1 Install 'Hudson Violations plugin 
<http://wiki.hudson-ci.org/display/HUDSON/Violations>' (Admin Hudson > 
Plugin Manager)
2 Add this build step to your project:
#!/bin/bash
cd shinken
pylint -f parseable my_lib_directory > pylint.txt
echo "pylint complete"


For unittest report:
1 Add this build step to your project:
#!/bin/bash
cd shinkend
export PYTHONPATH=$PWD/lib
nosetests -v -s --with-xunit
echo "tests complete"

For code coverage report
1 Install 'cobertura coverage' plugin (Admin Hudson > Plugin Manager)
2 Add this build step to your project:
#!/bin/bash
export PYTHONPATH=$PWD/shinken/lib
cd shinken
\rm coverage.xml
coverage erase
coverage run run_testsuite.py -vv
coverage xml --omit=/usr/lib
echo "coverage complete"

Or just add --with-coverage --erase-coverage to your nosetest line (in 
previous example)

>
>     The best way to achieve this is to use "nosetests", which is a really
>     nice tool for working with unit test in Python.
>
>  Don't know about this. Now the features are "frozen" during the last 
> test/bug hunt, I'll look at it and if it's cool put in the test*.sh 
> scripts :)

nosetest is a testing tool for Python code.
It improves the classical unittest classes, add more testing feature, 
and is able to automatically find and launch your various python test 
scripts.
(and a lot more 
http://somethingaboutorange.com/mrl/projects/nose/0.11.2/testing.html)
2 other interesting features:
 - Can generate junit report files, that will be analyzed by Hudson
 - Can also automatically launch Python code coverage.

Try to set up this and tell me if you have issues.


Aurélien


------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
Shinken-devel mailing list
Shinken-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/shinken-devel

Reply via email to