blob: 1ea337585b8cfdf1df8e461af5008bb775f67884 [file] [log] [blame]
README:
===========================================
Requirements:
* The Apache XmlBeans source from CVS.
* Ant version 1.6 or higher
* Ensure JAVA_HOME and ANT_HOME (Requires Ant 1.6 or higher) are set up in your environment
BUILDING TESTS:
* Change to xml-xmlbeans\v2 in the CVS download location.
* To build tests run
ant testbuild
BUILING AND RUNNING CHECKIN TESTS:
(NOTE: does not perform a checkin, just runs tests)
* Change to xml-xmlbeans\v2 in the CVS download location.
* build xml-beans
* run "ant checkintest"
Additional build sub-targets
-------------------------------
* build.tools - builds the tools used by the tests
* build.schemas - builds the schema jars required for the tests
* build.tests - builds the actual tests
* testclean - Cleans everything that was built. For wlxbean this target
will also clean the CVS repository.
* clean.schemas - Cleans the built schema files and jars
* clean.tests - Cleans only the built test classes and jars
==========================================
RUNNING TESTS:
The following targets are to be executed from the same directory as the build targets.
* This uses a custom task and Junit runner to run the tests. No additional files
are required/generated. To run tests
ant run.junit [-Dtests.spec=...] [-Dshowoutput=true]
tests.spec is a wildcard expression that specifies the test to run
- "**/checkin/**" - Runs all checkin tests (This is the default if tests.spec
is not specified)
- "**/detailed/**" - Runs all detailed tests
- "**/AREA/**" - all tests that have AREA in their path
NOTE: Always include the double-quotes around the wildcard expression. Its
best to have the leading **/ in the expression.
To run a single test try "**/test/package/TestClass"
Example: Run all dom tests
ant run.junit -Dtests.spec="**/dom/**" -Dshowoutput=true
showoutput controls if the output from the tests is displayed on the console.
This is dependent on the Result formatter used by the JUnitX runner. The Xml
Formatter thats comes with the JUnitX runner captures output and records it in
the log file (build/test/report/Testlog.xml). Setting showoutput=true when using the Xml
formatter will print output to the console and also capture it.
After the tests have finished the task generates a HTML report in
build/test/reports/TestReport.html.
==============================================
SPECIAL TARGETS:
* checkin - this target will try to build the minimum set of schemas and tests
required for running checkin tests and run them
Incremental Build:
* For iterative dev mode, its faster to compile and run tests for just one area.
To do this:
ant clean.tests // Removes any built test files.
ant testbuild -Dbuild.area=<area> // Build only that area.
ant run.junit [-Dtests.spec="..."] // Run the tests
Example: Build all dom tests
ant testbuild -Dbuild.area=dom
All the targets can be chained together in one command
ant clean.tests testbuild -Dbuild.area=... run.junit [-Dtests.spec=...]