Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Test Architecture causes Dependency Cycle
Test Architecture causes Dependency Cycle [message #603825] Fri, 18 December 2009 16:16
Alexander Kreul is currently offline Alexander KreulFriend
Messages: 2
Registered: December 2009
Junior Member
Hi Community,

After adding Junit tests to our RCP Project, our PDE Build suddenly fails with the Error Message "A cycle was detected when generating the classpath PluginA, PluginB, PluginA"

After googling the error, I came to the solution that the newly added Unit Test-Architecture is causing the problem:
I was trying to use fragments to test the different plugins, due to the advantages it brings regarding access to package-private methods and not-exported packages.

However to setup a common test-environment, I also added a new Plugin which contains methods to create a Project, create GMF Diagrams, initializes PreferenceStores and so on. This was mainly to not repeat myself in every Junit Setup method that needs one of these functionalities.

So the added structure for the Test was PluginUnderTestA - TestFragmentA (using TestSetupPlugin); PluginUnderTestB - TestFragmentB (using TestSetupPlugin)

Since the TestSetupPlugin also calls Methods from other Plugins which related Testfragments call the TestSetupPlugin, the Build detects a cyclic dependency. Eclipse detected this as well when using the look for cycles functionality. The Automated Management of Dependencies solved this for Eclipse (it did not find cycles anymore) but the build still fails.

So my Question is:
Is there a possibility to switch off the dependency check for some plugins during the build or is there a better solution to setup my Unit tests?

Any help is appreciated,
Alex
Previous Topic:Test Architecture causes Dependency Cycle
Next Topic:PDE product export in 3.5
Goto Forum:
  


Current Time: Fri Mar 29 01:08:15 GMT 2024

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

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

Back to the top