Add new custom test suite to run the SWTBot tests repeatedly
[deliverable/tracecompass.git] / releng / org.eclipse.tracecompass.alltests / src / org / eclipse / tracecompass / alltests / swtbot / SWTBotStressTests.java
diff --git a/releng/org.eclipse.tracecompass.alltests/src/org/eclipse/tracecompass/alltests/swtbot/SWTBotStressTests.java b/releng/org.eclipse.tracecompass.alltests/src/org/eclipse/tracecompass/alltests/swtbot/SWTBotStressTests.java
new file mode 100644 (file)
index 0000000..ddac4dc
--- /dev/null
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2015 EfficiOS Inc. and others
+ *
+ * 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:
+ *   Alexandre Montplaisir - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.tracecompass.alltests.swtbot;
+
+import junit.framework.JUnit4TestAdapter;
+import junit.framework.TestSuite;
+
+/**
+ * Run the {@link RunAllSWTBotTests} suite a lot of times, to catch flaky tests.
+ */
+public class SWTBotStressTests extends TestSuite {
+
+    private static final int NB_RUNS = 20;
+
+    /**
+     * @return Test suite definition
+     */
+    public static TestSuite suite() {
+        TestSuite s = new TestSuite();
+        for (int i = 0; i < NB_RUNS; i++) {
+            s.addTest(new JUnit4TestAdapter(RunAllSWTBotTests.class));
+        }
+        return s;
+    }
+}
\ No newline at end of file
This page took 0.025527 seconds and 5 git commands to generate.