summaryrefslogtreecommitdiffstats
path: root/suites
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2017-05-15 18:24:35 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2017-05-19 14:22:39 +0200
commit0ffb41440661631fa1d520c152be4cf8ebd4c46b (patch)
tree4b9863b5907e43974a5387750eba3d4ead24287e /suites
parent023fd2c748b97d295872dfbfc3aafe119de74684 (diff)
Add JUnit XML reports; refactor test reporting
* Add Junit output file support * Differentiate between an expected failure test and an error in the test, as described in JUnit. * In case of an error/exception during test, record and attach it to the Test object and continue running the tests, and show it at the end during the trial report. Change-Id: Iedf6d912b3cce3333a187a4ac6d5c6b70fe9d5c5
Diffstat (limited to 'suites')
-rw-r--r--suites/debug/error.py5
-rw-r--r--suites/debug/fail.py2
-rw-r--r--suites/debug/fail_raise.py5
-rw-r--r--suites/debug/pass.py5
4 files changed, 16 insertions, 1 deletions
diff --git a/suites/debug/error.py b/suites/debug/error.py
new file mode 100644
index 0000000..8e146fa
--- /dev/null
+++ b/suites/debug/error.py
@@ -0,0 +1,5 @@
+#!/usr/bin/env python3
+from osmo_gsm_tester.test import *
+
+# This can be used to verify that a test error is reported properly.
+assert False
diff --git a/suites/debug/fail.py b/suites/debug/fail.py
index 1b412b5..fcd56e0 100644
--- a/suites/debug/fail.py
+++ b/suites/debug/fail.py
@@ -2,4 +2,4 @@
from osmo_gsm_tester.test import *
# This can be used to verify that a test failure is reported properly.
-assert False
+test.set_fail('EpicFail', 'This failure is expected')
diff --git a/suites/debug/fail_raise.py b/suites/debug/fail_raise.py
new file mode 100644
index 0000000..22fb940
--- /dev/null
+++ b/suites/debug/fail_raise.py
@@ -0,0 +1,5 @@
+#!/usr/bin/env python3
+from osmo_gsm_tester.test import *
+
+# This can be used to verify that a test failure is reported properly.
+raise Failure('EpicFail', 'This failure is expected')
diff --git a/suites/debug/pass.py b/suites/debug/pass.py
new file mode 100644
index 0000000..42c1f25
--- /dev/null
+++ b/suites/debug/pass.py
@@ -0,0 +1,5 @@
+#!/usr/bin/env python3
+from osmo_gsm_tester.test import *
+
+# This can be used to verify that a test passes correctly.
+pass