On 03/10/11 13:46 +0200, Nicolas Évrard wrote: > * Cédric Krier [2011-10-03 13:42 +0200]: > >>>>> As you have probably seen, I have started to configure the Jenkins [1] > >>>>> freely > >>>>> offered by Shining Panda [2]. > >>>> > >>>> py.test can produce JUnit XML test reports that can be integrated with > >>>> Jenkins. > >>>> > >>>> http://pytest.org/latest/usage.html#creating-junitxml-format-files > >>>> > >>>> This would provide information about failing tests and stuff like > >>>> that. > >>> > >>> I think py.test doesn't allow us to get test calls ordered. > >> > >>nosetests [1] is another solution which provides JUNIT xml reports and > >>works with jenkins > > > >I tried nosetests on ShiningPanda because it was the example of the doc but > >it > >failed because it did not run tests in the right orders. > > The fact is that running tests in a specified order is not what unit > tests are about.
Indeed it is a feature of unittest that others doesn't provide (and one main reason we choose unittest). "Note that the order in which the various test cases will be run is determined by sorting the test function names with respect to the built-in ordering for strings." [1] > That's probably why those tools do not "support" it. I think it is more because they want to "auto-discover" the tests. [1] http://docs.python.org/library/unittest.html#organizing-test-code -- Cédric Krier B2CK SPRL Rue de Rotterdam, 4 4000 Liège Belgium Tel: +32 472 54 46 59 Email/Jabber: [email protected] Website: http://www.b2ck.com/
pgpmZ6I4tLwiQ.pgp
Description: PGP signature
