0

Context:

I'm using the attrib nose plugin to classify my testcases. I defined standard attributes (i.e. Speed) and a limited value set for this attribute (i.e. 'fast', 'normal', 'slow'). The problem with this kind of attributes is, that they are vulnerable to typos or to very creative developers, that create new fancy attributes or values :-)

So I want to write a test to discover this kind of deviations from my standard definition. The idea is, to run nose from the test itself with the --collect-only option and an attribute filter -A "Speed !='fast' and Speed!='normal' and Speed!='slow'". So if everything would be ok, nose would run 0 tests and this would be asserted in my test.

Problems/Questions

How can I easily get the numeric test results (ran tests, failed tests, passed tests, ...) from nose without parsing stdout for example? Will I have to write my own plugin to access these values directly?

Xerxiz
  • 265
  • 2
  • 6
  • 1
    Have you considered running nose from a python file instead of the command line ? See http://stackoverflow.com/a/11734050/2003420 – El Bert Aug 06 '14 at 15:35
  • Yes, want to run nose directly from the running tests and I allready did some nose execution from python, but the `nose.run()` method just returns a boolean (test success). – Xerxiz Aug 07 '14 at 09:08

0 Answers0