You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by Hugo Trippaers <HT...@schubergphilis.com> on 2012/06/21 18:15:20 UTC

Fixes for unittest and automated-test-run, please review

Heya all,

In order to get my automated build working I had to make a few changes to the build procedures. The good thing now is that I can run a completely automated testrun using both the "unittest ant target" and the "automated.sh" testruns.  The bad thing is they both consistently fail in the actual tests, but the framework to executes the tests does its job. (And actually reports failures back to Jenkins now).

Summary of the changes:
	Modify xmltest ant targets to find the python module generated by build-marvin
	Modify xmltest ant targets to propagate a failure and trigger ant fail target when the testClient fails 
       		(requires ant 1.8.x, will still report OK with older versions)
	Modify automated-test-run to start tomcat in the background and shoot it when the testrun is done.
	Added utils/conf to the test classpath allowing Tests to find db.properties
	Added DBROOTPW to replace.properties with a default value
	Modified automated.sh to allow the user to specify the location of tomcat (ORIG_TOMCAT)
	Added a default logger to cloudstackConnection.py in case the higher level will not supply one.

Disabled checks in unittest:
	NioTest.java, somehow this triggers SSL errors on one of my boxes and hangs the build process. Might be a genuine issue though
	Upgrade/*Test.java, these depend on a fake.sql to load an old database which does not exist
	SearchCriteria2Test.java, this one drops the cloud and cloud_usage database while other tests depend on those

Wrote a little bit about testing here: http://wiki.cloudstack.org/pages/viewpage.action?pageId=9602189

The patch is here: http://dl.dropbox.com/u/70226362/automated-testing.patch
Or see the Jenkins-build branch here: https://github.com/schubergphilis/CloudStack/tree/jenkins-build

If this is something we can include in the master branch, the next step would be to configure/fix the tasks in Jenkins and start fixing stuff that breaks the build. 

Cheers,

Hugo
	

RE: Fixes for unittest and automated-test-run, please review

Posted by Edison Su <Ed...@citrix.com>.

> -----Original Message-----
> From: Hugo Trippaers [mailto:HTrippaers@schubergphilis.com]
> Sent: Thursday, June 21, 2012 9:15 AM
> To: cloudstack-dev@incubator.apache.org
> Subject: Fixes for unittest and automated-test-run, please review
> 
> Heya all,
> 
> In order to get my automated build working I had to make a few changes
> to the build procedures. The good thing now is that I can run a
> completely automated testrun using both the "unittest ant target" and

Pretty cool! 

> the "automated.sh" testruns.  The bad thing is they both consistently
> fail in the actual tests, but the framework to executes the tests does

The xml test cases under test directory are not maintained for a while. It's likely these test cases will fail.
If just execute junit test and marvin, will it work?

> its job. (And actually reports failures back to Jenkins now).
> 
> Summary of the changes:
> 	Modify xmltest ant targets to find the python module generated by
> build-marvin
> 	Modify xmltest ant targets to propagate a failure and trigger ant
> fail target when the testClient fails
>        		(requires ant 1.8.x, will still report OK with older
> versions)
> 	Modify automated-test-run to start tomcat in the background and
> shoot it when the testrun is done.
> 	Added utils/conf to the test classpath allowing Tests to find
> db.properties
> 	Added DBROOTPW to replace.properties with a default value
> 	Modified automated.sh to allow the user to specify the location
> of tomcat (ORIG_TOMCAT)
> 	Added a default logger to cloudstackConnection.py in case the
> higher level will not supply one.
> 
> Disabled checks in unittest:
> 	NioTest.java, somehow this triggers SSL errors on one of my boxes
> and hangs the build process. Might be a genuine issue though
> 	Upgrade/*Test.java, these depend on a fake.sql to load an old
> database which does not exist
> 	SearchCriteria2Test.java, this one drops the cloud and
> cloud_usage database while other tests depend on those
> 
> Wrote a little bit about testing here:
> http://wiki.cloudstack.org/pages/viewpage.action?pageId=9602189
> 
> The patch is here: http://dl.dropbox.com/u/70226362/automated-
> testing.patch
> Or see the Jenkins-build branch here:
> https://github.com/schubergphilis/CloudStack/tree/jenkins-build
> 
> If this is something we can include in the master branch, the next step
> would be to configure/fix the tasks in Jenkins and start fixing stuff
> that breaks the build.

The patch is OK to me.

> 
> Cheers,
> 
> Hugo
>