Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[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