Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "WTP/Build/WTP Adding JUnits"

< WTP‎ | Build
(WTP test.xml file - removed need. See Bug 295153 - Can streamline unit test scripts)
(PROJECT test.xml file)
 
(One intermediate revision by one other user not shown)
Line 2: Line 2:
  
  
== NORMAL (nearly) PROJECT CREATION ==
+
== NORMAL (nearly) PROJECT CREATION ==
  
#put in cvs <br /> directory should be created first, creating a folder in the 'tests' directory of the component. Then use eclipse wizard to 'share', but don't use default name (that would create a top level project directory) but instead use the 'browse' function to put in the folder created.
+
#put in cvs <br> directory should be created first, creating a folder in the 'tests' directory of the component. Then use eclipse wizard to 'share', but don't use default name (that would create a top level project directory) but instead use the 'browse' function to put in the folder created.  
#add to appropriate .map file (using the project name, and full cvs name). <br /> it must be added "by hand" to a map file before it can be released with release tool.
+
#add to appropriate .map file (using the project name, and full cvs name). <br> it must be added "by hand" to a map file before it can be released with release tool.  
#add the project to a features xml file. <br /> NOTE: For test plugins, the test plugin should NOT be packed (there are some ant tasks that use file functions). And, this means to omit the unpack attribute in the feature.xml file.
+
#add the project to a features xml file. <br> NOTE: For test plugins, '''the test plugin should NOT be packed (or jarred up)''' (there are some ant tasks that use file functions). And, this means to omit the <code>unpack</code> attribute in the feature.xml file.  
# (optional) send note to webmaster to have project and its location added to the modules file in CVS, if desired
+
#(optional) send note to webmaster to have project and its location added to the modules file in CVS, if desired
  
 
== PROJECT test.xml file ==
 
== PROJECT test.xml file ==
Line 21: Line 21:
 
</ol>
 
</ol>
  
 +
=== test.xml is a reserved file name! ===
  
 +
Note the significance of the the 'test.xml' file name. This is like a "reserved word" convention. Any plugin that has a 'test.xml' file in the root of the plugin is assumed to mean it is a JUnit test plugin to be ran in our WTP builds. In fact, for future use, assume any "test*.xml" file will have significance, when in the root of the bundle. Eventually, we may have "test-bvt.xml", "test-fvt.xml", or similar, to mean different types of tests, to run at different times.
  
  
 
[[Category:WTP Build Related| ]]
 
[[Category:WTP Build Related| ]]

Latest revision as of 14:12, 19 November 2009

How To Add a JUnit Project To the WTP Builds

NORMAL (nearly) PROJECT CREATION

  1. put in cvs
    directory should be created first, creating a folder in the 'tests' directory of the component. Then use eclipse wizard to 'share', but don't use default name (that would create a top level project directory) but instead use the 'browse' function to put in the folder created.
  2. add to appropriate .map file (using the project name, and full cvs name).
    it must be added "by hand" to a map file before it can be released with release tool.
  3. add the project to a features xml file.
    NOTE: For test plugins, the test plugin should NOT be packed (or jarred up) (there are some ant tasks that use file functions). And, this means to omit the unpack attribute in the feature.xml file.
  4. (optional) send note to webmaster to have project and its location added to the modules file in CVS, if desired

PROJECT test.xml file

  1. copy a test.xml file from another project, or use this example from the sse.core test suite and edit the 3 or 4 things that are project specific:
    • plugin name
    • main classname that runs all the tests
    • type type of test, either
      • target="core-test" (if there is no UI required), or
      • target="ui-test" (if there is UI required).
  2. add the test.xml file (using check box in properties editor) to the build.properties file so it'll be included in the "bin" build.

test.xml is a reserved file name!

Note the significance of the the 'test.xml' file name. This is like a "reserved word" convention. Any plugin that has a 'test.xml' file in the root of the plugin is assumed to mean it is a JUnit test plugin to be ran in our WTP builds. In fact, for future use, assume any "test*.xml" file will have significance, when in the root of the bundle. Eventually, we may have "test-bvt.xml", "test-fvt.xml", or similar, to mean different types of tests, to run at different times.

Back to the top