diff options
author | Matthew Khouzam | 2014-08-13 02:18:17 +0000 |
---|---|---|
committer | Matthew Khouzam | 2014-08-15 17:40:17 +0000 |
commit | 7201546d3177667fa786b8ee68cb8e1d89876d15 (patch) | |
tree | 269c70d8a887157e29c0ecd012b15d0815593ad0 | |
parent | 98f01c4a97cde31ed8ecf6aa8a54fcaada50cd7a (diff) | |
download | org.eclipse.linuxtools-7201546d3177667fa786b8ee68cb8e1d89876d15.tar.gz org.eclipse.linuxtools-7201546d3177667fa786b8ee68cb8e1d89876d15.tar.xz org.eclipse.linuxtools-7201546d3177667fa786b8ee68cb8e1d89876d15.zip |
tmf: initial pcap swtbot test
This test will verify that all the views are correctly spawned.
Change-Id: I30717970c4b1d453aef872bb34d5a2eb541f42ac
Signed-off-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Signed-off-by: Vincent Perot <vincent.perot@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/31488
Tested-by: Hudson CI
Reviewed-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
Tested-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
2 files changed, 59 insertions, 2 deletions
diff --git a/lttng/org.eclipse.linuxtools.tmf.pcap.ui.swtbot.tests/src/org/eclipse/linuxtools/tmf/pcap/ui/swtbot/tests/AllTests.java b/lttng/org.eclipse.linuxtools.tmf.pcap.ui.swtbot.tests/src/org/eclipse/linuxtools/tmf/pcap/ui/swtbot/tests/AllTests.java index d2409b622b..9018c8a10f 100644 --- a/lttng/org.eclipse.linuxtools.tmf.pcap.ui.swtbot.tests/src/org/eclipse/linuxtools/tmf/pcap/ui/swtbot/tests/AllTests.java +++ b/lttng/org.eclipse.linuxtools.tmf.pcap.ui.swtbot.tests/src/org/eclipse/linuxtools/tmf/pcap/ui/swtbot/tests/AllTests.java @@ -19,7 +19,8 @@ import org.junit.runners.Suite; * Test suite for UI on the PCAP parser and networking perspective */ @RunWith(Suite.class) -@Suite.SuiteClasses({}) +@Suite.SuiteClasses({ + NetworkPerspectiveChecker.class +}) public class AllTests { - } diff --git a/lttng/org.eclipse.linuxtools.tmf.pcap.ui.swtbot.tests/src/org/eclipse/linuxtools/tmf/pcap/ui/swtbot/tests/NetworkPerspectiveChecker.java b/lttng/org.eclipse.linuxtools.tmf.pcap.ui.swtbot.tests/src/org/eclipse/linuxtools/tmf/pcap/ui/swtbot/tests/NetworkPerspectiveChecker.java new file mode 100644 index 0000000000..1b355f979a --- /dev/null +++ b/lttng/org.eclipse.linuxtools.tmf.pcap.ui.swtbot.tests/src/org/eclipse/linuxtools/tmf/pcap/ui/swtbot/tests/NetworkPerspectiveChecker.java @@ -0,0 +1,56 @@ +/******************************************************************************* + * Copyright (c) 2014 Ericsson + * + * All rights reserved. This program and the accompanying materials are + * made available under the terms of the Eclipse Public License v1.0 which + * accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Matthew Khouzam - Initial API and implementation + *******************************************************************************/ + +package org.eclipse.linuxtools.tmf.pcap.ui.swtbot.tests; + +import java.util.ArrayList; +import java.util.Arrays; + +import org.eclipse.linuxtools.tmf.pcap.ui.NetworkingPerspectiveFactory; +import org.eclipse.linuxtools.tmf.pcap.ui.stream.StreamListView; +import org.eclipse.linuxtools.tmf.ui.swtbot.tests.AbstractPerspectiveChecker; +import org.eclipse.linuxtools.tmf.ui.views.colors.ColorsView; +import org.eclipse.linuxtools.tmf.ui.views.filter.FilterView; +import org.eclipse.linuxtools.tmf.ui.views.histogram.HistogramView; +import org.eclipse.linuxtools.tmf.ui.views.statistics.TmfStatisticsView; +import org.eclipse.ui.IPageLayout; +import org.junit.Before; + +/** + * Tracing perspective view checker + * + * @author Matthew Khouzam + */ +public class NetworkPerspectiveChecker extends AbstractPerspectiveChecker { + + /** + * Set up arrays for test + */ + @Before + public void init() { + fPerspectiveId = NetworkingPerspectiveFactory.ID; + fViewIds = new ArrayList<>(); + fViewIds.addAll(Arrays.asList(new String[] { + // TMF views + HistogramView.ID, + TmfStatisticsView.ID, + FilterView.ID, + ColorsView.ID, + // PCAP + StreamListView.ID, + // Standard Eclipse views + IPageLayout.ID_PROJECT_EXPLORER, + IPageLayout.ID_PROP_SHEET, + IPageLayout.ID_BOOKMARKS + })); + } +} |