Skip to main content

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

Hi,

You MUST include all dependencies and MUST setup all bundles that you want to auto-start inside the Tycho-Surefire configurations.

And if you are using a macOS you need some profiles too.
 
take a look:

    <profiles>
        <profile>
            <id>macosx</id>
            <activation>
                <os>
                    <name>mac os x</name>
                    <family>mac</family>
                </os>
            </activation>
            <properties>
                <ui.test.vmargs>-Xmx512m -XX:MaxPermSize=256m -XstartOnFirstThread</ui.test.vmargs>
            </properties>
        </profile>
        <profile>
            <id>other-os</id>
            <activation>
                <os>
                    <name>not-mac</name>
                    <family>!mac</family>
                </os>
            </activation>
            <properties>
                <ui.test.vmargs>-Xmx512m -XX:MaxPermSize=256m</ui.test.vmargs>
            </properties>
        </profile>
    </profiles>


        <plugins>
            <plugin>
                <groupId>org.eclipse.tycho</groupId>
                <artifactId>tycho-surefire-plugin</artifactId>
                <version>${tycho-version}</version>
                <configuration>
                    <includes>
                        <!-- <include>your.unique.rcpmail.application.test.MyFirstTest</include> -->
                        <include>**/*Embedder.*</include>
                    </includes>
                    <useUIHarness>true</useUIHarness>
                    <useUIThread>false</useUIThread>
                    <product>your.rcp.application.application.product</product>
                    <showEclipseLog>true</showEclipseLog>
                    <argLine>${ui.test.vmargs}</argLine>
                    <failIfNoTests>true</failIfNoTests>
                    <application>your.rcp.application.application</application>
                    <bundleStartLevel>
                        <bundle>
                            <id>org.eclipse.osgi</id>
                            <level>-1</level>
                            <autoStart>true</autoStart>
                        </bundle>
                        <bundle>
                            <id>org.eclipse.equinox.common</id>
                            <level>1</level>
                            <autoStart>true</autoStart>
                        </bundle>
                        <bundle>
                            <id>org.eclipse.equinox.simpleconfigurator</id>
                            <level>1</level>
                            <autoStart>true</autoStart>
                        </bundle>
                        <bundle>
                            <id>org.eclipse.equinox.ds</id>
                            <level>2</level>
                            <autoStart>true</autoStart>
                        </bundle>
                        <bundle>
                            <id>org.eclipse.equinox.events</id>
                            <level>2</level>
                            <autoStart>true</autoStart>
                        </bundle>
                        <bundle>
                            <id>org.eclipse.core.runtime</id>
                            <level>4</level>
                            <autoStart>true</autoStart>
                        </bundle>
                    </bundleStartLevel>

                    <dependencies>
                        <dependency>
                            <type>p2-installable-unit</type>
                            <artifactId>some.pom-first.plugin.in.another.p2.repository.services</artifactId>
                            <version>0.0.0</version>
                        </dependency>
                        <dependency>
                            <type>eclipse-feature</type>
                            <artifactId>your.application.feature</artifactId>
                            <version>0.0.0</version>
                        </dependency>
                        <dependency>
                            <type>p2-installable-unit</type>
                            <artifactId>org.eclipse.swtbot.eclipse.core</artifactId>
                            <version>2.0.5</version>
                        </dependency>
                        <dependency>
                            <type>p2-installable-unit</type>
                            <artifactId>org.eclipse.swtbot.eclipse.finder</artifactId>
                            <version>2.0.5</version>
                        </dependency>
                        <dependency>
                            <type>p2-installable-unit</type>
                            <artifactId>org.eclipse.swtbot.eclipse.junit4.headless</artifactId>
                            <version>2.0.5</version>
                        </dependency>
                        <dependency>
                            <type>p2-installable-unit</type>
                            <artifactId>org.eclipse.swtbot.junit4_x</artifactId>
                            <version>2.0.5</version>
                        </dependency>
                        <dependency>
                            <type>p2-installable-unit</type>
                            <artifactId>org.eclipse.swtbot.swt.finder</artifactId>
                            <version>2.0.5</version>
                        </dependency>
                        <dependency>
                            <type>p2-installable-unit</type>
                            <artifactId>org.eclipse.swtbot.eclipse.finder</artifactId>
                            <version>2.0.5</version>
                        </dependency>
                    </dependencies>
                </configuration>
            </plugin>



On 12/01/12 05:16, Reiner Fäth wrote:
I have checked this and the name of the test class was wrong *Tests.java. is OpenDialogTest.java and so it generates a OpenDialogTest.class.
Unfortunately that was not the problem, I have the same problem. I tried to leave aout the dependancies but that was also not the problem,
May it be that the problem can be in the product or application, I don't think so because the application builds with these configurations and starts easily...
Don't know what to do :-(


On 10/01/2012 15:30, Mickael Istria wrote:

>On 10/01/2012 15:24, Reiner F?th wrote:
>> public class OpenDialogTest
>>
>> [...]
>>
>     > de.prototype.tests\target\
>classes\de\prototype\tests\ there can
>>     be found
>>     > the Test-Class "OpenDialogTests.class" >>
>
>What is the name of your class? Here are the default configuration of
>surefire plugin. Have a look at the default inclusion wildcards:
>http://maven.apache.org/plugins/maven-surefire-plugin/examples/inclusion-exclusion.html
>
>HTH
>--


_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/tycho-user


Back to the top