| 
| Source and Test Folder [message #331503] | Wed, 10 September 2008 13:39  |  | 
| Eclipse User  |  |  |  |  | Originally posted by: mohsen.siahe.com 
 Hello,
 
 Is this possible to set a source folder as test folder inside Eclipse? I
 noticed that in Export tab of Build Path, this is not possible to uncheck a
 source folder from being exported.
 This is a common requirement that you don't need the test folder to be
 exported.
 
 Mohsen.
 |  |  |  | 
|  | 
| 
| Re: Source and Test Folder [message #331506 is a reply to message #331504] | Wed, 10 September 2008 14:52   |  | 
| Eclipse User  |  |  |  |  | Originally posted by: mohsen.siahe.com 
 Lars, thanks for the answer.
 
 I know about the possibility of having multiple source folders (and so using
 one as the folder of all test files). It's also a good practice to create
 test cases in the same package (but different source folder) as the original
 class being tested (in order to test package-private and protected methods).
 
 Now suppose you have a project with utility module facet in a Java EE
 environmet. You project output classes will be automatically packed into a
 jar file, and deployed in a webmodule (which depends on this project). The
 only possibility to exclude a source folder from being bundled in the jar is
 to unckeck it in export tab in build path of project properties, which is
 currently not allowed.
 
 Mohsen.
 
 
 "Lars Vogel" <Lars.Vogel@gmail.com> wrote in message
 news:ga90av$qhn$1@build.eclipse.org...
 > Mohsen Saboorian wrote:
 >> Hello,
 >>
 >> Is this possible to set a source folder as test folder inside Eclipse? I
 >> noticed that in Export tab of Build Path, this is not possible to uncheck
 >> a source folder from being exported.
 >> This is a common requirement that you don't need the test folder to be
 >> exported.
 >>
 >> Mohsen.
 > Hi Mohsen,
 >
 > not sure if that is your question, but yes you can create a separate
 > folder for test then this is possible:
 >
 >  http://www.vogella.de/articles/JUnit/article.html#juniteclip se
 >
 > If you just want to avoid exporting the tests I personally use a different
 > package name, e.g. the orginal packagename.test. This way you don't have
 > to export it. Or you put your tests into a different plug-in.
 >
 > Best regards, Lars
 >
 > --
 > Lars Vogel
 > http://www.vogella.de/eclipse.html - Tutorials about Eclipse
 >  http://www.vogella.de/articles/RichClientPlatform/article.ht ml - Eclipse
 > RCP Tutorial
 |  |  |  | 
| 
| Re: Source and Test Folder [message #331508 is a reply to message #331506] | Wed, 10 September 2008 14:24   |  | 
| Eclipse User  |  |  |  |  | Lets see what other people may add here, but I changing the package or putting the tests into a different plug-ins are the only ways I know to
 hide test classes.
 
 
 
 Mohsen Saboorian wrote:
 > Lars, thanks for the answer.
 >
 > I know about the possibility of having multiple source folders (and so using
 > one as the folder of all test files). It's also a good practice to create
 > test cases in the same package (but different source folder) as the original
 > class being tested (in order to test package-private and protected methods).
 >
 > Now suppose you have a project with utility module facet in a Java EE
 > environmet. You project output classes will be automatically packed into a
 > jar file, and deployed in a webmodule (which depends on this project). The
 > only possibility to exclude a source folder from being bundled in the jar is
 > to unckeck it in export tab in build path of project properties, which is
 > currently not allowed.
 >
 > Mohsen.
 >
 >
 > "Lars Vogel" <Lars.Vogel@gmail.com> wrote in message
 > news:ga90av$qhn$1@build.eclipse.org...
 >> Mohsen Saboorian wrote:
 >>> Hello,
 >>>
 >>> Is this possible to set a source folder as test folder inside Eclipse? I
 >>> noticed that in Export tab of Build Path, this is not possible to uncheck
 >>> a source folder from being exported.
 >>> This is a common requirement that you don't need the test folder to be
 >>> exported.
 >>>
 >>> Mohsen.
 >> Hi Mohsen,
 >>
 >> not sure if that is your question, but yes you can create a separate
 >> folder for test then this is possible:
 >>
 >>  http://www.vogella.de/articles/JUnit/article.html#juniteclip se
 >>
 >> If you just want to avoid exporting the tests I personally use a different
 >> package name, e.g. the orginal packagename.test. This way you don't have
 >> to export it. Or you put your tests into a different plug-in.
 >>
 >> Best regards, Lars
 >>
 >> --
 >> Lars Vogel
 >> http://www.vogella.de/eclipse.html - Tutorials about Eclipse
 >>  http://www.vogella.de/articles/RichClientPlatform/article.ht ml - Eclipse
 >> RCP Tutorial
 >
 >
 
 
 --
 Lars Vogel
 http://www.vogella.de/eclipse.html - Tutorials about Eclipse
 http://www.vogella.de/articles/RichClientPlatform/article.ht ml - Eclipse
 RCP Tutorial
 |  |  |  | 
|  | 
| 
| Re: Source and Test Folder [message #331526 is a reply to message #331503] | Thu, 11 September 2008 08:46  |  | 
| Eclipse User  |  |  |  |  | Originally posted by: eclipse-news.rizzoweb.com 
 Mohsen Saboorian wrote:
 > Hello,
 >
 > Is this possible to set a source folder as test folder inside Eclipse? I
 > noticed that in Export tab of Build Path, this is not possible to uncheck a
 > source folder from being exported.
 > This is a common requirement that you don't need the test folder to be
 > exported.
 
 I'm not sure the Export tab is even used during "physical" export (as in
 producing a JAR from the project's code). The settings on that tab are
 used to control what is visible to other projects that depend on this
 one within Eclipse, but I don't think it will have any affect if you do
 an Export.
 
 Eric
 |  |  |  | 
Powered by 
FUDForum. Page generated in 0.46303 seconds