Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ecf-dev] Progress Update ECF R-OSGI TEST FRAMEWORK

Following suggestion were added into road map in the yesterday(12/07/2012) review meeting with the Markus and Harshana


 1)All the run time dependencies  should be load using the bundle meta information no need to ask it from user 
 (libraries annotation should be removed)

 2)Should pass the poxy object into user and give a opportunity to write test cases to user 

 3)User should be able to run  sames test case with the local services as well as the remote service without changing the
   test case classes 

 4)OSGI service container should be configure in the run-time 

 Harshan and Markus Please mention,if I miss some points  

Thanks and Best regards
/Jasintha


On Thu, Jul 12, 2012 at 1:11 PM, Jasintha Dasanayaka <jasinthad@xxxxxxxxx> wrote:
 Hi 

 Here[1] you can download the screen record of the demonstration. 

Thanks and Regards
/Jasintha

[1] - http://dl.dropbox.com/u/53759225/demo1.ogv


On Wed, Jul 11, 2012 at 11:33 AM, Jasintha Dasanayaka <jasinthad@xxxxxxxxx> wrote:
Hi Markus , Scott, Harshan and All 

 I have  completed the following features in the R-OSGI Test Framework 

  Features 
  •  Register and Host the remote Service  
  •  Create Service Client 
  •  Read the test case annotations and process the annotations 
  •  Pass the user input into service proxy object and invoke  service object and obtain the result 
  •  Compare the with the expected result and  real result and generate the output 

Test framework define annotations and Details 


@ServiceTest(IService = "org.jasintha.ecf.service.cal.ICal",ImplService="org.jasintha.ecf.service.impl.cal.Calculator",
libraries ="org.jasintha.ecf.service.cal_1.0.0.jar" )

All the test class should use this annotation, framework only process  classes which having this annotation
here you need to specify your interface and Imple classes, If those classes are not in your current project, you need to give the bundle name and import  those bundle into the project. If above classes in your current project
you can ignore the libraries.


 @Test(Methodname = "add")
 This is used to annotate your test method, you need to specify the original method name as the parameter 


@Param(value="4")int param1
 using this annotation you can pass the parameter to the method


 @Result(valu="1")
 If you expect a value as a return of this method you can pass that value using this annotation 


@ResultException(expected = NumberFormatException.class)
if you expect a Exception as a result of this method you can define that exception using this annotation


@ServiceHost(hostId ="r-osgi://10.100.3.147:9278")
if you want to test your method with the existing r-osgi service without using framework service you can use this annotation and specify the host 

 
 These are the current annotations in the framework  I am sure we need to do some changes to above annotations also may need to introduce few annotations according to the your comments and suggestions 


 Compete Test case look like as follows 

@Test(Methodname = "add")
public @Result(valu="4")int testadd1(@Param(value="2")int param1,@Param(value="2")int param2){
        return 0;
}


 @Test(Methodname = "addString")
public @ResultException(expected = NumberFormatException.class)int testadd2(@Param(value="abc")String param1,@Param(value="2")String param2){
        return 0;
  

I have done a small demonstrations to the Harshana,  here I have attached screen shots of that demo,  you also can try out the framework, code is available in the git repository [1] ,
( tested in the Linux and eclipse Helios ,java 1.6 environment)

Step to test the Framework
  1. Download the org.eclipse.ecf.remoteservice.testframework form the git repo
  2. Import the project into your eclipse work-space 
  3. There is one external dependency(Apache common lang ) I already have put that jar into lib folder so you don't have to worry 
  4. Add  ECF budles into the class path 
  5. Run the Eclipse . 

I would like to do a demo to Markus and Scott too,  Because I strongly  want to develop a very good and  useful Testing framework for R-OSGI.

Shall we arrange a goto meeting or skype  session ASAP to discuss changes and future works 

 

Thanks and Regards
/Jasintha



--
Thanks & Regards

Jasintha Dasanayake
MSc  Student , SHU Uk 

mobile +94 772 916 596 ,





--
Thanks & Regards

Jasintha Dasanayake
MSc  Student , SHU Uk 

mobile +94 772 916 596 ,





--
Thanks & Regards

Jasintha Dasanayake
MSc  Student , SHU Uk 

mobile +94 772 916 596 ,



Back to the top