directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Seelmann <m...@stefan-seelmann.de>
Subject Re: [Studio] Tests ?
Date Fri, 29 May 2015 19:09:28 GMT
On 05/29/2015 06:14 PM, Emmanuel Lécharny wrote:
> Le 29/05/15 17:01, phantomjinx a écrit :
>> On 29/05/15 15:53, Emmanuel Lécharny wrote:
>>> Hi Stefan,
>>>
>>> I'd like to test some of the classes I'm writing in Studio, using junit
>>> (they are not GUI classes). ATM, we don't define junit as a dependence
>>> in any of the Studio projects. What would be the best way to do that ?
>>>
>>> Thanks !
>> Hey Emmanuel,
>>
>> Seeing as how you've helped me, I am sure I can return the favour.
>>
>> My project is Teiid Designer [1], which provides a number of plugins and a perspective
as part of
>> JbossTools. We have a large number of unit tests [2] (using junit) that would provide
a framework
>> for what you are hoping to do. An example of the kind of pom you would need to write
would be
>> something like this [3].
>>
>> The test plugins (or fragments if you prefer) will depend on junit, which would need
to be made
>> available from your target-platform.
>>
>> Hope this helps. If not, apologies for the intrusion.
> 
> Thanks !
> 
> I'm dumb, we already have everything needed, and I wasn't even aware of
> it. I just have to run mvn test to get my tests executed.
> 
> The thing is that in eclipse, we don't see the test source file.

Right, junit test dependency and surefire is configured in
plugins/pom.xml and tests are executed by maven build. However in
Eclipse you have to add them manually to build path and add junit
dependency. The cause is that putting main and test code in one bundle
is not OSGi like.

See also https://issues.apache.org/jira/browse/DIRSTUDIO-1021 for more
details.

Kind Regards,
Stefan






Mime
View raw message