Community
Participate
Working Groups
Build Identifier: In the eclipse IDE, I can select to clear or not to clear the workspace area before launching a UI test. This should also be possible with Tycho, but currently, it is not. TestMojo always clears the workspace area ("target/work" by default) before executing the test cases. I would like to inject pre-generated settings (.prefs files) for my plug-ins under test, so I tried to copy them during the pre-integration-test phase to target/work/data/.metadata/.plugins/org.eclipse.core.runtime/.settings/<pluginname>.prefs. But as target/work is cleared by TestMojo.runTest(), the UI starts with empty preferences for the plug-ins. Reproducible: Always
Created attachment 203055 [details] A simple patch implementing the requested feature, including an integration test project The attached patch implements the feature using a new property, "clearWork", which by default is set to true (to keep default behaviour). runTest() only deletes the work directory if this flag is set to true. Also I included an integration test project to test this new feature.
Created attachment 203057 [details] Patch, shortened by two files The previous patch contained two files which do not have to be changed for this feature... Sorry for that!
FYI, I believe -pluginCustomization eclipse runtime option provides a better way to inject preferences. http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fmisc%2Fruntime-options.html
(In reply to comment #3) Hi Igor, thank you - Indeed, that works like a charm... Shame on me... But still, the feature *could* be useful... If you have a complete project or similar which you want to copy to the workspace before starting the test cases. Well, if you need it - it's here ;-)
*** This bug has been marked as a duplicate of bug 401288 ***