Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] Running UI tests without starting a full-blown workbench

Hi Mikael,,

thanks for your suggestions.

> Do you think your tests would work with the regular surefire:test
> application (plain Java, no OSGi, no Eclipse Launcher)? That would be
> what gives the best performance if you can achieve it.

I still need to have an OSGi runtime, due to Bundle-Classpath manifest
entries and multiple versions of the same dependency on the "classpath",
so using the maven-surefire-plugin is not an option, I'm afraid.

>Trying it is only
> a matter of invoking the maven-surefire-plugin:test mojo in your pom.xml.
> Do you also set the "useUIHarness" to true? I think this flag would
> immediately start a workbench, so for your case, it should probably be
> false (and you test should take care of starting the Display).

Starting the display in the test code can be done fairly unobtrusively

> 	@BeforeClass
> 	public static void setUpDisplay() {
> 		display = new Display();
> 	}
> 
> 	@AfterClass
> 	public static void tearDownDisplay() {
> 		display.dispose();
> 	}

but I couldn't get the display.readAndDispatch()/display.sleep() loop to
work.

Next I tried setting up my own dummy IApplication and registering it in
my UI test's fragment.xml, but despite configuring the <application>
with the tych-surefire-plugin, the plugin cannot find it:

>  Could not find application "org.example.application" in the test runtime. Make sure that the test runtime includes the bundle which defines this application.

Any idea what I am doing wrong?

Best wishes,

Andreas

-- 
Dr. Andreas Sewe | sewe@xxxxxxx | +49 152 56342856
CQSE GmbH | Centa-Hafenbraedl-Strasse 59 | 81249 Muenchen | www.cqse.eu
Amtsgericht Muenchen | HRB 177678 | GF: F. Deissenboeck, M. Feilkas

Attachment: signature.asc
Description: OpenPGP digital signature


Back to the top