Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Writing tests for tests(How do you write working tests for JUnit Launches?)
Writing tests for tests [message #1279291] Fri, 28 March 2014 14:22
Ricardo Gladwell is currently offline Ricardo GladwellFriend
Messages: 12
Registered: July 2009
Location: London, UK
Junior Member

I'm trying to write an end-to-end test fixture using the Eclipse PDE JUnit runner to verify that a sample launch is running successfully. The following should fail:

    public void testTestRunner() throws Exception {
        // given
        TestTestRunListener testListener = new TestTestRunListener();
        ILaunchConfiguration configuration = launchManager.getLaunchConfiguration(project.getFile("test.launch"));
        BlockingProgressMonitor monitor = new BlockingProgressMonitor();

        // when
        configuration.launch(ILaunchManager.RUN_MODE, monitor);

        // then
        try {
        } catch (InterruptedException e) {

Note: not all code included for brevity, you can assume a simple implementation for BlockingProgressMonitor and TestTestRunListener.

I deliberately wrote a test fixture in the example project so it would fail with ane error but the unit test launch never seems to finish successfully, and seems stuck in "undefined" state.

How are other people writing JUnit PDE tests for their customised launches? Without mocking? Is the above not working due to threading issues with Mac OS X?
Previous Topic:Runtime failure to resolve plugin that is in
Next Topic:Quick Fix Event
Goto Forum:

Current Time: Sat May 26 06:14:58 GMT 2018

Powered by FUDForum. Page generated in 0.01757 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top