| 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 |
| |
| |
| BUILING AND RUNNING CHECKIN TESTS: |
| (NOTE: does not perform a checkin, just runs tests) |
| It is recommended that you call at least clean.tests before a checkintest run. |
| |
| * Change to xml-xmlbeans\v2 in the CVS download location. |
| * build xml-beans (optional, the step below will do it for you if you don't) |
| * run "ant checkintest" |
| |
| TEST RESULTS: |
| Summary statistics are printed to the console. |
| For details on the run, see the output files: |
| |
| build/test/reports/TestReport.xml OR |
| build/test/reports/TestReport.html (human-readable format) |
| |
| |
| |
| 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 |
| |
| ========================================== |
| BUILDING AND RUNNING SUBSETS OF TESTS: |
| |
| From xml-xmlbeans\v2 in the CVS download location: |
| |
| * ant checkintest -- builds and runs the checkin tests(these should all pass before you commit your code) |
| * ant detailed -- builds and runs detailed tests (these tests might have failures) |
| |
| To build and run a particular test area (areas correspond to top-level folders in test/src) |
| |
| * ant testbuild run.junit -Dtest.area="AREA" |
| e.g. To build and run dom and xmlcursor tests |
| |
| ant testbuild run.junit -Dtest.area="dom,xmlcursor" |
| |
| To build and run on a smaller granularity: |
| |
| You can not build on a smaller granularity than a test area. You can, however, run a smaller subset after a build: |
| E.g. |
| * ant testbuild -Dtest.area="dom" |
| * ant junit.run -Dtest.spec="**/dom/checkin/**" |
| Will build all dom tests and run the dom checkin tests. |
| |
| (Alternatively, you can chain the targets like this: |
| ant testbuild run.junit -Dtest.area=dom -Dtest.spec="**/dom/checkin/**" ) |
| |
| To run a single class: |
| * ant run.junit -Dtest.spec="xmlobject.detailed.NilTest" |
| |
| Parameters: |
| - test.area: specifies an area to build and run |
| - test.spec: this option is valid at runtime only, |
| and is used to allow the user to specify a fileset of their liking.It could also be |
| used to specify a class to be run. |
| It should be used <b>INSTEAD</b> of test.area |
| ***If you provide both, -Dtest.spec will take precedence, and the area will be disregarded. |
| |
| - showoutput: controls whether the output from the tests is displayed on the console. |
| Default is false. |
| This is dependent on the Result formatter used by the JUnitX runner. The Xml |
| Formatter that 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. |
| |
| NOTE: Always include the double-quotes around the area or wildcard expression. |
| |
| |
| Example: Run all dom tests (the following expressions are equivalent) |
| ant run.junit -Dtest.area="dom" -Dshowoutput=true |
| ant run.junit -Dtest.spec="**/dom/**" -Dshowoutput=true |
| |