How does SWTBOT run a custom eclipse based application? I don't know how to specify my target application

StackOverflow https://stackoverflow.com/questions/13654441

Question

I have an eclipse based application. I have heard of swtbot however I am having a hard time understanding how exactly does this tool run my application and how would I specify that. This eclipse based application has an executable and various configuration/plugin/features files. I have done the tutorials about swtbot and I have successfully completed them but they all just create a template application to test on.

Is this even possible? If not do you guys have any alternatives for UI automation testing on eclipse based apps?

Thanks.

Was it helpful?

Solution

Aha, seems like I might have found the answer.

From http://swtbot.com/user-guide/download-and-install.html:

By default, Eclipse is configured to use itself as the target platform which gives your RCP plug-ins potential access to everything loaded in your IDE. This is called self hosting.

When self hosting, you install all the required plug-ins SWTBot IDE Support, SWTBot Eclipse Features, SWTBot JUnit 4.x Headless Execution. SWTBot IDE Support is needed only in the IDE while the others are required in the target platform. Because the target platform is the same as your IDE you would need to install of of them!

If you need to develop against additional plug-ins, you must install those plug-ins in the target platform. This is why SWTBot Eclipse Features, SWTBot JUnit 4.x Headless Execution are installed in the target platform, while SWTBot IDE Support is installed only in the IDE. You can configure your target platform using the Target Platform Preference Page accessible using Window > Preferences… > Plug-in Development > Target Platform

I tried it with my application, added the whole eclipse folder and also included the dependencies and plug ins and voila it worked. I ran a couple of unit tests on some UI components and it's responsive and passing all the unit tests.

Thanks guys

OTHER TIPS

I am not sure about SWTBot, but Jubula works with standalone applications (see http://jmhofer.johoop.de/?p=97 and start with "So, Jubula has to somehow hook itself into our RCP application"), and WindowTester Pro does too.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top