[Erp5-report] r36158 jerome - in /erp5/trunk/bt5/erp5_ui_test_core: SkinTemplateItem/portal...

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Jun 9 14:48:07 CEST 2010


Author: jerome
Date: Wed Jun  9 14:48:00 2010
New Revision: 36158

URL: http://svn.erp5.org?rev=36158&view=rev
Log:
replace useless testTable.1, testTable.2 test id with the path of the test file in the HTML generated by selenium. notable change is that this script no longer returns the result url, but the result content directly

Modified:
    erp5/trunk/bt5/erp5_ui_test_core/SkinTemplateItem/portal_skins/erp5_ui_test_core/TestTool_getResults.xml
    erp5/trunk/bt5/erp5_ui_test_core/bt/revision

Modified: erp5/trunk/bt5/erp5_ui_test_core/SkinTemplateItem/portal_skins/erp5_ui_test_core/TestTool_getResults.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_ui_test_core/SkinTemplateItem/portal_skins/erp5_ui_test_core/TestTool_getResults.xml?rev=36158&r1=36157&r2=36158&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_ui_test_core/SkinTemplateItem/portal_skins/erp5_ui_test_core/TestTool_getResults.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_ui_test_core/SkinTemplateItem/portal_skins/erp5_ui_test_core/TestTool_getResults.xml [utf8] Wed Jun  9 14:48:00 2010
@@ -53,15 +53,28 @@
         </item>
         <item>
             <key> <string>_body</string> </key>
-            <value> <string>portal_tests = container.portal_tests\n
+            <value> <string encoding="cdata"><![CDATA[
+
+portal_tests = container.portal_tests\n
 if test_zuite_relative_url is not None:\n
   # we care for a specific test zuite\n
-  portal_tests = portal_tests.restrictedTraverse(test_zuite_relative_url,\\\n
+  portal_tests = portal_tests.restrictedTraverse(test_zuite_relative_url,\n
                                                  portal_tests)\n
-results = [portal_tests.absolute_url() + \'/\' + e for e in portal_tests.objectIds(\'Zuite Results\')]\n
-results.reverse()\n
-return \'\\n\'.join(results) + \'\\n\'\n
-</string> </value>
+\n
+results = portal_tests.objectValues(\'Zuite Results\')\n
+if not results:\n
+  return None\n
+\n
+# Selenium results tests are just named "testTable.1", "testTable.2" and so forth.\n
+# We replace this by the path of the test, this way we can easily see which test has failed.\n
+html = results[0].index_html()\n
+for idx, test_case in enumerate(portal_tests.listTestCases()):\n
+  html = html.replace(\'>testTable.%s</a>\' % (idx + 1), \'>%s</a>\' % test_case[\'path\'])\n
+\n
+return html\n
+
+
+]]></string> </value>
         </item>
         <item>
             <key> <string>_code</string> </key>
@@ -102,11 +115,13 @@ return \'\\n\'.join(results) + \'\\n\'\n
                             <string>container</string>
                             <string>portal_tests</string>
                             <string>None</string>
-                            <string>append</string>
-                            <string>$append0</string>
-                            <string>_getiter_</string>
-                            <string>e</string>
                             <string>results</string>
+                            <string>_getitem_</string>
+                            <string>html</string>
+                            <string>_getiter_</string>
+                            <string>enumerate</string>
+                            <string>idx</string>
+                            <string>test_case</string>
                           </tuple>
                         </value>
                     </item>

Modified: erp5/trunk/bt5/erp5_ui_test_core/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_ui_test_core/bt/revision?rev=36158&r1=36157&r2=36158&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_ui_test_core/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_ui_test_core/bt/revision [utf8] Wed Jun  9 14:48:00 2010
@@ -1 +1 @@
-27
\ No newline at end of file
+28
\ No newline at end of file




More information about the Erp5-report mailing list