Commit Graph

8 Commits

Author SHA1 Message Date
Dong Ma 0c1856b696 Update xunit plugin
- update xunit plugin to use convert xml
- add plugin="xunit" attribute
- update docstring

Change-Id: Iee5fd66434d3ca2acbe13b0871c085b6fb5d9a62
2016-09-15 14:50:01 +08:00
Lukas Bednar 1cf55db557 publishers: xunit doesn't accepts integers as threshold
* Accept integers for threshold
 In documentation is written that threshold should be integer.
 But it fails with integer to generate XML.
 Only case when it pass is for 0, because XML formatter consider it as
 empty body and do not format it.

* Fix documentation for missing threshold field, plus test.
 In documentation it says that missing threshold is set to 0, but apparently
 it is set to Null (empty field), and it has different behaviour than for 0
 value.

Change-Id: I326cbadd955c4c28f315fa72293d9a54a116b140
2015-11-12 14:51:58 +01:00
Tobias Henkel f41de33ed0 xunit: Add support for Google Test
Change-Id: I6a7d836ccb365533edbd0773a005d936fb8eef2a
2015-07-08 08:39:47 +02:00
Lucas Dutra Nunes 81781a4aa8 xUnit publisher: add option to skip if there are no tests files
This is valid for each defined xUnit type publisher on the job. Default
is false.

Change-Id: Idff3c8ba6a4e4291ec483b2eb4a999dcbeea7291
Signed-off-by: Lucas Dutra Nunes <ldnunes@ossystems.com.br>
2015-02-19 00:28:31 +00:00
Lucas Dutra Nunes dd41c44dbb xUnit publisher: add test-time-margin extra config option
From the plugin advanced configuration:

    "Give the report time margin value (default to 3000) in ms, before
     to fail if not new (unless the option 'Fail the build if test
     results were not updated this run' is checked)."

The configuration defaults to 3000 if no value is passed.

Change-Id: I372d9cc100ecd824516bac864daac0af41e367f5
Signed-off-by: Lucas Dutra Nunes <ldnunes@ossystems.com.br>
2015-02-03 10:23:33 -02:00
Darragh Bailey c99cbccb8e Ensure dict orders are deterministic
Python 3 enables hash randomization by default, additionally tox 1.7
turns on the same randomization for earlier versions of python by
default. Need to ensure that order of iteration over the yaml data and
resulting XML has deterministic order for testing.

Adapts https://gist.github.com/enaeseth/844388 which ensures data read
by yaml will have its order retained in a predictable manner across
multiple python versions.

Additionally it seems more sensible to ensure that the order of
generated XML snippets corresponding to the input yaml files are
consistently in the same order as the entries in the source files.

Closes-Bug: #1333349
Change-Id: I6bf6d298a2609cc6ddbbc6b02b7f1a04413a5c89
2014-09-01 14:15:10 +01:00
Kei YAMAZAKI 604d39305b Fix multibyte character problem
Fixed problem that causes a UnicodeEncodeError when use multi-byte characters in the job.yml.

Change-Id: Ie715c827a794e73fae11cdca079ea80cfb8c280d
2014-01-21 22:34:30 +09:00
Antoine Musso b829874916 Tests for publishers
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>
2013-07-19 14:31:11 +02:00