Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] SWTBOT switch workspace problem

AFAIK switching the workspace in eclipse means low-level restart (I think the JVM dies and only the native launcher survives and relaunches the JVM with a different workspace)

This will break the tycho surefire test harness.

 

Therefore I would discourage switching workspace during test execution and try to find other solutions instead (separate test runs with different workspaces?)

 

Regards

Jan

 

From: tycho-user-bounces@xxxxxxxxxxx [mailto:tycho-user-bounces@xxxxxxxxxxx] On Behalf Of Mohamed Azab
Sent: Donnerstag, 9. August 2012 15:51
To: Tycho user list
Subject: [tycho-user] SWTBOT switch workspace problem

 

I am using SWTBOT with tycho-surfire to test an eclipse application. The tests runs individually fine, but when I combine them I need to switch the workspace after each test, or specify somehow a specific workspace for each test. When I try to switch the workspace from inside the test with this code:

 
bot.menu("File").menu("Switch Workspace").menu("Other...").click();
bot.shell("Workspace Launcher").activate();
String workspace = bot.comboBoxWithLabel("Workspace:").getText() + "/ResetButtonTest";
bot.comboBoxWithLabel("Workspace:").setText(workspace);
bot.button("OK").click();

the simulator reaches the OK button and press it, the workbench closes but never starts again. There was an error asking to set the property eclipse.vm, and I did. The error is gone but still can not switch the workspace.

Is there any configuration file or something that I can add to tyco-surfire to configure SWTBot to have a specific workspace for each test it runs? Or even to run each test in a new workbench, and not to continue in the same workbench? Or is there any solution that fixes the problem of switching the workspace from inside the test?

 

Regards,

Mohamed Azab


Back to the top