<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Testing Plug-ins with Fragments</title>
	<atom:link href="http://www.modumind.com/2007/06/20/unit-testing-plug-ins-with-fragments/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.modumind.com/2007/06/20/unit-testing-plug-ins-with-fragments/</link>
	<description>Eclipse RCP and OSGi training - online or onsite</description>
	<lastBuildDate>Tue, 27 Jul 2010 15:47:44 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: Patrick</title>
		<link>http://www.modumind.com/2007/06/20/unit-testing-plug-ins-with-fragments/comment-page-1/#comment-9416</link>
		<dc:creator>Patrick</dc:creator>
		<pubDate>Wed, 23 Jun 2010 18:06:42 +0000</pubDate>
		<guid isPermaLink="false">http://rcpquickstart.wordpress.com/2007/06/20/unit-testing-plug-ins-with-fragments/#comment-9416</guid>
		<description>Hi Yudi,

The best place to start with PDE Build would be to get a sample build going. I&#039;ve got two on this site, one without JUnit testing and one with:

http://rcpquickstart.com/2007/06/06/getting-started-with-pde-build/
http://www.modumind.com/2007/08/06/running-automated-tests-with-pde-build/

My suggestion would be to get one or both of these builds running and play with the configurations to see how they work. I&#039;m sorry to say that I don&#039;t have any experience with TeamCity, but if as you say it can launch ANT scripts then it should work fine with PDE Build.

Let me know if you have any questions while you&#039;re setting up the builds. I&#039;d be happy to help.

