stratos-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Isuru Haththotuwa <>
Subject [Discuss] Extending Integration Tests to Support Complex Unit Tests
Date Sun, 10 May 2015 18:42:46 GMT
Hi Devs,

I had a look to see how we can improve the code coverage with unit testing.
There are a few challenges for this in Stratos:

   1. Operations are not local to a single component - One component calls
   other to do verifications, etc. Example: deploying a service group;
   Autoscaler will call CC to verify the cartridge details
   2. Services are not simple, hard to mock - Since the exposed axis2
   services are complex, its hard to mock them using available tools. We can
   still do this bit will involve some re-factoring to the code.

As a potential solution to improve the tests, I tried to use the
integration test mechanism and adapt it to test simple flows as well;
deploying and validating various aspects of Service Groups (dependencies,
startup orders, etc.), different kinds of policies used in Stratos, etc.
Using the integration test mechanism solves the problem of operations not
being local and difficulty to mock them; the Stratos server and MB can be
used to execute any flow and test it.

What I propose is to add a layer on top of the currently integration tests
framework to expose a set of utility methods to deploy cartridges, groups,
policies, etc. to help developers to write tests using those easily. All
the tests will be executed against a single Stratos Server without starting
a separate server each time. Did some refactoring locally to suit this
purpose and wrote several simple tests as well, which seem to work well.

Please share your thoughts.

Thanks and Regards,

Isuru H.
+94 716 358 048* <>*

View raw message