[jbosstools-dev] An excursion into integration testing plugins with Arquillian
Max Rydahl Andersen
manderse at redhat.com
Tue Jul 1 08:53:29 EDT 2014
On 28 Jun 2014, at 0:51, Paul G. Richardson wrote:
> On 06/27/2014 04:08 PM, Max Rydahl Andersen wrote:
>>
>>>>> Might be of interest ...
>>>>>
>>>>> https://community.jboss.org/en/teiiddesigner/dev/blog/2014/06/23/unit-testing-an-eclipse-plugin-with-arquillian
>>>>>
>>>>>
>>>>
>>>> thats cool - even though I was hoping it was actually using
>>>> arquillian to test eclipse (i.e. as an
>>>> alternative to eclipse test runner).
>>>>
>>>> May I ask why the code we have in our server adapter testing base
>>>> code was not sufficient for
>>>> starting jboss servers and test against it ?
>>>>
>>>> /max
>>>> http://about.me/maxandersen
>>>
>>> Cos... I didn't know it was there ;-)
>>
>> there is this mailing list called jbosstools-dev where you can ask
>> how
>> we test our existing jboss server tooling :)
>>
>>> I may have misunderstood mistria as well that the current JBT
>>> testing
>>> started servers with WTP?
>>
>> They are. We could probably remove that but for now not had that need
>> since the plugins talking to the server
>> have already had the dependency on the server adapter/wtp anyway.
>>
>>> I
>>> didn't really want to introduce that element as well into the
>>> integration-testing. I wanted to
>>> confine it to:
>>> - Start JBoss Server with Teiid installed
>>> - Connect to Teiid using Teiid API from our Teiid client plugin
>>> - Deploy Teiid's own testing VDBs using our Teiid client plugin
>>> ... ...
>>
>> So that is reason enough for it. If you don't need/want to test your
>> server adapter as part of this
>> then yeah you don't have a need for it and its really cool to get
>> arquillian to do it.
>>
>> What worries me and what I couldn't immediately grok was why
>> ant/eclipserunner had to be involved in this ?
>>
>> This is because you need to actually invoke arquillian before the
>> eclipse run ?
>>
>> if it is then yeah - this is why I tease arquillian team to get an
>> eclipse friendly version of it
>> so all these hoops doesn't need to be jumped through.
>>
>> I tried following a few of your links but they 404's (like
>> https://github.com/Teiid-Designer/komodo/blob/master/tests/org.komodo.eclipse.teiid-8.7.client.test/src/arquillian.xml)
>>
>> would love to show Aslak the complexity required for this (which
>> seems
>> unnecessary)
>>
>> /max
>> http://about.me/maxandersen
>
>
> Ask for help when I can struggle on my own - are you mad!! ;-)
>
> One of those "I'll just try this quickly situations that turn into a
> crusade' is the best explanation.
>
> Anyway...
>
> Answering points above in sequence:
>
> Ant is responsible for downloading the maven dependencies and copying
> them to a libs folder as library dependencies for the test plugin.
..okey - any reasons why not just using the mvn copy goal for that which
we use in other cases ?
> Executing tests within Eclipse AND through maven is part-and-parcel of
> our development process. Run the tests in Eclipse once (or during)
> development and then run them through maven prior to push to github
> and letting jenkins build.
Sure - just read the blog as if you were running eclipse in yet another
different way via ant ?
> Otherwise, yes you are correct. Arquillian must be invoked prior to
> running the unit test so that the JBoss container is there waiting.
> Links fixed but the komodo repository is a live firing range at the
> moment with lots of development going on so more than likely they
> might break again in the future. I'll try and keep and eye-out.
>
> Maybe I have got so used to using Eclipse auto-builders (using ant) to
> bring in extra libraries from some other source that I don't really
> see it as complex. Then again seeing wood for the trees is not
> necessarily my forte.
My main concern is that this is bringing in dependencies outside or our
target platform thus less easy to contain/check for overlaps.
Also - using mvn copy goal seems to me to be the better way rather than
using ant auto builders?
/max
http://about.me/maxandersen
More information about the jbosstools-dev
mailing list