diff options
| author | Florian Barbin | 2014-12-12 10:55:21 +0000 |
|---|---|---|
| committer | Florian Barbin | 2014-12-12 13:55:23 +0000 |
| commit | 6fb1939a347798fe9f2ca6c3e090568e90fc5c72 (patch) | |
| tree | 11cceed0372a68f0b25d526d03bbc235b05c0ecc | |
| parent | 133fa3ef5b6f8e858d26dffdf1991fb6f0af717c (diff) | |
| download | org.eclipse.sirius-6fb1939a347798fe9f2ca6c3e090568e90fc5c72.tar.gz org.eclipse.sirius-6fb1939a347798fe9f2ca6c3e090568e90fc5c72.tar.xz org.eclipse.sirius-6fb1939a347798fe9f2ca6c3e090568e90fc5c72.zip | |
[454902] Configure new test suites for gerrit.
Bug: 454902
Change-Id: I05b04b43efa0c4c8ac304c2043d38755c94521a5
Signed-off-by: Florian Barbin <florian.barbin@obeo.fr>
7 files changed, 222 insertions, 6 deletions
diff --git a/packaging/org.eclipse.sirius.tests.parent/pom.xml b/packaging/org.eclipse.sirius.tests.parent/pom.xml index 12606cc5fd..b774fe6d30 100644 --- a/packaging/org.eclipse.sirius.tests.parent/pom.xml +++ b/packaging/org.eclipse.sirius.tests.parent/pom.xml @@ -137,6 +137,18 @@ <tests.vmargs>${tests.vmargs.mac} -Xmx1024m -XX:MaxPermSize=256m -XX:+HeapDumpOnOutOfMemoryError</tests.vmargs> </properties> </profile> + <profile> + <id>gerrit-junit</id> + <activation> + <activeByDefault>false</activeByDefault> + </activation> + <properties> + <tests.junit.skip>false</tests.junit.skip> + <tests.timeout>${tests.timeout.junit}</tests.timeout> + <tests.junit.include>%regex[org/eclipse/sirius/tests/suite/(tree/AllSiriusTestSuite|GerritJUnitSuite)\.class]</tests.junit.include> + <tests.vmargs>${tests.vmargs.mac} -Xmx1024m -XX:MaxPermSize=256m -XX:+HeapDumpOnOutOfMemoryError</tests.vmargs> + </properties> + </profile> <profile> <id>swtbot</id> <activation> @@ -174,6 +186,18 @@ </properties> </profile> <profile> + <id>gerrit-swtbot</id> + <activation> + <activeByDefault>false</activeByDefault> + </activation> + <properties> + <tests.swtbot.skip>false</tests.swtbot.skip> + <tests.timeout>${tests.timeout.swtbot}</tests.timeout> + <tests.swtbot.include>org/eclipse/sirius/tests/swtbot/suite/GerritSWTBotSuite.class</tests.swtbot.include> + <tests.vmargs>${tests.vmargs.mac} -Xmx2048m -XX:MaxPermSize=256m -XX:+HeapDumpOnOutOfMemoryError</tests.vmargs> + </properties> + </profile> + <profile> <id>swtbot-sequence</id> <activation> <activeByDefault>false</activeByDefault> @@ -185,6 +209,18 @@ <tests.vmargs>${tests.vmargs.mac} -Xmx2048m -XX:MaxPermSize=256m -XX:+HeapDumpOnOutOfMemoryError</tests.vmargs> </properties> </profile> + <profile> + <id>gerrit-swtbot-sequence</id> + <activation> + <activeByDefault>false</activeByDefault> + </activation> + <properties> + <tests.swtbot.skip>false</tests.swtbot.skip> + <tests.timeout>${tests.timeout.swtbot-sequence}</tests.timeout> + <tests.swtbot-sequence.include>org/eclipse/sirius/tests/swtbot/suite/GerritSequenceSWTBotSuite.class</tests.swtbot-sequence.include> + <tests.vmargs>${tests.vmargs.mac} -Xmx2048m -XX:MaxPermSize=256m -XX:+HeapDumpOnOutOfMemoryError</tests.vmargs> + </properties> + </profile> </profiles> </project> diff --git a/plugins/org.eclipse.sirius.tests.junit/src/org/eclipse/sirius/tests/suite/AllSiriusTestSuite.java b/plugins/org.eclipse.sirius.tests.junit/src/org/eclipse/sirius/tests/suite/AllSiriusTestSuite.java index 3a9b6e1f76..e859dbc0b3 100644 --- a/plugins/org.eclipse.sirius.tests.junit/src/org/eclipse/sirius/tests/suite/AllSiriusTestSuite.java +++ b/plugins/org.eclipse.sirius.tests.junit/src/org/eclipse/sirius/tests/suite/AllSiriusTestSuite.java @@ -34,13 +34,23 @@ public class AllSiriusTestSuite extends TestCase { } /** + * Add the gerrit part of the Junit tests to the specified suite. + * + * @param suite + * the suite into which to add the tests. + */ + public static void addGerritPart(TestSuite suite) { + suite.addTest(AllCommonStandaloneTests.suite()); + } + + /** * Creates the {@link junit.framework.TestSuite TestSuite} for all the test. * * @return The testsuite containing all the tests */ public static Test suite() { final TestSuite suite = new TestSuite("Sirius tests"); - suite.addTest(AllCommonStandaloneTests.suite()); + addGerritPart(suite); suite.addTest(AllTableStandaloneTests.suite()); suite.addTest(AllDiagramStandaloneTests.suite()); diff --git a/plugins/org.eclipse.sirius.tests.junit/src/org/eclipse/sirius/tests/suite/GerritJUnitSuite.java b/plugins/org.eclipse.sirius.tests.junit/src/org/eclipse/sirius/tests/suite/GerritJUnitSuite.java new file mode 100644 index 0000000000..a2510687b0 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.junit/src/org/eclipse/sirius/tests/suite/GerritJUnitSuite.java @@ -0,0 +1,45 @@ +/******************************************************************************* + * Copyright (c) 2014 Obeo. + * 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: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.sirius.tests.suite; + +import junit.framework.Test; +import junit.framework.TestCase; +import junit.framework.TestSuite; +import junit.textui.TestRunner; + +/** + * Sirius Gerrit Junit Tests. + * + * @author fbarbin + */ +public class GerritJUnitSuite extends TestCase { + + /** + * Launches the test with the given arguments. + * + * @param args + * Arguments of the testCase. + */ + public static void main(final String[] args) { + TestRunner.run(suite()); + } + + /** + * Creates the {@link junit.framework.TestSuite TestSuite} for all the test. + * + * @return The testsuite containing all the tests + */ + public static Test suite() { + TestSuite suite = new TestSuite("Sirius Gerrit JUnit Tests"); + AllSiriusTestSuite.addGerritPart(suite); + return suite; + } +} diff --git a/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/suite/AllTestSuite.java b/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/suite/AllTestSuite.java index 322b1ddcbf..fc67434c23 100644 --- a/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/suite/AllTestSuite.java +++ b/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/suite/AllTestSuite.java @@ -88,6 +88,29 @@ public class AllTestSuite extends TestCase { } /** + * Add the first part of the SWTbot Gerrit tests to the specified suite. + * + * @param suite + * the suite into which to add the tests. + */ + public static void addGerritPart1(TestSuite suite) { + // TheViepointProjectCreationTest should be done before the others ones: + // to verify the behavior when a specifier first launches the product. + suite.addTestSuite(ViewpointSpecificationProjectCreationTest.class); + } + + /** + * Add the second part of the SWTbot Gerrit tests to the specified suite. + * + * @param suite + * the suite into which to add the tests. + */ + public static void addGerritPart2(TestSuite suite) { + + suite.addTestSuite(NoteCreationTest.class); + } + + /** * Add the first part of the SWTbot tests to the specified suite. This * corresponds roughly to the first half of the execution time of the * complete suite. @@ -96,9 +119,8 @@ public class AllTestSuite extends TestCase { * the suite into which to add the tests. */ public static void addPart1(TestSuite suite) { - // TheViepointProjectCreationTest should be done before the others ones: - // to verify the behavior when a specifier first launches the product. - suite.addTestSuite(ViewpointSpecificationProjectCreationTest.class); + + addGerritPart1(suite); suite.addTestSuite(ContentAssistTest.class); suite.addTestSuite(MetamodelPropertyTabTests.class); @@ -197,7 +219,8 @@ public class AllTestSuite extends TestCase { * the suite into which to add the tests. */ public static void addPart2(TestSuite suite) { - suite.addTestSuite(NoteCreationTest.class); + + addGerritPart2(suite); suite.addTestSuite(NoteCreationWithSnapToGridTest.class); suite.addTestSuite(NodeCreationTest.class); suite.addTestSuite(NodeCreationWithSnapToGridTest.class); diff --git a/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/suite/GerritSWTBotSuite.java b/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/suite/GerritSWTBotSuite.java new file mode 100644 index 0000000000..a24117a53e --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/suite/GerritSWTBotSuite.java @@ -0,0 +1,46 @@ +/******************************************************************************* + * Copyright (c) 2014 Obeo. + * 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: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.sirius.tests.swtbot.suite; + +import junit.framework.Test; +import junit.framework.TestCase; +import junit.framework.TestSuite; +import junit.textui.TestRunner; + +/** + * Sirius Gerrit SWTBot Tests. + * + * @author fbarbin + */ +public class GerritSWTBotSuite extends TestCase { + + /** + * Launches the test with the given arguments. + * + * @param args + * Arguments of the testCase. + */ + public static void main(final String[] args) { + TestRunner.run(suite()); + } + + /** + * Creates the {@link junit.framework.TestSuite TestSuite} for all the test. + * + * @return The testsuite containing all the tests + */ + public static Test suite() { + TestSuite suite = new TestSuite("Sirius Gerrit SWTBot Tests"); + AllTestSuite.addGerritPart1(suite); + AllTestSuite.addGerritPart2(suite); + return suite; + } +} diff --git a/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/suite/GerritSequenceSWTBotSuite.java b/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/suite/GerritSequenceSWTBotSuite.java new file mode 100644 index 0000000000..569c3c0918 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/suite/GerritSequenceSWTBotSuite.java @@ -0,0 +1,45 @@ +/******************************************************************************* + * Copyright (c) 2014 Obeo. + * 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: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.sirius.tests.swtbot.suite; + +import junit.framework.Test; +import junit.framework.TestCase; +import junit.framework.TestSuite; +import junit.textui.TestRunner; + +/** + * Sirius Gerrit Sequence SWTBot Tests. + * + * @author fbarbin + */ +public class GerritSequenceSWTBotSuite extends TestCase { + + /** + * Launches the test with the given arguments. + * + * @param args + * Arguments of the testCase. + */ + public static void main(final String[] args) { + TestRunner.run(suite()); + } + + /** + * Creates the {@link junit.framework.TestSuite TestSuite} for all the test. + * + * @return The testsuite containing all the tests + */ + public static Test suite() { + TestSuite suite = new TestSuite("Sirius Gerrit Sequence SWTBot Tests"); + SequenceSwtBotTestSuite.addGerritPart(suite); + return suite; + } +} diff --git a/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/suite/SequenceSwtBotTestSuite.java b/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/suite/SequenceSwtBotTestSuite.java index 800c0d9c4d..a7b80979ca 100644 --- a/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/suite/SequenceSwtBotTestSuite.java +++ b/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/suite/SequenceSwtBotTestSuite.java @@ -98,13 +98,24 @@ public class SequenceSwtBotTestSuite extends TestCase { } /** + * Add the gerrit part of the Sequence tests to the specified suite. + * + * @param suite + * the suite into which to add the tests. + */ + public static void addGerritPart(TestSuite suite) { + suite.addTestSuite(InstanceRoleResizableEditPolicyTests.class); + } + + /** * Creates the {@link junit.framework.TestSuite TestSuite} for all the test. * * @return The test suite containing all the tests */ public static Test suite() { final TestSuite suite = new TestSuite("SwtBot tests on sequence diagram"); - suite.addTestSuite(InstanceRoleResizableEditPolicyTests.class); + + addGerritPart(suite); suite.addTestSuite(SequenceReorderTest.class); suite.addTestSuite(SequenceDiagramDirtyTests.class); suite.addTestSuite(SequenceOpeningFilteredEventEndsTests.class); |
