tmf: initial pcap swtbot test
authorMatthew Khouzam <matthew.khouzam@ericsson.com>
Wed, 13 Aug 2014 02:18:17 +0000 (22:18 -0400)
committerMatthew Khouzam <matthew.khouzam@ericsson.com>
Fri, 15 Aug 2014 17:40:17 +0000 (13:40 -0400)
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>
org.eclipse.linuxtools.tmf.pcap.ui.swtbot.tests/src/org/eclipse/linuxtools/tmf/pcap/ui/swtbot/tests/AllTests.java
org.eclipse.linuxtools.tmf.pcap.ui.swtbot.tests/src/org/eclipse/linuxtools/tmf/pcap/ui/swtbot/tests/NetworkPerspectiveChecker.java [new file with mode: 0644]

index d2409b622b4e5212e0eb6f1f4272b9d4e9296754..9018c8a10f7c479dbde66cbc4c4bf802ade779ca 100644 (file)
@@ -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/org.eclipse.linuxtools.tmf.pcap.ui.swtbot.tests/src/org/eclipse/linuxtools/tmf/pcap/ui/swtbot/tests/NetworkPerspectiveChecker.java b/org.eclipse.linuxtools.tmf.pcap.ui.swtbot.tests/src/org/eclipse/linuxtools/tmf/pcap/ui/swtbot/tests/NetworkPerspectiveChecker.java
new file mode 100644 (file)
index 0000000..1b355f9
--- /dev/null
@@ -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
+        }));
+    }
+}
This page took 0.027118 seconds and 5 git commands to generate.