diff --git a/tests/report/junit/data/main.fmf b/tests/report/junit/data/main.fmf
index 663550235c..67ebda37a4 100644
--- a/tests/report/junit/data/main.fmf
+++ b/tests/report/junit/data/main.fmf
@@ -17,6 +17,15 @@
/timeout:
test: ./runtest.sh timeout
duration: 2s
+ /skip:
+ test: ./runtest.sh pass
+ result: skip
+ /info:
+ test: ./runtest.sh pass
+ result: info
+ /warn:
+ test: ./runtest.sh pass
+ result: warn
/shell:
framework: shell
@@ -27,3 +36,12 @@
/timeout:
test: sleep 10
duration: 2s
+ /skip:
+ test: "true"
+ result: skip
+ /info:
+ test: "true"
+ result: info
+ /warn:
+ test: "false"
+ result: warn
diff --git a/tests/report/junit/data/tmt-report-junit.xsd b/tests/report/junit/data/tmt-report-junit.xsd
new file mode 100644
index 0000000000..dccb174720
--- /dev/null
+++ b/tests/report/junit/data/tmt-report-junit.xsd
@@ -0,0 +1,79 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/report/junit/main.fmf b/tests/report/junit/main.fmf
index ef90e29d6f..d8b1a90ec6 100644
--- a/tests/report/junit/main.fmf
+++ b/tests/report/junit/main.fmf
@@ -1 +1,4 @@
summary: Check for JUnit output
+require+:
+ # To support xmllint tool
+ - libxml2
diff --git a/tests/report/junit/test.sh b/tests/report/junit/test.sh
index 3cc3f175bc..1c5d5740e3 100755
--- a/tests/report/junit/test.sh
+++ b/tests/report/junit/test.sh
@@ -10,9 +10,11 @@ rlJournalStart
for method in tmt; do
rlPhaseStartTest "$method"
rlRun "tmt run -avr execute -h $method report -h junit --file junit.xml 2>&1 >/dev/null | tee output" 2
- rlAssertGrep "2 tests passed, 2 tests failed and 2 errors" "output"
- rlAssertGrep '' "junit.xml"
+
+ rlRun "xmllint --noout --schema 'tmt-report-junit.xsd' 'junit.xml'" 0 "Checking generated JUnit against the XSD schema"
rlPhaseEnd
done
diff --git a/tests/report/polarion/data/tmt-report-polarion.xsd b/tests/report/polarion/data/tmt-report-polarion.xsd
new file mode 100644
index 0000000000..603d77b55f
--- /dev/null
+++ b/tests/report/polarion/data/tmt-report-polarion.xsd
@@ -0,0 +1,97 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/report/polarion/main.fmf b/tests/report/polarion/main.fmf
index 18921e4317..b4aa221a34 100644
--- a/tests/report/polarion/main.fmf
+++ b/tests/report/polarion/main.fmf
@@ -1,2 +1,5 @@
summary: Check for xUnit output
enabled: false # needs pylero, so just for local testing
+require+:
+ # To support xmllint tool
+ - libxml2
diff --git a/tests/report/polarion/test.sh b/tests/report/polarion/test.sh
index 50c0a15a7e..d19f4c2b9c 100755
--- a/tests/report/polarion/test.sh
+++ b/tests/report/polarion/test.sh
@@ -14,6 +14,8 @@ rlJournalStart
rlAssertGrep '' "xunit.xml"
rlAssertGrep '' "xunit.xml"
rlAssertGrep '' "xunit.xml"
+
+ rlRun "xmllint --noout --schema 'tmt-report-polarion.xsd' 'xunit.xml'" 0 "Checking generated XUnit against the XSD schema"
rlPhaseEnd
rlPhaseStartCleanup