Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] SWTBot + Tycho

On Fri, Sep 5, 2014 at 4:12 PM, BERNARD, Alain <alain.bernard@xxxxxxxxxx> wrote:

Hello,

 

We have a problem while setting up our Tycho configuration to include some SWTBot tests on our application. The tests run properly when launched through "Run As > SWTBot Test" but not when included in the Tycho build.

 

We have a product with ID "fooProduct" which runs the application "org.eclipse.ui.ide.workbench". The product is feature-based and relies on "org.eclipse.platform" feature (v4.4.0, Luna). We have also included in the pom.xml of the test plugin the following instructions:

 

<build>

    <plugins>

        <plugin>

            <groupId>org.eclipse.tycho</groupId>

            <artifactId>tycho-surefire-plugin</artifactId>

            <version>${tycho-version}</version> < !-- we are using Tycho 0.21.0 -->

            <configuration>

                <useUIHarness>true</useUIHarness>

                <useUIThread>false</useUIThread>

                <!-- use our product and application to launch the tests -->

                <product>fooProduct</product>

                <dependency-resolution>

                    <extraRequirements>

                         <!-- product IU under test -->

                        <requirement>

                            <type>p2-installable-unit</type>

                            <id>fooProduct</id>

                            <versionRange>[1.0.0,2.0.0)</versionRange>

                        </requirement>

                    </extraRequirements>

                </dependency-resolution>

            </configuration>

        </plugin>

    </plugins>

</build>

 

 

When running the Tycho build (with goals ‘clean install’), the test fails with the message “Could not find a menu within the shell 'Shell with text {Shell {}}' matching 'with mnemonic 'File''” and in the logs we can see that Eclipse failed to load our product:

!ENTRY org.eclipse.equinox.app 0 0 2014-09-05 15:40:44.128

!MESSAGE Product fooProduct could not be found.

 

We looked at the list of bundles that are present in the “configuration” directory

 

It seems that we are doing something wrong in our configuration but we cannot figure out what is the problem. Can someone help us?

 

Thank you a lot in advance!

 

Alain


I'd first check if all required dependencies are on the classpath of the tycho build running the tests

--
Matthias 

Back to the top