Commit c0624cdb authored by Rafael Monnerat's avatar Rafael Monnerat

Use url list instead single url to run multiple tests at once.

parent 845246f9
...@@ -53,15 +53,14 @@ ...@@ -53,15 +53,14 @@
<value> <string encoding="cdata"><![CDATA[ <value> <string encoding="cdata"><![CDATA[
"""\n """\n
Generate a Zuite (if necessary), create/update the test and redirect to the selenium test created/updated\n test_list is composed by [(full_test_html , title), ]\n
url, web_page or web_page_reference must be set for it to work (or the context should be the Web Page in question)\n \n
"""\n """\n
\n \n
zuite = context.getPortalObject().portal_tests.Zuite_addZuite(zuite_id)\n zuite = context.getPortalObject().portal_tests.Zuite_addZuite(zuite_id)\n
\n \n
test = zuite.Zuite_addTest(test_id, \n for text, title in test_list:\n
title, \n zuite.Zuite_addTest(test_id, title, text)\n
text)\n
\n \n
return zuite.Base_redirect("core/TestRunner.html?auto=true&test=..%2Ftest_suite_html&resultsUrl=..%2FpostResults")\n return zuite.Base_redirect("core/TestRunner.html?auto=true&test=..%2Ftest_suite_html&resultsUrl=..%2FpostResults")\n
...@@ -70,7 +69,7 @@ return zuite.Base_redirect("core/TestRunner.html?auto=true&test=..%2Ftest_suite_ ...@@ -70,7 +69,7 @@ return zuite.Base_redirect("core/TestRunner.html?auto=true&test=..%2Ftest_suite_
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>text, title, zuite_id, test_id</string> </value> <value> <string>test_list, zuite_id, test_id=None</string> </value>
</item> </item>
<item> <item>
<key> <string>_proxy_roles</string> </key> <key> <string>_proxy_roles</string> </key>
......
...@@ -54,23 +54,19 @@ ...@@ -54,23 +54,19 @@
Generate a Zuite (if necessary), create/update the test and redirect to the selenium test created/updated\n Generate a Zuite (if necessary), create/update the test and redirect to the selenium test created/updated\n
url, web_page or web_page_reference must be set for it to work (or the context should be the Web Page in question)\n url, web_page or web_page_reference must be set for it to work (or the context should be the Web Page in question)\n
"""\n """\n
test_list = []\n
count = 0\n
for url in url_list:\n
count += 1\n
test_list.append((context.Zuite_urlRead(url), \'url%s\' % count),)\n
\n \n
validation = context.Zuite_viewZeleniumTestLauncherValidator(editor=None, \n return context.Zuite_createAndLaunchSeleniumTest(test_list=test_list,\n
request=context.REQUEST, \n zuite_id=zuite_id)\n
validator = False)\n
if not validation[\'result\']:\n
return context.Base_redirect(validation[\'form_id\'], \n
keep_items = dict(portal_status_message=validation[\'portal_status_message\']))\n
\n
return context.Zuite_createAndLaunchSeleniumTest(text=context.Zuite_urlRead(url),\n
title="Download From Web", \n
zuite_id=zuite_id,\n
test_id=test_id)\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>url, zuite_id = \'tutorial_zuite\', test_id = \'\'</string> </value> <value> <string>url_list, zuite_id=\'tutorial_zuite\'</string> </value>
</item> </item>
<item> <item>
<key> <string>_proxy_roles</string> </key> <key> <string>_proxy_roles</string> </key>
......
...@@ -82,9 +82,8 @@ ...@@ -82,9 +82,8 @@
<value> <value>
<list> <list>
<string>your_description</string> <string>your_description</string>
<string>your_url</string> <string>your_url_list</string>
<string>your_zuite_id</string> <string>your_zuite_id</string>
<string>your_test_id</string>
</list> </list>
</value> </value>
</item> </item>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>description</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>your_test_id</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>description</string> </key>
<value> <string>Enter the id of the generated test (this will overwrite any test with the same id)</string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_string_field</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Test ID</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -11,8 +11,9 @@ ...@@ -11,8 +11,9 @@
<value> <value>
<list> <list>
<string>description</string> <string>description</string>
<string>display_width</string> <string>height</string>
<string>title</string> <string>title</string>
<string>width</string>
</list> </list>
</value> </value>
</item> </item>
...@@ -26,7 +27,7 @@ ...@@ -26,7 +27,7 @@
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>your_url</string> </value> <value> <string>your_url_list</string> </value>
</item> </item>
<item> <item>
<key> <string>message_values</string> </key> <key> <string>message_values</string> </key>
...@@ -91,19 +92,27 @@ ...@@ -91,19 +92,27 @@
</item> </item>
<item> <item>
<key> <string>field_id</string> </key> <key> <string>field_id</string> </key>
<value> <string>my_string_field</string> </value> <value> <string>my_lines_field</string> </value>
</item> </item>
<item> <item>
<key> <string>form_id</string> </key> <key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value> <value> <string>Base_viewFieldLibrary</string> </value>
</item> </item>
<item>
<key> <string>height</string> </key>
<value> <int>10</int> </value>
</item>
<item> <item>
<key> <string>target</string> </key> <key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value> <value> <string>Click to edit the target</string> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>External Url</string> </value> <value> <string>External Urls</string> </value>
</item>
<item>
<key> <string>width</string> </key>
<value> <int>90</int> </value>
</item> </item>
</dictionary> </dictionary>
</value> </value>
......
52 53
\ No newline at end of file \ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment