Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] How to run tests on existing built plug-ins?

The Tycho demo project ipt01 contains an example how to run JUnit-Plugin tests with Tycho.

 

It is not possible to run tests in an existing installation, but this is also not necessary. Tycho creates the runtime for the test on the fly based on the dependencies of the test bundle/fragment.

 

Regards

Tobias

 

From: tycho-user-bounces@xxxxxxxxxxx [mailto:tycho-user-bounces@xxxxxxxxxxx] On Behalf Of ramesh gunjal
Sent: Freitag, 16. Dezember 2011 08:24
To: tycho-user@xxxxxxxxxxx
Subject: [tycho-user] How to run tests on existing built plug-ins?

 

Hello,

 

I am new to Eclipse/Tycho. I want know, how can I run my tests on already built RCP application?

 

My directory structure is as below

 

Parent

---- com.xxx.myapp

---- com.xxx.myapp.product

---- com.xxx.myapp.test

 

I have a parent POM having two separet profiles to package RCP app and run the tests

 

<id>default</id> <-- activated by default>

<modules>

    <module>com.xxx.myapp</module>

    <module>com.xxx.myapp.product</module>

</modules>

 

<id>mytest</id>

<modules>

    <module>com.xxx.myapp.test</module>

</modules>

 

I build my RCP as follows

 

> mvn -Dmake.destination=/path/to/target package

 

Which build my app perfectly fine under /path/to/target

 

Now I want to run my test over already build product i.e. under /path/to/target. How should I achieve this

 

If I run

 

> mvn -Dmake.destination=/path/to/target test -Pmytest

 

It says me nothing to compile and not tests to run

 

If I run

 

> mvn -Dmake.destination=/path/to/target install -Pmytest

 

It gives error that bundle com.xxx.myapp not found. Because it expect the required plugin under my local repository.

 

If I run

 

> mvn -Dmake.destination=/path/to/target install

> mvn -Dmake.destination=/path/to/target install -Pmytest

 

Then it run the tests perfectly fine because the find the required plugins under local repository and run the test from there. But I don't want my test running from local repository because there may be a chance of my local repo can contain some old plugins and I won't be testing correct code. I want to run them on already built plugins under /path/to/target

 

Is it possible to do that? Or what would be possible solutions?

 

 

--
Thanks, God bless all,
Ramesh


Back to the top