Skip to main content
summaryrefslogtreecommitdiffstats
blob: 1cfcfb9568632c4d15ec3d6f9d0a4ab1948c9eff (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/*****************************************************************************
 * Copyright (c) 2014 CEA LIST.
 *
 * 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:
 *  Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
 *****************************************************************************/
package org.eclipse.papyrus.junit.utils;



/**
 * This class is used to configure a test job. In strict mode, all tests are executed.
 * When the strict mode is disabled, the tests which are known to be failing are ignored.
 *
 * This is useful for test-driven development, when tests are implemented before the feature:
 * we can still have "green builds" (by ignoring these specific tests) and test for non-regression.
 *
 * Usage: When a test is known to be failing, add: Assume.assumeTrue("Why the test is disabled", TestMode.isStrict());
 *
 * The test will be run only in strict mode, and ignored during non-regression testing
 * 
 * @author Camille Letavernier
 *
 */
public class TestMode {

	private static boolean strictMode = false;

	public static boolean isStrict() {
		return strictMode;
	}

	public static void setStrict(boolean strictMode) {
		TestMode.strictMode = strictMode;
	}

}

Back to the top