Refactor base test class inheritance to allow for BaseTest class to be
reused without needing to also import the TestCase class everywhere in
order to avoid having the common test function executed on base classes.
This makes it easier to build base testing classes and then simplifies
the subclassing of these for actual tests.
Change-Id: I89809e8082469f814f245db4a9ab7658aac8a405
Capture logs to attach them on exceptions to simplify the debugging of
errors in tests when they occur.
Change-Id: I5c1b5c306aba37789a8d41eabf65e0ac628af838
Add documentation on how to generate documentation and run JJB unit tests.
Also added a unit tests for each category of plugins as examples for others
to follow when adding new JJB plugins. I'm hoping this will help contributors
add tests for new plugins going forward.
Change-Id: I2ab90cdb37d0f3b1e947345d4291d2927b04a0c6
This patch refactors the tests suite to use a base class to declare test cases
just using a class declaration, the existing test class was modified to use it
and new tests are using it as well.
These tests verify the XML generated when the 'node' option is set and
when it's absent.
Change-Id: Iddcdd63e0ab7c459f6513b1d1ebf19e19a362c1d
The assertMultiline equal was removed for assertEqual to be python26
friendly. Testtools has a matcher that provides similar functionality
that is python26 compatible. Use testtools instead of unittest for this
functionality. Remove use of unittest.main().
Change-Id: I348b0ee0192d3164084c20d9356e69f29e1cb86c
Instead of using load_tests to build a test suite out of a single
test case, rely on testscenarios. This library aims at running the
same test with different input data (`scenarios').
Some code is moved inside the test case to reduce the number of
scenario parameters (previously fixtures).
Change-Id: Iedb4cb3ad6341a9b397fa305b1ce2b329b6fdc15
I am trying to build up a very basic testing framework so we can tests
our publishers. The idea is to provide a YAML input file and expected
XML output, run the parser on the YAML file and compares its output with
the fixture XML.
That test suite should speed up development of new publishers.
TestCaseModulePublisher is declared inside a function so that unittest
discovery does not consider it a usable test directly. load_test is
responsible for instantiating the test suite.
Change-Id: If3260113eb1337ac47c3883b11c600e5a595dae3
[fabre.arnaud@gmail.com: fixed some runtime errors]
Signed-off-by: Arnaud Fabre <fabre.arnaud@gmail.com>