Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-ui-dev] Running JUnit Plugin Tests on Gerrit

Thank you Mickael for that hint.

I changed the pom.xml see: https://git.eclipse.org/r/#/c/131114/3/tests/org.eclipse.ui.ide.application.tests/pom.xml

 

The build log now says:

09:44:08 [INFO] --- tycho-surefire-plugin:1.3.0-SNAPSHOT:test (default-test) @ org.eclipse.ui.ide.application.tests ---

-application, org.eclipse.tycho.surefire.osgibooter.uitest

 

But my test gets a NPE when doing

Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();

 

And now even IDEWorkbenchAdvisorTest fails.

 

What’s wrong?

 

Regards,

Matthias

 

From: <platform-ui-dev-bounces@xxxxxxxxxxx> on behalf of Mickael Istria <mistria@xxxxxxxxxx>
Reply-To: "Eclipse Platform UI component developers list." <platform-ui-dev@xxxxxxxxxxx>
Date: Thursday, 18. October 2018 at 16:44
To: "Eclipse Platform UI component developers list." <platform-ui-dev@xxxxxxxxxxx>
Subject: Re: [platform-ui-dev] Running JUnit Plugin Tests on Gerrit

 

Hi,

 

In the build log you can see

[INFO] --- tycho-surefire-plugin:1.3.0-SNAPSHOT:test (default-test) @ org.eclipse.ui.ide.application.tests ---
...
application, org.eclipse.tycho.surefire.osgibooter.headlesstest
...
Which shows that the application run to test this plugin is headless (no workbench).
If you need UI for your test, you need to tweak the configuration of Maven surefire plugin so the workbench is created: https://www.eclipse.org/tycho/sitedocs/tycho-surefire/tycho-surefire-plugin/test-mojo.html#useUIHarness
HTH

 

 


Back to the top