Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

WTP/Build/StandaloneUnitTest

< WTP‎ | Build

Occasionally it's handy to run JUnit tests on your local machine, in a "batch" environment, that more closely resembles the batch environment of the build machine. For example, some bugs, hangs, or intermittent errors, do not show up when ran in the Eclipse Development IDE, but do when ran in "batch" mode.

This document outlines one way to do that. In particular, it will download the build of interest, and it's pre-reqs, and then test one or more JUnit test suites.

[Please improve this document as you find corrections, tips or improvements to this basic, example procedure.]

Step 1. Make a clean directory that will be your BUILD_HOME, such as "J:\work\runTests". Note, nothing is actually built in the procedure ... it's just still called "BUILD_HOME".

Step 2. Create a directory under that named 'webtools.releng', such as you'd end up with "J:\work\runTests\webtools.releng".

Step 3. Checkout, or export, the 'releng.wtpbuilder' module to that 'webtools.releng' direcotory. The full directory path in our webtools CVS is 'webtools.releng/releng.wtpbuilder'.

Step 4. Copy the runtest.bat file up to your BUILD_HOME directory. The runtest.bat file is located in 'releng.wtpbuilder\distribution\wtp.tests\runtest.bat' but it can not be ran from that location. You need to edit it for your specific machine and needs.

Step 5. Edit the BUILD_HOME version of runtest.bat. The variables and type of editing you'll have to do is described in the bat file itself. Typically about 5 or 8 lines will need to be edited.

Step 6. Run the bat file from a command-line console in the BUILD_HOME directory. The first time it runs, it will take longer than subsequent times, because all the builds and pre-reqs are downloaded and cached in prereqsCache.

Assumed pre-reqs: For the scripts to work, in addition to having ANT and a JAVA VM (specified in the bat file) a few other common build commands must be available from your default path: 1) unzip 2) cvs

Back to the top