Hi Lin

I have just committed a test (ARIES-313) which runs but almost certainly needs some tidying up - it would be great if someone who know how to do this properly could take a look.

I wanted to have a complete test for the blog sample. That is, start up the sample, get the result from http://localhost:8080/org.apache.aries.samples.blog.web/ViewBlog and check the response. This turned out to be a lot harder than I'd thought it would be. The problems were:

1) Had to get the sample to make its own database. Can do this with JPA (see Aries 317) but have not figured out a way to do it with the JDBC version. 2) The services all take a while to register after the framework starts up. So there is code in the test that waits until every service that the sample uses is registered. There may be better ways to do this. I have left the debug statements in the code for now. 3) Needed to use bootDelegationPackages to stop it getting in a mess with javax.transaction. Fortunately someone had done this in the transactions iTests already - so I just copied :-)

Apart from tidying the code there is still one problem. In the test I install each of the four blog sample packages separately. It would be a better test if I were able to install the blog eba from the maven repository. I had a look at the application tests and they write their own eba files in the tests and then read them back, so I'm not sure how to do this. Any ideas?

Oh - and the other issue is that it takes 2 minutes or so to run - probably don't want to do it as part of every build?

Zoe
Hi Zoe

There is the blueprint-itest out there in
trunk/blueprint/blueprint-itest, which uses pax exam to do the test.
It installed the required bundles to the equinox 3.5 and execute the
test.  I'd envision we could do something similar for blog-itest.

Lin

On Fri, May 14, 2010 at 3:17 PM, zoe slattery
<[email protected]> wrote:
Agreed - see ARIES-313. I'm not sure how to write this kind of test (which
is at least partly why there are none for the blog sample:-) ) - happy to
work with you to create some for the blog sample.

Zoe
+1 My thoughts exactly.

On 14 May 2010, at 18:52, Lin Sun wrote:


Hi

I understand we have great samples such as blog and ariesTrader, but I
am wondering if we have plans to create automated itests for them.
Seems a very useful thing to do to help us detect potential problems
at build time and I'd be willing help a bit on this if needed.

Thanks

Lin




Reply via email to