Bug 248924 - [plug-in registry] pde.runtime unit tests
Summary: [plug-in registry] pde.runtime unit tests
Status: RESOLVED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.0   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: 3.5 M3   Edit
Assignee: Chris Aniszczyk CLA
QA Contact:
URL:
Whiteboard:
Keywords: bugday, helpwanted
Depends on:
Blocks: 81322
  Show dependency tree
 
Reported: 2008-09-29 06:51 EDT by Jacek Pospychala CLA
Modified: 2008-10-23 14:57 EDT (History)
0 users

See Also:


Attachments
org.eclipse.pde.runtime.tests.zip (16.13 KB, application/octet-stream)
2008-10-23 09:55 EDT, Jacek Pospychala CLA
no flags Details
org.eclipse.pde.runtime.tests.zip (16.13 KB, application/octet-stream)
2008-10-23 09:55 EDT, Jacek Pospychala CLA
no flags Details
patch (5.17 KB, patch)
2008-10-23 09:56 EDT, Jacek Pospychala CLA
caniszczyk: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jacek Pospychala CLA 2008-09-29 06:51:49 EDT
Similarly to bug 248508 for error log view, unit tests for pde.runtime may be of great benefit for everybody: plug-in maintainers as well as others who'd like to extend or reuse it.
Comment 1 Jacek Pospychala CLA 2008-10-23 09:55:30 EDT
Created attachment 115930 [details]
org.eclipse.pde.runtime.tests.zip

source code of tests plugin. It contains 3 classes:
AbstractRegistyModelTest - unit tests for registry model, independent from backend
LocalModelTest - run AbstractRegistryModelTests on Local backend
TestUtils - util classes used i unit tests

Additionally testplugins directory contains a simple plug-in that's used during install/uninstall to generate some real notifications from OSGi.
Comment 2 Jacek Pospychala CLA 2008-10-23 09:55:35 EDT
Created attachment 115931 [details]
org.eclipse.pde.runtime.tests.zip

source code of tests plugin. It contains 3 classes:
AbstractRegistyModelTest - unit tests for registry model, independent from backend
LocalModelTest - run AbstractRegistryModelTests on Local backend
TestUtils - util classes used i unit tests

Additionally testplugins directory contains a simple plug-in that's used during install/uninstall to generate some real notifications from OSGi.
Comment 3 Jacek Pospychala CLA 2008-10-23 09:56:59 EDT
Created attachment 115932 [details]
patch

Patch to pde.runtime, that makes all tests should pass.
I've found this issues when creating junit tests.
Comment 4 Jacek Pospychala CLA 2008-10-23 09:57:58 EDT
Tests give 48% coverage to pde.runtime.model package which contains all the logic behind the view.
Comment 5 Chris Aniszczyk CLA 2008-10-23 14:55:44 EDT
done.

> 20081023

Thanks Jacek! I moved and refactored the tests to live in the org.eclipse.pde.ui.tests plug-in.