Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] Is there a way to specify what bundles get loaded when running tests with tycho-surefire-plugin?

Hi,

You must to define what bundles should be started before the tests get running and set the dependencies too inside the configuration of tycho-surefire-plugin.

Don't know WindowTester, but you can use this config as a start to config your own bundles:
            <plugin>
                <groupId>org.eclipse.tycho</groupId>
                <artifactId>tycho-surefire-plugin</artifactId>
                <version>${tycho-version}</version>
                <configuration>
                    <includes>                   
                        <include>**/*Embedder.*</include>
<!--                         <include>**/*Tests.*</include> -->
                    </includes>
                    <useUIHarness>true</useUIHarness>
                    <useUIThread>false</useUIThread>
                    <!-- <product>org.eclipse.sdk.ide</product> -->
                    <product>myrcpmail.product</product>
                    <showEclipseLog>true</showEclipseLog>
                    <argLine>${ui.test.vmargs}</argLine>
<!--                     <failIfNoTests>false</failIfNoTests> -->
                    <application>myrcpmail.application</application>
                    <bundleStartLevel>
                        <bundle>
                            <id>org.apache.aries.util</id>
                            <level>1</level>
                            <autoStart>true</autoStart>
                        </bundle>
                        <bundle>
                            <id>org.apache.aries.blueprint</id>
                            <level>1</level>
                            <autoStart>true</autoStart>
                        </bundle>
                        <bundle>
                            <id>org.apache.aries.proxy.api</id>
                            <level>1</level>
                            <autoStart>true</autoStart>
                        </bundle>
                        <bundle>
                            <id>org.apache.aries.proxy.impl</id>
                            <level>1</level>
                            <autoStart>true</autoStart>
                        </bundle>
                        <bundle>
                            <id>org.jbehave.osgi.services</id>
                            <level>4</level>
                            <autoStart>true</autoStart>
                        </bundle>
                    </bundleStartLevel>

                    <dependencies>
                        <dependency>
                            <type>p2-installable-unit</type>
                            <artifactId>org.eclipse.swtbot.eclipse.core</artifactId>
                            <version>2.0.4</version>
                        </dependency>
                        <dependency>
                            <type>p2-installable-unit</type>
                            <artifactId>org.eclipse.swtbot.eclipse.finder</artifactId>
                            <version>2.0.4</version>
                        </dependency>
                        <dependency>
                            <type>p2-installable-unit</type>
                            <artifactId>org.eclipse.swtbot.eclipse.junit4.headless</artifactId>
                            <version>2.0.4</version>
                        </dependency>
                        <dependency>
                            <type>p2-installable-unit</type>
                            <artifactId>org.eclipse.swtbot.junit4_x</artifactId>
                            <version>2.0.4</version>
                        </dependency>
                        <dependency>
                            <type>p2-installable-unit</type>
                            <artifactId>org.eclipse.swtbot.swt.finder</artifactId>
                            <version>2.0.4</version>
                        </dependency>
                        <dependency>
                            <type>p2-installable-unit</type>
                            <artifactId>org.eclipse.swtbot.eclipse.finder</artifactId>
                            <version>2.0.4</version>
                        </dependency>
                        <dependency>
                            <type>p2-installable-unit</type>
                            <artifactId>org.hamcrest</artifactId>
                            <version>1.1.0</version>
                        </dependency>
                        <dependency>
                            <type>p2-installable-unit</type>
                            <artifactId>org.jbehave.osgi.examples.tycho.rcpmail</artifactId>
                            <version>0.0.0</version>
                        </dependency>
                        <dependency>
                            <type>p2-installable-unit</type>
                            <artifactId>org.eclipse.sdk.ide</artifactId>
                            <version>0.0.0</version>
                        </dependency>
                        <dependency>
                            <type>p2-installable-unit</type>
                            <artifactId>org.eclipse.ui.workbench.compatibility</artifactId>
                            <version>0.0.0</version>
                        </dependency>
                        <dependency>
                            <type>p2-installable-unit</type>
                            <artifactId>org.eclipse.ui</artifactId>
                            <version>0.0.0</version>
                        </dependency>
                    </dependencies>
                </configuration>
            </plugin>


On 30/06/11 12:41, TK Gospodinov wrote:
I am trying to launch an Eclipse-based product and run automated UI tests with WindowTester. The product itself is complex and consists of several hundred plugins, some of which need to be resolved when launching it, even though they are not referenced in the manifests. When I run mvn clean test -X, I see a list of plugins that are being resolved by tycho-surefire-plugin:

[DEBUG] Installation OSGI bundles:
...

However, I need to include other plugins as well for the product to launch correctly. Currently, I am seeing this:

osgi> Time to load bundles: 1734
Starting application: 3372
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4:36.792s
[INFO] Finished at: Thu Jun 30 10:01:55 CDT 2011
[INFO] Final Memory: 81M/155M
[INFO] ------------------------------------------------------------------------

and the product never starts.

I appreciate your help!
_______________________________________________ tycho-user mailing list tycho-user@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/tycho-user


Back to the top