Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion tests/org.eclipse.ui.tests.harness/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ Require-Bundle: org.eclipse.ui;bundle-version="3.208.0",
org.eclipse.core.resources
Bundle-ActivationPolicy: lazy
Import-Package: org.junit.jupiter.api;version="[5.0.0,6.0.0)",
org.junit.jupiter.api.extension;version="[5.0.0,6.0.0)"
org.junit.jupiter.api.extension;version="[5.0.0,6.0.0)",
org.junit.platform.engine;version="[1.14.0,2.0.0)",
org.junit.platform.launcher;version="[1.14.0,2.0.0)"
Export-Package: org.eclipse.ui.tests.harness,
org.eclipse.ui.tests.harness.tests,
org.eclipse.ui.tests.harness.util,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/*******************************************************************************
* Copyright (c) 2026 Simeon Andreev and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Simeon Andreev - initial API and implementation
*******************************************************************************/
package org.eclipse.ui.tests.harness.util;

import org.eclipse.core.runtime.Status;
import org.eclipse.ui.internal.UIPlugin;
import org.junit.platform.engine.TestExecutionResult;
import org.junit.platform.launcher.TestExecutionListener;
import org.junit.platform.launcher.TestIdentifier;

/**
* Logs tests start and end.
*/
public class LogTestListener implements TestExecutionListener {

@Override
public void executionStarted(TestIdentifier id) {
logInfo(id.getDisplayName() + " STARTING");
}

@Override
public void executionFinished(TestIdentifier id, TestExecutionResult result) {
logInfo(id.getDisplayName() + " DONE: " + result.getStatus());
}

private static void logInfo(String message) {
UIPlugin.getDefault().getLog().log(Status.info(message));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,15 @@
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.WorkbenchException;
import org.eclipse.ui.tests.harness.util.TestRunLogUtil;
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TestWatcher;

/**
* A set of tests for multiple monitor situations that ensures interactions are
* isolated to the respective window.
*/
public class MultipleWindowsTest {
@Rule
public TestWatcher LOG_TESTRUN = TestRunLogUtil.LOG_TESTRUN;

IWorkbench wb;
IWorkbenchWindow win1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,10 @@
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.swt.widgets.Control;
import org.eclipse.ui.dialogs.PatternFilter;
import org.eclipse.ui.tests.harness.util.TestRunLogUtil;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TestWatcher;

public class PatternFilterTest {
@Rule
public TestWatcher LOG_TESTRUN = TestRunLogUtil.LOG_TESTRUN;

private class MockViewer extends ContentViewer {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,12 @@
import org.eclipse.ui.internal.ide.registry.MarkerHelpRegistry;
import org.eclipse.ui.internal.ide.registry.MarkerHelpRegistryReader;
import org.eclipse.ui.internal.ide.registry.MarkerQuery;
import org.eclipse.ui.tests.harness.util.TestRunLogUtil;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TestWatcher;

/**
* The test class for {@link MarkerHelpRegistryReader}.
*/
public class MarkerHelpRegistryReaderTest {
@Rule
public TestWatcher LOG_TESTRUN = TestRunLogUtil.LOG_TESTRUN;

/**
* Tests if the matchChildren flag of the contributions to the markerHelp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,14 @@
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.ui.internal.ide.registry.MarkerHelpRegistry;
import org.eclipse.ui.internal.ide.registry.MarkerHelpRegistryReader;
import org.eclipse.ui.tests.harness.util.TestRunLogUtil;
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TestWatcher;

/**
* The test class for {@link MarkerHelpRegistry}.
*/
public class MarkerHelpRegistryTest {
@Rule
public TestWatcher LOG_TESTRUN = TestRunLogUtil.LOG_TESTRUN;

static final String ATT_HELP_CONTEXT = "helpContext";
static final String ATT_HAS_HELP = "hasHelp";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,14 @@
import org.eclipse.core.resources.IWorkspaceRoot;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.ui.internal.ide.registry.MarkerQuery;
import org.eclipse.ui.tests.harness.util.TestRunLogUtil;
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TestWatcher;

/**
* The test class for {@link MarkerQuery}.
*/
public class MarkerQueryTest {
@Rule
public TestWatcher LOG_TESTRUN = TestRunLogUtil.LOG_TESTRUN;

private IMarker marker;
private IMarker child_marker;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,23 +35,18 @@
import org.eclipse.ui.commands.ICommandService;
import org.eclipse.ui.internal.themes.ColorsAndFontsPreferencePage;
import org.eclipse.ui.part.FileEditorInput;
import org.eclipse.ui.tests.harness.util.TestRunLogUtil;
import org.eclipse.ui.texteditor.AbstractTextEditor;
import org.junit.After;
import org.junit.Assert;
import org.junit.Assume;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TestWatcher;

/**
* @since 3.11
*/
public class ZoomAndPreferencesFontTest {
@Rule
public TestWatcher LOG_TESTRUN = TestRunLogUtil.LOG_TESTRUN;

private static IProject project;
private static IFile file;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,10 @@
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.ui.internal.progress.JobInfo;
import org.eclipse.ui.internal.progress.JobSnapshot;
import org.eclipse.ui.tests.harness.util.TestRunLogUtil;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TestWatcher;

public class JobInfoTest {
@Rule
public TestWatcher LOG_TESTRUN = TestRunLogUtil.LOG_TESTRUN;


/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,9 @@
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.ui.internal.progress.JobInfo;
import org.eclipse.ui.internal.progress.JobSnapshot;
import org.eclipse.ui.tests.harness.util.TestRunLogUtil;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TestWatcher;

public class JobInfoTestOrdering {
@Rule
public TestWatcher LOG_TESTRUN = TestRunLogUtil.LOG_TESTRUN;

/**
* Test that checks when jobs sorted by their state, the running ones
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,11 @@
import org.eclipse.ui.internal.progress.ProgressManager;
import org.eclipse.ui.internal.progress.ProgressRegion;
import org.eclipse.ui.progress.IProgressConstants;
import org.eclipse.ui.tests.harness.util.TestRunLogUtil;
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TestWatcher;

public class ProgressAnimationItemTest {
@Rule
public TestWatcher LOG_TESTRUN = TestRunLogUtil.LOG_TESTRUN;

private Shell shell;
private ProgressAnimationItem animationItem;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,9 @@
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.tests.harness.util.TestRunLogUtil;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TestWatcher;
import org.osgi.framework.Bundle;
import org.osgi.framework.FrameworkUtil;

Expand All @@ -47,8 +44,6 @@
*/

public class PluginActivationTests {
@Rule
public TestWatcher LOG_TESTRUN = TestRunLogUtil.LOG_TESTRUN;

private static List<String> NOT_ACTIVE_BUNDLES = List.of(
"org.apache.xerces",
Expand Down
1 change: 1 addition & 0 deletions tests/org.eclipse.ui.tests/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ Import-Package: jakarta.annotation,
org.junit.jupiter.api;version="[5.14.0,6.0.0)",
org.junit.jupiter.api.extension;version="[5.14.0,6.0.0)",
org.junit.jupiter.api.function;version="[5.14.0,6.0.0)",
org.junit.platform.launcher;version="[1.14.0,2.0.0)",
org.junit.platform.suite.api;version="[1.14.0,2.0.0)",
org.osgi.service.event
Eclipse-AutoStart: true
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
org.eclipse.ui.tests.harness.util.LogTestListener
Loading