Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mdt-papyrus.dev] Test Execution & Blocking Dialogs

One place this currently happens is in tests for extra plugins where the C++ generator test suite sets a system property
for this reason.  The implementation is very much a one-off, but it would be nice to have something similar as a
generalized capability.

The property is set in CppCodegenTest (in tests/junit/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen.tests) with:

public class CppCodegenTest {

	static {
		// This system property avoids opening dialogs during Papyrus operations.  It must
		// be set before trying to load any of the Papyrus classes.
		System.setProperty("papyrus.run-headless", Boolean.TRUE.toString());
	}

This property is explicitly checked around parts of the implementation that could open a dialog.  E.g., in
LocateCppProject (in extraplugins/codegen/org.eclipse.papyrus.cpp.codegen.ui):

	private static final boolean Headless = Boolean.getBoolean("papyrus.run-headless");

	// Later ...

	if( Headless )
		model.create( null );
	else
		create-with-dialog

In a generalized implementation it would be nice if there where a method that could avoid these explicit checks.

-Andrew

On 15-04-21 04:35 AM, LETAVERNIER Camille wrote:
> Hi all,
> 
>  
> 
> Currently, we’re using the @InteractiveTest annotation to skip (ignore) tests which would open a dialog on Hudson. The
> plan was to implement a constant/parameter to specify that, during test execution, such dialogs should never be opened
> (A default behavior should be chosen instead).
> 
> 
> I’m pretty sure that such a parameter/constant has already been implemented in some of the test plug-ins, but I can’t
> remember where/when this has been done.
> 
>  
> 
> Before implementing yet another constant [1], does anyone remember implementing such a Constant/Parameter to avoid
> opening blocking dialogs during test execution? If so, where it is? Can it be generalized to the Papyrus Test Framework,
> or was it specific to a single use case?
> 
>  
> 
> [1] 465025: [Usability] All drops from model explorer now show a pop-up menu
> 
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=465025
> 
>  
> 
> Camille
> 
> 
> 
> _______________________________________________
> mdt-papyrus.dev mailing list
> mdt-papyrus.dev@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe from this list, visit
> https://dev.eclipse.org/mailman/listinfo/mdt-papyrus.dev
> 



Back to the top