<?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: Running Automated Tests with PDE Build</title>
	<atom:link href="http://www.modumind.com/2007/08/06/running-automated-tests-with-pde-build/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.modumind.com/2007/08/06/running-automated-tests-with-pde-build/</link>
	<description>Eclipse RCP and OSGi training - online or onsite</description>
	<lastBuildDate>Tue, 09 Mar 2010 15:55:05 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Stefanko</title>
		<link>http://www.modumind.com/2007/08/06/running-automated-tests-with-pde-build/comment-page-2/#comment-5959</link>
		<dc:creator>Stefanko</dc:creator>
		<pubDate>Tue, 16 Feb 2010 16:37:00 +0000</pubDate>
		<guid isPermaLink="false">http://rcpquickstart.wordpress.com/2007/08/06/running-automated-tests-with-pde-build/#comment-5959</guid>
		<description>Hi Patrick,

Thank you very much, and sorry for not replying earlier.
It was a great help. That&#039;s solved my problem.

Stefanko</description>
		<content:encoded><![CDATA[<p>Hi Patrick,</p>
<p>Thank you very much, and sorry for not replying earlier.<br />
It was a great help. That&#8217;s solved my problem.</p>
<p>Stefanko</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Patrick</title>
		<link>http://www.modumind.com/2007/08/06/running-automated-tests-with-pde-build/comment-page-2/#comment-5860</link>
		<dc:creator>Patrick</dc:creator>
		<pubDate>Fri, 12 Feb 2010 16:24:38 +0000</pubDate>
		<guid isPermaLink="false">http://rcpquickstart.wordpress.com/2007/08/06/running-automated-tests-with-pde-build/#comment-5860</guid>
		<description>Hi Stefanko,

To get access to a resource inside of your bundle, it&#039;s best to do something like:

Bundle bundle = Platform.getBundle(&quot;com.mybundle.id&quot;);
URL url = bundle.getEntry(&quot;path-to-resource&quot;);

The getEntry method takes a path relative to the root of your bundle. In your case this would be &quot;res/TestData.txt&quot;.

Hope this helps,

--- Patrick</description>
		<content:encoded><![CDATA[<p>Hi Stefanko,</p>
<p>To get access to a resource inside of your bundle, it&#8217;s best to do something like:</p>
<p>Bundle bundle = Platform.getBundle(&#8220;com.mybundle.id&#8221;);<br />
URL url = bundle.getEntry(&#8220;path-to-resource&#8221;);</p>
<p>The getEntry method takes a path relative to the root of your bundle. In your case this would be &#8220;res/TestData.txt&#8221;.</p>
<p>Hope this helps,</p>
<p>&#8212; Patrick</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stefanko</title>
		<link>http://www.modumind.com/2007/08/06/running-automated-tests-with-pde-build/comment-page-2/#comment-5856</link>
		<dc:creator>Stefanko</dc:creator>
		<pubDate>Fri, 12 Feb 2010 09:30:07 +0000</pubDate>
		<guid isPermaLink="false">http://rcpquickstart.wordpress.com/2007/08/06/running-automated-tests-with-pde-build/#comment-5856</guid>
		<description>Hi Patrick,

Thank you for your quick reply again and excuse my disturbing you again. So I am using your sample for my Headless build process, but some part of the Eclipse Testing Framework side wasn&#039;t clear . Now I understand it, thank you very much.

For example I have a JUnit test where I use a data file from a &#039;res&#039; folder under the plug-ins root folder and I reference to it the following way: 
new File(&quot;res/TestData.txt&quot;)
If I run this test from the IDE it works fine, but when I execute it from the headless build the path cannot be resolved.

I receive the following message:
error message=&quot;Source &#039;res\TestData.txt&#039; does not exist&quot; type=&quot;java.io.FileNotFoundException&quot;

So do you have any suggestion how to reference plug-in relatively to this data file?

Thanks in advance.

Stefanko</description>
		<content:encoded><![CDATA[<p>Hi Patrick,</p>
<p>Thank you for your quick reply again and excuse my disturbing you again. So I am using your sample for my Headless build process, but some part of the Eclipse Testing Framework side wasn&#8217;t clear . Now I understand it, thank you very much.</p>
<p>For example I have a JUnit test where I use a data file from a &#8216;res&#8217; folder under the plug-ins root folder and I reference to it the following way:<br />
new File(&#8220;res/TestData.txt&#8221;)<br />
If I run this test from the IDE it works fine, but when I execute it from the headless build the path cannot be resolved.</p>
<p>I receive the following message:<br />
error message=&#8221;Source &#8216;res\TestData.txt&#8217; does not exist&#8221; type=&#8221;java.io.FileNotFoundException&#8221;</p>
<p>So do you have any suggestion how to reference plug-in relatively to this data file?</p>
<p>Thanks in advance.</p>
<p>Stefanko</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Patrick</title>
		<link>http://www.modumind.com/2007/08/06/running-automated-tests-with-pde-build/comment-page-2/#comment-5840</link>
		<dc:creator>Patrick</dc:creator>
		<pubDate>Thu, 11 Feb 2010 22:24:11 +0000</pubDate>
		<guid isPermaLink="false">http://rcpquickstart.wordpress.com/2007/08/06/running-automated-tests-with-pde-build/#comment-5840</guid>
		<description>Hi Stefanko,

The Eclipse Testing Framework is specifically meant to run like &#039;JUnit Plug-in Test&#039; in the IDE. It basically runs your unit tests inside of an OSGi framework. Again, setting this up is complex and I would refer you to the sample projects that can be downloaded here. The tests that run as part of the sample are running as plug-in tests, and you should be able to modify the sample to build and test your own plug-ins.

As far as relative file paths are concerned, what are they relative to? Or maybe a better way to approach this is to tell me what you&#039;re trying to achieve with the paths. There are various OSGi and RCP API calls to manage storage locations depending on what you&#039;re trying to do.

--- Patrick</description>
		<content:encoded><![CDATA[<p>Hi Stefanko,</p>
<p>The Eclipse Testing Framework is specifically meant to run like &#8216;JUnit Plug-in Test&#8217; in the IDE. It basically runs your unit tests inside of an OSGi framework. Again, setting this up is complex and I would refer you to the sample projects that can be downloaded here. The tests that run as part of the sample are running as plug-in tests, and you should be able to modify the sample to build and test your own plug-ins.</p>
<p>As far as relative file paths are concerned, what are they relative to? Or maybe a better way to approach this is to tell me what you&#8217;re trying to achieve with the paths. There are various OSGi and RCP API calls to manage storage locations depending on what you&#8217;re trying to do.</p>
<p>&#8212; Patrick</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stefanko</title>
		<link>http://www.modumind.com/2007/08/06/running-automated-tests-with-pde-build/comment-page-2/#comment-5834</link>
		<dc:creator>Stefanko</dc:creator>
		<pubDate>Thu, 11 Feb 2010 10:34:15 +0000</pubDate>
		<guid isPermaLink="false">http://rcpquickstart.wordpress.com/2007/08/06/running-automated-tests-with-pde-build/#comment-5834</guid>
		<description>Hi Patrick

Thank you for your quick reply. My question wasn&#039;t enough clear, sorry for it.

I can run my tests from headless build but only as JUnit Tests, but not as JUnit Plug-in Tests. In the Eclipse IDE if I right click on test file there are two options in the &#039;Run As&#039; popup menu: 
1. JUnit Test
2. JUnit Plug-in Test

So my question is how to execute my test as a &#039;JUnit Plug-in Test&#039; from headless build?

Another problem is that I have some plug-in relative file paths referenced from my JUnit tests. These relative refernces are working correctly if I run the JUnit test from eclipse IDE, but they are not correctly resolved when I run the same test from headless build.

Would you be so kind as to write me some hint how to solve these problems?

Thanks in advance.

Stefanko</description>
		<content:encoded><![CDATA[<p>Hi Patrick</p>
<p>Thank you for your quick reply. My question wasn&#8217;t enough clear, sorry for it.</p>
<p>I can run my tests from headless build but only as JUnit Tests, but not as JUnit Plug-in Tests. In the Eclipse IDE if I right click on test file there are two options in the &#8216;Run As&#8217; popup menu:<br />
1. JUnit Test<br />
2. JUnit Plug-in Test</p>
<p>So my question is how to execute my test as a &#8216;JUnit Plug-in Test&#8217; from headless build?</p>
<p>Another problem is that I have some plug-in relative file paths referenced from my JUnit tests. These relative refernces are working correctly if I run the JUnit test from eclipse IDE, but they are not correctly resolved when I run the same test from headless build.</p>
<p>Would you be so kind as to write me some hint how to solve these problems?</p>
<p>Thanks in advance.</p>
<p>Stefanko</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Patrick</title>
		<link>http://www.modumind.com/2007/08/06/running-automated-tests-with-pde-build/comment-page-2/#comment-5824</link>
		<dc:creator>Patrick</dc:creator>
		<pubDate>Wed, 10 Feb 2010 20:56:17 +0000</pubDate>
		<guid isPermaLink="false">http://rcpquickstart.wordpress.com/2007/08/06/running-automated-tests-with-pde-build/#comment-5824</guid>
		<description>Hi Stefanko,

Unit tests are kicked off through Ant targets and must be run in a properly configured test environment. A sample Ant script can be downloaded via the link in the post, and I describe how to set this a test environment here:

http://www.modumind.com/2008/08/01/creating-a-test-environment-for-the-eclipse-testing-framework/

If these don&#039;t answer your question, please feel free to clarify what you need to know.

--- Patrick</description>
		<content:encoded><![CDATA[<p>Hi Stefanko,</p>
<p>Unit tests are kicked off through Ant targets and must be run in a properly configured test environment. A sample Ant script can be downloaded via the link in the post, and I describe how to set this a test environment here:</p>
<p><a href="http://www.modumind.com/2008/08/01/creating-a-test-environment-for-the-eclipse-testing-framework/" rel="nofollow">http://www.modumind.com/2008/08/01/creating-a-test-environment-for-the-eclipse-testing-framework/</a></p>
<p>If these don&#8217;t answer your question, please feel free to clarify what you need to know.</p>
<p>&#8212; Patrick</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stefanko</title>
		<link>http://www.modumind.com/2007/08/06/running-automated-tests-with-pde-build/comment-page-2/#comment-5822</link>
		<dc:creator>Stefanko</dc:creator>
		<pubDate>Wed, 10 Feb 2010 16:25:58 +0000</pubDate>
		<guid isPermaLink="false">http://rcpquickstart.wordpress.com/2007/08/06/running-automated-tests-with-pde-build/#comment-5822</guid>
		<description>Hi Patrick,

Thanks for this article. It was very helpful. I tried the new eclipse Testing framework(3.6M4) with my JUnit4 test case and it was working. 

Could you perhaps give me some suggestion on how to execute JUnit Plug-in tests from headless Build?

Thanks in advance.

Stefanko</description>
		<content:encoded><![CDATA[<p>Hi Patrick,</p>
<p>Thanks for this article. It was very helpful. I tried the new eclipse Testing framework(3.6M4) with my JUnit4 test case and it was working. </p>
<p>Could you perhaps give me some suggestion on how to execute JUnit Plug-in tests from headless Build?</p>
<p>Thanks in advance.</p>
<p>Stefanko</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Laurent</title>
		<link>http://www.modumind.com/2007/08/06/running-automated-tests-with-pde-build/comment-page-2/#comment-3688</link>
		<dc:creator>Laurent</dc:creator>
		<pubDate>Mon, 07 Dec 2009 15:22:49 +0000</pubDate>
		<guid isPermaLink="false">http://rcpquickstart.wordpress.com/2007/08/06/running-automated-tests-with-pde-build/#comment-3688</guid>
		<description>Patrick,

I wasn&#039;t thinking when trying the fix. I was only using the newer eclipse test framework zip. I would also need to move to the newer SDK in order to get this to work (but I can&#039;t move up, for other reasons).</description>
		<content:encoded><![CDATA[<p>Patrick,</p>
<p>I wasn&#8217;t thinking when trying the fix. I was only using the newer eclipse test framework zip. I would also need to move to the newer SDK in order to get this to work (but I can&#8217;t move up, for other reasons).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Patrick</title>
		<link>http://www.modumind.com/2007/08/06/running-automated-tests-with-pde-build/comment-page-2/#comment-3607</link>
		<dc:creator>Patrick</dc:creator>
		<pubDate>Sat, 05 Dec 2009 03:38:02 +0000</pubDate>
		<guid isPermaLink="false">http://rcpquickstart.wordpress.com/2007/08/06/running-automated-tests-with-pde-build/#comment-3607</guid>
		<description>Hi Laurent,

I have not tried this myself - haven&#039;t had the time yet. If it&#039;s not working for you it would probably be best to ask questions on the Bugzilla entry. I&#039;m definitely interested to hear if you get this working or not, so please keep me posted.

--- Patrick</description>
		<content:encoded><![CDATA[<p>Hi Laurent,</p>
<p>I have not tried this myself &#8211; haven&#8217;t had the time yet. If it&#8217;s not working for you it would probably be best to ask questions on the Bugzilla entry. I&#8217;m definitely interested to hear if you get this working or not, so please keep me posted.</p>
<p>&#8212; Patrick</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Laurent</title>
		<link>http://www.modumind.com/2007/08/06/running-automated-tests-with-pde-build/comment-page-1/#comment-3602</link>
		<dc:creator>Laurent</dc:creator>
		<pubDate>Sat, 05 Dec 2009 00:01:58 +0000</pubDate>
		<guid isPermaLink="false">http://rcpquickstart.wordpress.com/2007/08/06/running-automated-tests-with-pde-build/#comment-3602</guid>
		<description>Thanks Patrick for the quick answer.
I just pulled one of the latest integration builds (eclipse-test-framework-I20091204-0800.zip) and still no luck...did you get a chance to try that yourself?</description>
		<content:encoded><![CDATA[<p>Thanks Patrick for the quick answer.<br />
I just pulled one of the latest integration builds (eclipse-test-framework-I20091204-0800.zip) and still no luck&#8230;did you get a chance to try that yourself?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
