mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
automated testing changes, in addition to an automated.xml
This commit is contained in:
parent
1f0ea28cc4
commit
4acfc2eb1d
@ -259,11 +259,24 @@
|
|||||||
</exec>
|
</exec>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="xmltest-hudson" description="Used to run the daily tests using tools/testClient/example.xml as the source of tests">
|
<target name="xmltest-automated" description="Used to run the daily tests using tools/testClient/automated.xml as the source of tests">
|
||||||
<property name="xmltest" value="example.xml"/>
|
<property name="xmltest" value="automated.xml"/>
|
||||||
<echo message="Running daily test run with ${xmltest}.py"/>
|
<echo message="Running daily test run with ${xmltest}.py"/>
|
||||||
<antcall target="xmltest-execute"/>
|
<antcall target="xmltest-execute"/>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
<target name="automated-test-run" description="Run the automated tests in tools/testClient/testcases/automated.xml using the debug server">
|
||||||
|
<property name="env.CATALINA_HOME" value="/usr/share/cloud"/>
|
||||||
|
<echo message="CATALINA_HOME = ${env.CATALINA_HOME}"/>
|
||||||
|
<antcall target="build-all"/>
|
||||||
|
<antcall target="deploy-server"/>
|
||||||
|
<antcall target="deploydb"/>
|
||||||
|
<antcall target="start-tomcat"/>
|
||||||
|
<echo message="running tests..."/>
|
||||||
|
<antcall target="xmltest-automated"/>
|
||||||
|
<antcall target="stop-tomcat"/>
|
||||||
|
<antcall target="clean-tomcat"/>
|
||||||
|
</target>
|
||||||
<!-- ====================== XMLTEST Python Based testing ================== -->
|
<!-- ====================== XMLTEST Python Based testing ================== -->
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
4425
tools/testClient/automated/automated.xml
Normal file
4425
tools/testClient/automated/automated.xml
Normal file
File diff suppressed because it is too large
Load Diff
@ -43,11 +43,11 @@ class xml_to_python(object):
|
|||||||
# this could be handled much cleaner
|
# this could be handled much cleaner
|
||||||
try:
|
try:
|
||||||
itemValue = item.getElementsByTagName("value")[0].childNodes[0].nodeValue.strip()
|
itemValue = item.getElementsByTagName("value")[0].childNodes[0].nodeValue.strip()
|
||||||
except Exception:
|
except:
|
||||||
itemValue = None
|
itemValue = None
|
||||||
try:
|
try:
|
||||||
itemParam = item.getElementsByTagName("param")[0].childNodes[0].nodeValue.strip()
|
itemParam = item.getElementsByTagName("param")[0].childNodes[0].nodeValue.strip()
|
||||||
except Exception:
|
except:
|
||||||
itemParam = None
|
itemParam = None
|
||||||
|
|
||||||
# handle getparam and setparam and random attributes here...
|
# handle getparam and setparam and random attributes here...
|
||||||
@ -64,7 +64,7 @@ class xml_to_python(object):
|
|||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
val = int(itemValue)
|
val = int(itemValue)
|
||||||
except Exception:
|
except:
|
||||||
val = "'%s'" % itemValue
|
val = "'%s'" % itemValue
|
||||||
self._write("%s%s.%s = %s" % (INDENT, self.cmd_name_var, itemName, val))
|
self._write("%s%s.%s = %s" % (INDENT, self.cmd_name_var, itemName, val))
|
||||||
|
|
||||||
@ -78,7 +78,11 @@ class xml_to_python(object):
|
|||||||
#if item.getAttribute("list") == "true":
|
#if item.getAttribute("list") == "true":
|
||||||
|
|
||||||
itemName = item.getElementsByTagName("name")[0].childNodes[0].nodeValue.strip()
|
itemName = item.getElementsByTagName("name")[0].childNodes[0].nodeValue.strip()
|
||||||
|
try:
|
||||||
itemParam = item.getElementsByTagName("param")[0].childNodes[0].nodeValue.strip()
|
itemParam = item.getElementsByTagName("param")[0].childNodes[0].nodeValue.strip()
|
||||||
|
except:
|
||||||
|
print "parse_returnvalue: No 'param' found in : '" + item.toprettyxml() + "'"
|
||||||
|
itemParam = None
|
||||||
|
|
||||||
if item.getAttribute("setparam") == "true":
|
if item.getAttribute("setparam") == "true":
|
||||||
self._write("%s%s = %s.%s" % (INDENT, itemParam, self.cmd_name_resp, itemName))
|
self._write("%s%s = %s.%s" % (INDENT, itemParam, self.cmd_name_resp, itemName))
|
||||||
@ -97,7 +101,11 @@ class xml_to_python(object):
|
|||||||
self.cmd_name_var = "_%s" % self.cmd_name
|
self.cmd_name_var = "_%s" % self.cmd_name
|
||||||
self.cmd_name_resp = "resp_%s" % self.cmd_name
|
self.cmd_name_resp = "resp_%s" % self.cmd_name
|
||||||
|
|
||||||
|
try:
|
||||||
testCaseName = cmd.getElementsByTagName("testcase")[0].childNodes[0].nodeValue.strip()
|
testCaseName = cmd.getElementsByTagName("testcase")[0].childNodes[0].nodeValue.strip()
|
||||||
|
except:
|
||||||
|
print "parse_command: No 'testcase' found in: " + cmd.toprettyxml()
|
||||||
|
testCaseName = None
|
||||||
self._write("\n%s# %s" % (INDENT, testCaseName))
|
self._write("\n%s# %s" % (INDENT, testCaseName))
|
||||||
|
|
||||||
self._write("%s%s = %s.%sCmd()" % (INDENT, self.cmd_name_var, self.cmd_name, self.cmd_name))
|
self._write("%s%s = %s.%sCmd()" % (INDENT, self.cmd_name_var, self.cmd_name, self.cmd_name))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user