Skip to main content

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

Could someone please help me with that problem?
There is no point I can refer to,the test runs in Eclipse without problems so I think there is a problem by starting the test?
Here is the test-code:

//@RunWith(SWTBotJunit4ClassRunner.class)
public class OpenDialogTest
{
    SWTWorkbenchBot bot = new SWTWorkbenchBot();

    @Test
    public void openMessageDialogTest()
    {
        // Clicks on the first link, the bot finds in the application
        bot.link().click();

        // Wait until MessageDialog with this titel appears
        bot.waitUntil(shellIsActive("Not Implemented")); //$NON-NLS-1$

        // Not intuitive, but the message in a MessageDialog seems to be a Label with Index 1!
        final String message = bot.label(1).getText();
        assertEquals("Check, if the message equals this text: ", "Imagine the address book or a new message being created now.", message); //$NON-NLS-1$ //$NON-NLS-2$

        // Close the dialog
        bot.button().click();
    }
}




On 2012/1/9, Reiner F?th wrote:
I have that, so thats unfortunately not the problem. When it helps, here is my pom:
 <parent>
    <artifactId>prototype</artifactId>
    <groupId>test</groupId>
    <version>0.0.1-SNAPSHOT</version>
  </parent>
  <groupId>test</groupId>
  <artifactId>de.prototype.tests</artifactId>
  <version>1.0.0-SNAPSHOT</version>
  <packaging>eclipse-test-plugin</packaging>

  <build>
    <plugins>
        <plugin>
            <artifactId>tycho-surefire-plugin</artifactId>
            <groupId>org.eclipse.tycho</groupId>
            <version>0.13.0</version>
            <configuration>
                <useUIHarness>true</useUIHarness>
                <useUIThread>false</useUIThread>
                <product>de.prototype.main.de_prototype_product</product>
                <application>de.prototype.main.application</application>
                <dependencies>

                    <!--Dependancies for the Test-->

                    <dependency>
                        <artifactId>de.prototype.main</artifactId>
                        <version>1.0.0-SNAPSHOT</version>
                    </dependency>
                    <dependency>
                        <artifactId>de.prototype.model</artifactId>
                        <version>1.0.0-SNAPSHOT</version>
                    </dependency>
                    <dependency>
                        <artifactId>de.prototype.navigation</artifactId>
                        <version>1.0.0-SNAPSHOT</version>
                    </dependency>
                </dependencies>
            </configuration>
        </plugin>
    </plugins>
  </build>
</project>

Best Regards

DarkPhoenix


>On 12-01-09 10:01 AM, Igor Fedorenko wrote:
>
>For SWTBot you need to specify the following in tycho-surefire-plugin
>configuration
>
>   <useUIHarness>true</
>useUIHarness>
>  <useUIThread>false</useUIThread>
>
>
>--
>Regards,
>Igor


On 12-01-09 9:57 AM, Reiner F?th wrote:
> Hello,
> I'm trying to build and test an Eclipse RCP Application.
> The Build and JUnit test runns successfully. But when I'm trying to test
> the application with SWTBot I get a problem.
>
> When I run the SWTBot test with "mvn integration-test" or upper phases I
> only get:
>
> [INFO] Command line:
>          cmd.exe /X /C "C:\Programme\Java\jdk1.6.0_
> 24\jre\bin\java.exe
> -Dosgi.noShutdown=false
> -Dosgi.os=win32
> -Dosgi.ws=win32
> -Dosgi.arch=x86
> -jar
> C:\local_repo\p2\osgi\bundle\org.eclipse.equinox.launcher\1.2.0.v20110502\org.eclipse.equinox.launcher-1.2.0.v20110502.jar
>
> -data C:\Eclipse\Workspace\prototype\de.prototype.tests\target\work\data
> -dev
> file:/C:/Eclipse/Workspace/prototype/de.prototype.tests/target/dev.properties
>
> -install C:\Eclipse\Workspace\prototype\de.prototype.tests\target\work
> -configuration
> C:\Eclipse\Workspace\prototype\de.prototype.tests\target\work\configuration
> -application org.eclipse.tycho.surefire.osgibooter.uitest
> -testproperties
> C:\Eclipse\Workspace\prototype\de.prototype.tests\target\surefire.properties
>
> -testApplication de..prototype.main.application
> -product de.prototype.main.de_prototype_product
> -nouithread"
> [INFO]
> ------------------------------------------------------------------------
> [INFO] BUILD FAILURE
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 1:07.521s
> [INFO] Finished at: Mon Jan 09 15:13:51 CET 2012
> [INFO] Final Memory: 49M/118M
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] Failed to execute goal
> org.eclipse.tycho:tycho-surefire-plugin:0.13.0:test (default-test) on
> project de.prototype.tests: There are test failures.
> [ERROR]
> [ERROR] Please refer to
> C:\Eclipse\Workspace\prototype\de.prototype.tests\target\surefire-reports for
> the individual test results.
> [ERROR] -> [Help 1]
> [ERROR]
> [ERROR] To see the full stack trace of the errors, re-run Maven with the
> -e switch.
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> [ERROR]
> [ERROR] For more information about the errors and possible solutions,
> please read the following articles:
> [ERROR] [Help 1]
> http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
>
> But there were no surefire-reports in that direction. In
> de.prototype.tests\target\classes\de\prototype\tests\ there can be found
> the Test-Class "OpenDialogTests.class"
> Is there anything wrong with the naming of the class, or what can I do
> to get the test run?
>
> Thanks in advance
>
> Best Regards
>
> DarkPhoenix
>
>
> _______________________________________________
> tycho-user mailing list
> tycho-user@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/tycho-user


Back to the top