--- Patrick</description>
		<content:encoded><![CDATA[<p>Hi Yudi,</p>
<p>The best place to start with PDE Build would be to get a sample build going. I&#8217;ve got two on this site, one without JUnit testing and one with:</p>
<p><a href="http://rcpquickstart.com/2007/06/06/getting-started-with-pde-build/" rel="nofollow">http://rcpquickstart.com/2007/06/06/getting-started-with-pde-build/</a><br />
<a href="http://www.modumind.com/2007/08/06/running-automated-tests-with-pde-build/" rel="nofollow">http://www.modumind.com/2007/08/06/running-automated-tests-with-pde-build/</a></p>
<p>My suggestion would be to get one or both of these builds running and play with the configurations to see how they work. I&#8217;m sorry to say that I don&#8217;t have any experience with TeamCity, but if as you say it can launch ANT scripts then it should work fine with PDE Build.</p>
<p>Let me know if you have any questions while you&#8217;re setting up the builds. I&#8217;d be happy to help.</p>
<p>&#8212; Patrick</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Yudi Xue</title>
		<link>http://www.modumind.com/2007/06/20/unit-testing-plug-ins-with-fragments/comment-page-1/#comment-9409</link>
		<dc:creator>Yudi Xue</dc:creator>
		<pubDate>Wed, 23 Jun 2010 05:47:29 +0000</pubDate>
		<guid isPermaLink="false">http://rcpquickstart.wordpress.com/2007/06/20/unit-testing-plug-ins-with-fragments/#comment-9409</guid>
		<description>Hi Patrick,

Sorry that I didn&#039;t make my goal clear. I am planning to run the master test suits on a build server which is running TeamCity. It grants the option to execute ANT script for daily build and nightly build.

I was a bit puzzled by PDE build and trying to clear my head with it. Apparently (from one of your other posts) I need to set up RCP binary, junit package, the RCP delta pack and the eclipse SDK on the build server in order to properly generate builds for different platforms. It would be great if you can show me how to set up ETF for Teamcity ANT configuration. (I know how to use Teamcity)

I am following your PDE automation post and trying to understand what I&#039;m doing from your examples. Hopefully the solution will provide a direction on how to properly set up my projects. 

thanks, yudi</description>
		<content:encoded><![CDATA[<p>Hi Patrick,</p>
<p>Sorry that I didn&#8217;t make my goal clear. I am planning to run the master test suits on a build server which is running TeamCity. It grants the option to execute ANT script for daily build and nightly build.</p>
<p>I was a bit puzzled by PDE build and trying to clear my head with it. Apparently (from one of your other posts) I need to set up RCP binary, junit package, the RCP delta pack and the eclipse SDK on the build server in order to properly generate builds for different platforms. It would be great if you can show me how to set up ETF for Teamcity ANT configuration. (I know how to use Teamcity)</p>
<p>I am following your PDE automation post and trying to understand what I&#8217;m doing from your examples. Hopefully the solution will provide a direction on how to properly set up my projects. </p>
<p>thanks, yudi</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Patrick</title>
		<link>http://www.modumind.com/2007/06/20/unit-testing-plug-ins-with-fragments/comment-page-1/#comment-9406</link>
		<dc:creator>Patrick</dc:creator>
		<pubDate>Tue, 22 Jun 2010 19:29:18 +0000</pubDate>
		<guid isPermaLink="false">http://rcpquickstart.wordpress.com/2007/06/20/unit-testing-plug-ins-with-fragments/#comment-9406</guid>
		<description>Hi Yudi,

I&#039;m glad the post helped. I&#039;m not sure what you mean by generating ANT scripts, though. If you create a master test suite through reflection, this code should probably run inside of a unit test that can be called normally using the Eclipse Test Framework. If you need help setting up the ETF, let me know.

--- Patrick</description>
		<content:encoded><![CDATA[<p>Hi Yudi,</p>
<p>I&#8217;m glad the post helped. I&#8217;m not sure what you mean by generating ANT scripts, though. If you create a master test suite through reflection, this code should probably run inside of a unit test that can be called normally using the Eclipse Test Framework. If you need help setting up the ETF, let me know.</p>
<p>&#8212; Patrick</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Yudi Xue</title>
		<link>http://www.modumind.com/2007/06/20/unit-testing-plug-ins-with-fragments/comment-page-1/#comment-9397</link>
		<dc:creator>Yudi Xue</dc:creator>
		<pubDate>Mon, 21 Jun 2010 22:16:27 +0000</pubDate>
		<guid isPermaLink="false">http://rcpquickstart.wordpress.com/2007/06/20/unit-testing-plug-ins-with-fragments/#comment-9397</guid>
		<description>Hi Patrick,

Thanks for your wonderful post! I have created a master test suite through reflection to harvest all unit tests in other bundles.

However, I am still a bit puzzled by generating ANT scripts and deploy it on a build server. Is there a direct way to generate ANT script to run the test suite and publish junit test results?

thanks a bunch!
yudi</description>
		<content:encoded><![CDATA[<p>Hi Patrick,</p>
<p>Thanks for your wonderful post! I have created a master test suite through reflection to harvest all unit tests in other bundles.</p>
<p>However, I am still a bit puzzled by generating ANT scripts and deploy it on a build server. Is there a direct way to generate ANT script to run the test suite and publish junit test results?</p>
<p>thanks a bunch!<br />
yudi</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Patrick</title>
		<link>http://www.modumind.com/2007/06/20/unit-testing-plug-ins-with-fragments/comment-page-1/#comment-5865</link>
		<dc:creator>Patrick</dc:creator>
		<pubDate>Fri, 12 Feb 2010 19:34:52 +0000</pubDate>
		<guid isPermaLink="false">http://rcpquickstart.wordpress.com/2007/06/20/unit-testing-plug-ins-with-fragments/#comment-5865</guid>
		<description>Hi Mircea,

I&#039;ve looked into this further and it seems like a limitation of the java compiler in PDE, not of OSGi itself. At runtime, your fragments should be able to load classes from each other. 

This obviously doesn&#039;t help much, though, unless you decide to write your unit tests using reflection :-)

As for the &quot;friends&quot; mechanism, you should know that this restriction is applied only in PDE. At runtime, your packages are exported in an unqualified way because OSGi does not honor the &quot;x-friends&quot; directive.

--- Patrick</description>
		<content:encoded><![CDATA[<p>Hi Mircea,</p>
<p>I&#8217;ve looked into this further and it seems like a limitation of the java compiler in PDE, not of OSGi itself. At runtime, your fragments should be able to load classes from each other. </p>
<p>This obviously doesn&#8217;t help much, though, unless you decide to write your unit tests using reflection :-)</p>
<p>As for the &#8220;friends&#8221; mechanism, you should know that this restriction is applied only in PDE. At runtime, your packages are exported in an unqualified way because OSGi does not honor the &#8220;x-friends&#8221; directive.</p>
<p>&#8212; Patrick</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mircea</title>
		<link>http://www.modumind.com/2007/06/20/unit-testing-plug-ins-with-fragments/comment-page-1/#comment-5855</link>
		<dc:creator>Mircea</dc:creator>
		<pubDate>Fri, 12 Feb 2010 08:17:16 +0000</pubDate>
		<guid isPermaLink="false">http://rcpquickstart.wordpress.com/2007/06/20/unit-testing-plug-ins-with-fragments/#comment-5855</guid>
		<description>Hello Patrick!

  Thanks a lot for your answer. I&#039;m still looking for a solution though... I&#039;m not good with exposing all the classes I want to test due to some strict safety requirements I have to fulfil...
  One solution would be to drop the fragment I have to test and make a plug in out of it. And have to original host plug in expose its components to the fragment as a friend plug in... But I&#039;m still hopping...

Mircea</description>
		<content:encoded><![CDATA[<p>Hello Patrick!</p>
<p>  Thanks a lot for your answer. I&#8217;m still looking for a solution though&#8230; I&#8217;m not good with exposing all the classes I want to test due to some strict safety requirements I have to fulfil&#8230;<br />
  One solution would be to drop the fragment I have to test and make a plug in out of it. And have to original host plug in expose its components to the fragment as a friend plug in&#8230; But I&#8217;m still hopping&#8230;</p>
<p>Mircea</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Patrick</title>
		<link>http://www.modumind.com/2007/06/20/unit-testing-plug-ins-with-fragments/comment-page-1/#comment-5839</link>
		<dc:creator>Patrick</dc:creator>
		<pubDate>Thu, 11 Feb 2010 22:18:43 +0000</pubDate>
		<guid isPermaLink="false">http://rcpquickstart.wordpress.com/2007/06/20/unit-testing-plug-ins-with-fragments/#comment-5839</guid>
		<description>Hi Mircea,

I just worked up some sample projects, and it appears that even after setting Eclipse-ExtensibleAPI: true in the bundle manifest, there is no visibility between fragments of the same bundle. There may be a way to do this, though, and you might want to ask in the Eclipse newsgroups.

A workaround would be to put just the fragment test cases in a regular bundle. Then the Eclipse-ExtensibleAPI setting will allow the fragment classes to be tested. Of course you&#039;ll need to export the package in the fragment and you&#039;ll only be able to test public classes/methods. Kind of backwards, I know, but it should work.

If you figure out a way to do this, let me know.

--- Patrick</description>
		<content:encoded><![CDATA[<p>Hi Mircea,</p>
<p>I just worked up some sample projects, and it appears that even after setting Eclipse-ExtensibleAPI: true in the bundle manifest, there is no visibility between fragments of the same bundle. There may be a way to do this, though, and you might want to ask in the Eclipse newsgroups.</p>
<p>A workaround would be to put just the fragment test cases in a regular bundle. Then the Eclipse-ExtensibleAPI setting will allow the fragment classes to be tested. Of course you&#8217;ll need to export the package in the fragment and you&#8217;ll only be able to test public classes/methods. Kind of backwards, I know, but it should work.</p>
<p>If you figure out a way to do this, let me know.</p>
<p>&#8212; Patrick</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mircea</title>
		<link>http://www.modumind.com/2007/06/20/unit-testing-plug-ins-with-fragments/comment-page-1/#comment-5836</link>
		<dc:creator>Mircea</dc:creator>
		<pubDate>Thu, 11 Feb 2010 13:29:54 +0000</pubDate>
		<guid isPermaLink="false">http://rcpquickstart.wordpress.com/2007/06/20/unit-testing-plug-ins-with-fragments/#comment-5836</guid>
		<description>I need to create a test fragment for a fragment as two of the components in my application are a plugin and its fragment. And I have to have unit tests for the fragment... 
Any idea?</description>
		<content:encoded><![CDATA[<p>I need to create a test fragment for a fragment as two of the components in my application are a plugin and its fragment. And I have to have unit tests for the fragment&#8230;<br />
Any idea?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Patrick</title>
		<link>http://www.modumind.com/2007/06/20/unit-testing-plug-ins-with-fragments/comment-page-1/#comment-4758</link>
		<dc:creator>Patrick</dc:creator>
		<pubDate>Tue, 12 Jan 2010 17:19:15 +0000</pubDate>
		<guid isPermaLink="false">http://rcpquickstart.wordpress.com/2007/06/20/unit-testing-plug-ins-with-fragments/#comment-4758</guid>
		<description>Hi Anu,

Unfortunately I&#039;ve never been able to get test fragments working with PDE Build. There is an open Bugzilla entry on this, and maybe you could add a post saying that you&#039;d be interested in a solution.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=181508

The more people that ask, the better.

Regards,

--- Patrick</description>
		<content:encoded><![CDATA[<p>Hi Anu,</p>
<p>Unfortunately I&#8217;ve never been able to get test fragments working with PDE Build. There is an open Bugzilla entry on this, and maybe you could add a post saying that you&#8217;d be interested in a solution.</p>
<p><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=181508" rel="nofollow">https://bugs.eclipse.org/bugs/show_bug.cgi?id=181508</a></p>
<p>The more people that ask, the better.</p>
<p>Regards,</p>
<p>&#8212; Patrick</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anu</title>
		<link>http://www.modumind.com/2007/06/20/unit-testing-plug-ins-with-fragments/comment-page-1/#comment-4752</link>
		<dc:creator>Anu</dc:creator>
		<pubDate>Tue, 12 Jan 2010 10:02:25 +0000</pubDate>
		<guid isPermaLink="false">http://rcpquickstart.wordpress.com/2007/06/20/unit-testing-plug-ins-with-fragments/#comment-4752</guid>
		<description>Hi
Thanks for the great post! It was very helpful.
However I&#039;m trying to build my application using PDE build and it is not picking up test fragments. It is unable to find the dependencies which exists in the host plug-in of the fragment. Any advice on how should I tackle this issue?</description>
		<content:encoded><![CDATA[<p>Hi<br />
Thanks for the great post! It was very helpful.<br />
However I&#8217;m trying to build my application using PDE build and it is not picking up test fragments. It is unable to find the dependencies which exists in the host plug-in of the fragment. Any advice on how should I tackle this issue?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
