Revision: 4588
Author: jussi.ao.malinen
Date: Wed Feb  2 06:52:04 2011
Log: Tests and implementation to defect which caused criticality and noncriticality statistics not to go to split logs.

Update issue 755
Status: Done
Owner: jussi.ao.malinen
Labels: Target-2.5.6

Tests and implementation done.

http://code.google.com/p/robotframework/source/detail?r=4588

Added:
 /trunk/atest/testdata/output/splitting
 /trunk/atest/testdata/output/splitting/test.txt
 /trunk/atest/testdata/output/splitting/test2.txt
Modified:
 /trunk/atest/robot/output/splitting/split_log.txt
 /trunk/src/robot/output/output.py
 /trunk/src/robot/serializing/testoutput.py

=======================================
--- /dev/null
+++ /trunk/atest/testdata/output/splitting/test.txt     Wed Feb  2 06:52:04 2011
@@ -0,0 +1,6 @@
+*** Test Cases ***
+My test case
+    [Documentation]  FAIL Failing
+    Log  Something
+    Fail  Failing
+
=======================================
--- /dev/null
+++ /trunk/atest/testdata/output/splitting/test2.txt Wed Feb 2 06:52:04 2011
@@ -0,0 +1,5 @@
+*** Test Cases ***
+My second test case
+    [Documentation]  FAIL Failing
+    [Tags]  FOO
+    Fail  Failing
=======================================
--- /trunk/atest/robot/output/splitting/split_log.txt Sat Jul 3 00:55:02 2010 +++ /trunk/atest/robot/output/splitting/split_log.txt Wed Feb 2 06:52:04 2011
@@ -143,6 +143,19 @@
Statistics Table Should Contain Link ${name}.html ${name}-012.html Subsuites.Sub1 Misc.Suites.Subsuites.Sub1 Statistics Table Should Contain Link ${name}.html ${EMPTY} Misc.Unicode Misc.Unicode

+Splitting output with criticality
+ @{files} = My Run Tests --splitoutputs 1 --noncritical FOO --log subsuites-log --report subsuites-report output${/}splitting FAIL
+    ${index} =  Log File  ${OUTDIR}/${LOGBASE}.html
+    Log Should Contain correct Statistics  ${index}  Splitting
+    ...  FAIL  1  0  1  2  0  2
+    ${log1} =  Log File  ${OUTDIR}/subsuites-log-001.html
+    Log Should Contain correct Statistics  ${log1}  Test
+    ...  FAIL  1  0  1  1  0  1
+    ${log2} =  Log File  ${OUTDIR}/subsuites-log-002.html
+    Log Should Contain correct Statistics  ${log2}  Test2
+    ...  PASS  0  0  0  1  0  1
+
+
 *** Keywords ***
 Run Nested Suite With Given Split Level
     [Arguments]  ${level}
=======================================
--- /trunk/src/robot/output/output.py   Fri Sep 24 00:42:36 2010
+++ /trunk/src/robot/output/output.py   Wed Feb  2 06:52:04 2011
@@ -77,7 +77,7 @@
         if self._namegen is None:
             return
         logpath = self._namegen.get_prev()
-        output = robot.serializing.SplitSubTestOutput(outpath)
+ output = robot.serializing.SplitSubTestOutput(outpath, self._settings)
         output.serialize_log(logpath)
         suite.context.log_file_changed(self._namegen.get_base())

=======================================
--- /trunk/src/robot/serializing/testoutput.py  Tue Dec  7 04:00:09 2010
+++ /trunk/src/robot/serializing/testoutput.py  Wed Feb  2 06:52:04 2011
@@ -206,8 +206,9 @@

 class SplitSubTestOutput(RobotTestOutput):

-    def __init__(self, path):
+    def __init__(self, path, settings):
         suite, exec_errors = process_output(path)
+ suite.set_critical_tags(settings['Critical'], settings['NonCritical'])
         RobotTestOutput.__init__(self, suite, exec_errors)


Reply via email to