Skip to content

Split Eclipse test health check and advanced health check utils #1686

@jan-vcapgemini

Description

@jan-vcapgemini

Currently we run a health check and react on it with an advanced health check.

public static void runAndCaptureHealthCheck(SWTWorkbenchBot bot) throws Exception {
ResourcesPlugin.getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, new NullProgressMonitor());
bot.waitUntil(new AllJobsAreFinished(), DEFAULT_TIMEOUT); // build might take some time
SWTBotView view = bot.viewById(JavaUI.ID_PACKAGES);
view.bot().tree().expandNode("CobiGen_Templates").select().contextMenu("CobiGen").menu("Health Check...").click();
captureAdvancedHealthCheck(bot);

private static void captureAdvancedHealthCheck(SWTWorkbenchBot bot) {
bot.waitUntil(new AnyShellIsActive(CobiGenDialogConstants.HealthCheckDialogs.DIALOG_TITLE), DEFAULT_TIMEOUT);
takeScreenshot(bot, "healthCheck");
SWTBotShell healthCheckDialog = bot.shell(CobiGenDialogConstants.HealthCheckDialogs.DIALOG_TITLE);
healthCheckDialog.bot().button(CobiGenDialogConstants.HealthCheckDialogs.ADVANCED_DIALOG_TITLE).click();
bot.waitUntil(new AnyShellIsActive(CobiGenDialogConstants.HealthCheckDialogs.ADVANCED_DIALOG_TITLE),
DEFAULT_TIMEOUT);
takeScreenshot(bot, "advancedHealthCheck");
SWTBotShell advancedHealthCheckDialog = bot.shell(CobiGenDialogConstants.HealthCheckDialogs.ADVANCED_DIALOG_TITLE);
advancedHealthCheckDialog.bot().button("OK");
advancedHealthCheckDialog.bot().button("OK");

Instead we should handle both health checks individually.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions