Revision: 69c076cffd59
Branch:   default
Author:   jussi.ao.malinen
Date:     Mon May 27 08:30:06 2013
Log: add message to skipped status when skipping non critical tests non xunit output
http://code.google.com/p/robotframework/source/detail?r=69c076cffd59

Modified:
 /atest/robot/output/xunit.txt
 /atest/robot/rebot/xunit.txt
 /src/robot/reporting/xunitwriter.py

=======================================
--- /atest/robot/output/xunit.txt       Tue May 21 06:00:04 2013
+++ /atest/robot/output/xunit.txt       Mon May 27 08:30:06 2013
@@ -56,7 +56,7 @@
     ${root} =    Get XUnit Node  .
     Stats Should Be    ${root}    2    0    1
     ${skipped} =  Get XUnit Node  testcase/skipped
-    Should be equal  ${skipped.text}  FAIL
+    Should be equal  ${skipped.text}  FAIL: Expected failure

 Skipping all tests
Run tests --XUnitFile xunit.xml --log NONE --report NONE --noncritical force --xunitskip ${PASS AND FAIL}
@@ -64,7 +64,7 @@
     Stats Should Be    ${root}    2    0    2
     ${skipped} =  Get XUnit Nodes  testcase/skipped
     Should be equal  ${skipped[0].text}  PASS
-    Should be equal  ${skipped[1].text}  FAIL
+    Should be equal  ${skipped[1].text}  FAIL: Expected failure
     Length Should Be    ${skipped}    2

 *** Keywords ***
=======================================
--- /atest/robot/rebot/xunit.txt        Tue May 21 06:00:04 2013
+++ /atest/robot/rebot/xunit.txt        Mon May 27 08:30:06 2013
@@ -43,7 +43,7 @@
     Element Attribute Should Be    ${root}    failures    4
     Element Attribute Should Be    ${root}    skip    10
     ${skipped} =  Get Elements  ${root}  xpath=testcase/skipped
-    Should Be Equal    ${skipped[0].text}    FAIL
+    Should Be Equal    ${skipped[0].text}    FAIL: Expected
     Should Be Equal    ${skipped[1].text}    PASS
     Length Should Be    ${skipped}    10

=======================================
--- /src/robot/reporting/xunitwriter.py Tue May 21 06:00:04 2013
+++ /src/robot/reporting/xunitwriter.py Mon May 27 08:30:06 2013
@@ -78,9 +78,15 @@

     def _skip_test(self, test):
         self._writer.start('skipped', newline=False)
-        self._writer.content('PASS' if test.passed else 'FAIL')
+        self._writer.content(self._get_test_skip_message(test))
         self._writer.end('skipped')

+    def _get_test_skip_message(self, test):
+        msg = 'PASS' if test.passed else 'FAIL'
+        if test.message:
+            msg += ': %s' % test.message
+        return msg
+
     def _time_as_seconds(self, millis):
         return str(int(round(millis, -3) / 1000))

--

--- You received this message because you are subscribed to the Google Groups "robotframework-commit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to robotframework-commit+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to