Je commence à utiliser SWTBot pour tester mon application Eclipse RCP v4.Comment lier une partie d'une application RCP à SWTBot?
Ceci est mon code, pour obtenir une pièce via un identifiant et l'activer.
protected static void openPart(final String id) {
Display.getDefault().syncExec(new Runnable() {
public void run() {
EPartService partService = E4Workbench.getServiceContext().getActiveLeaf().get(EPartService.class);
MPart part = partService.findPart(id);
partService.activate(part);
}
});
}
Ceci est mes tests. Et ça ne fonctionne pas ...
@Test
public void test1() {
openPart("testmaker.part.gauche");
bot.tree().getTreeItem("hju/PQT").expand();
}
@Test
public void test2() {
openPart("testmaker.part.stepRightSide");
bot.button("Add Comment").click();
}
Je ne sais pas comment lier mon private static SWTBot bot;
avec ma RCP partie.
J'ai déjà essayé avec bot.viewby...(name/id/etc).show();
, cela ne fonctionne pas.
Ceci est mon application RCP:
Est-ce que quelqu'un peut me aider à utiliser une application avec rcp SWTBot?