incubator-cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Howie Yu <howie...@trend.com.tw>
Subject Re: [Discuss] Integration test
Date Tue, 08 Jan 2013 09:50:39 GMT
+1 

I thinks spring-test and junta is good enough for unit integration test


On 13/1/8 上午7:33, "Edison Su" <Edison.su@citrix.com> wrote:

>BTW, the current junit test case can be transformed into testNG test case
>in eclipse automatically. So if we decide to switch to testNG for both
>unit test and integration test, it's doable with minimal effort. But, I
>do like junit, which is just so simple to use, and the integration with
>Spring is much better than testNG. Anyway, better to just use one test
>framework for all if possible.
>
>> -----Original Message-----
>> From: Edison Su [mailto:Edison.su@citrix.com]
>> Sent: Monday, January 07, 2013 3:13 PM
>> To: cloudstack-dev@incubator.apache.org
>> Subject: RE: [Discuss] Integration test
>> 
>> No, marvin is suitable for API test, can't test java maven project
>>directly. Here,
>> the integration test, is more about test case for a set of java maven
>>projects,
>> so it must be tested by using java test framework, either junit or
>>testNG. For
>> unit test, test for an individual maven project, it's ok to use Junit.
>>But for
>> integration test, I'd prefer testNG.
>> 
>> > -----Original Message-----
>> > From: Sudha Ponnaganti [mailto:sudha.ponnaganti@citrix.com]
>> > Sent: Monday, January 07, 2013 3:07 PM
>> > To: cloudstack-dev@incubator.apache.org
>> > Subject: RE: [Discuss] Integration test
>> >
>> > Edison,
>> >
>> > Current python framework ( marvin) covers several of the
>> > components/sub- modules and system ( end to end) tests. Functionally
>>it is
>> serving the purpose.
>> > Is this proposal to substitute that as well as current Junit
>>framework??
>> >
>> > Thanks
>> > /Sudha
>> >
>> >
>> > -----Original Message-----
>> > From: Edison Su [mailto:Edison.su@citrix.com]
>> > Sent: Monday, January 07, 2013 2:11 PM
>> > To: cloudstack-dev@incubator.apache.org
>> > Subject: [Discuss] Integration test
>> >
>> > Hi All,
>> >      As Cloudstack is becoming more modularized, we can start thinking
>> > about how to test these components.
>> >      The organization of maven projects in cloudstack. At lowest
>> > level, it's a maven project. The modularized component, means a group
>> > of maven projects. The subsystem, means a logical group of
>> > components. A system, will be build on a lot of subsystems. For
>> > example, there will be a system called, cloud-engine, which is a
>> > server, provides restful API service to other systems(e.g API server).
>> Cloud-engine will have a set of subsystems:
>> > computing, storage, network etc. For each subsystem, will have a group
>> > of
>> > components: e.g. storage subsystem will include volume/image/snapshot
>>..
>> > components. For each component, will have a set of maven projects,
>> > for example, volume component will have a maven project, called
>> > storage- volume, and a lot of plugin projects, such as
>> > (storage-volume-plugin-solidfire, storage-volume-plugin-netapp etc).
>> >      Based on above hierarchy, the integration test will happen at
>> > different
>> > levels: at component level, at subsystem level, at system level etc. I
>> > want to bring up the discuss about how to organize integration tests,
>> > and which integration test framework should we use.
>> >     First, how to organize integration tests? The organization will be
>> > affected/constrained by the dependency between maven projects you
>> want
>> > to test.
>> >           1. Will the integration test at each level have its own
>> > maven project?  Or we put all the integration test cases into one
>> > giant maven project? I'd prefer one maven project at one level, as it
>> > looks like more cleaner. For example, there will be a
>> > storage-integration-test maven project, which depends on
>> > storage-volume-integration-test, storage-image-integration-test, and
>> > so on, while storage-volume-integration-test will depend on
>> > storage-volume, storage-volume-plugin-solidfire, and
>> > storage-volume-plugin-netapp and so on. When you write test case at
>> > each level, you only focus on the limited area you want to test: the
>> > design of test case and the configuration file of each test case,
>>will/can only
>> be specific to the area. Hope it will make writing test case easier.
>> >           2. Which test framework we should use? Junit or testNG? I
>> > was sold to testNG by its feature sets: parametrized test case, group
>> > test cases, running test case in parallel at different level(method,
>> > class etc), test case dependency etc. You can find out more
>> > information about testNG at
>> 
>>http://kaczanowscy.pl/tomek/sites/default/files/testng_vs_junit.txt.slidy
>>_.
>> > html#(1).
>> > 	But in order to integrate testNG with Spring, need a little bit
>>coding.
>> > For example, may need to add a listener in testNG, to inject @DB
>> > annotation, and need to make sure mockito will work. I created a base
>> testNG class:
>> > CloudStackTestNGBase, which can read configuration parameters from a
>> > testNG config xml file, setup @DB context for each test case etc.
>> >
>> >    Comments/feedback are welcome!
>> >
>> >


<table class="TM_EMAIL_NOTICE"><tr><td><pre>
TREND MICRO EMAIL NOTICE
The information contained in this email and any attachments is confidential 
and may be subject to copyright or other intellectual property protection. 
If you are not the intended recipient, you are not authorized to use or 
disclose this information, and we request that you notify us by reply mail or
telephone and delete the original message from your mail system.
</pre></td></tr></table>
Mime
View raw message