Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

readme-tests-module.html 6.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. <html>
  2. <title>AspectJ tests</title>
  3. <body>
  4. <h1>AspectJ tests</h1>
  5. <h3>Testing and Tests</h3>
  6. Testing on the AspectJ project is fairly straightforward.
  7. For compiler issues/bugs, we write harness tests.
  8. For API issues/bugs, we write JUnit tests.
  9. We also have other testware for system testing.
  10. <p>
  11. This module contains test data and scripts, while the testing-drivers
  12. and testing modules contain the harness.
  13. Tests differ in the kind of harness they use and their target.
  14. (Many tests are unused and date back to earlier times in the project.)
  15. <p>
  16. <table border="1" cellpadding="1">
  17. <tr><th align="left"><u>Test</u> Description</th>
  18. <th align="left">Driver</th>
  19. <th align="left">Sources</th>
  20. </tr>
  21. <tr><td><a href="#harness">Harness</a> tests
  22. compile and run test sources.
  23. </td>
  24. <td>Harness in testing-drivers module</td>
  25. <td><a href="ajcTests.xml">ajcTests.xml</a>,
  26. and <a href="ajcTests.xml">ajcTests10.xml</a>,
  27. referring to tests in
  28. <a href="new">new/</a>,
  29. <a href="base">base/</a>,
  30. <a href="errors">errors/</a>,
  31. <a href="design">design/</a>,
  32. <a href="pureJava">pureJava/</a>,
  33. etc.
  34. </td>
  35. </tr>
  36. <tr><td><a href="#product">Product</a> tests use a variety of
  37. Ant and Bash scripts to drive the product distributions.
  38. <td>bash,
  39. <a href="http://jakarta.apache.org/Ant">Ant</a>
  40. </td>
  41. <td><a href="product">product/..</a></td>
  42. </tr>
  43. <tr><td><a href="#ajctest">AjcTest</a> is a large taskdef which
  44. compiles and runs large Java systems.
  45. </td>
  46. <td>AjcTest
  47. <a href="http://jakarta.apache.org/Ant">Ant</a>
  48. Task in testing module </td>
  49. <td><a href="other-systems/">other-systems/..</a>,
  50. <a href="XXX">aspectj-external-lib.jar?/other-systems/</a></td>
  51. </tr>
  52. <tr><td><a href="#jacks">Jacks</a> is the Jikes compiler test suite,
  53. run for us using a bash script.
  54. <td>bash</td>
  55. <td>See the
  56. <a href="http://www-124.ibm.com/developerworks/oss/cvs/jikes/~checkout~/jacks/jacks.html">
  57. Jacks project page</a>
  58. </td>
  59. </tr>
  60. <tr><td><a href="#junit">JUnit</a> tests normally are run directly
  61. before checking in,
  62. but there is an Ant script to run and report on them all.
  63. </td>
  64. <td><a href="junit.org">JUnit</a></td>
  65. <td>Every module has a testsrc/ directory with JUnit tests.</td>
  66. </tr>
  67. </table>
  68. <h3><a name="#harness"></a>Harness</h3>
  69. These are compiler test cases, the preferred form for
  70. any compiler tests. The XML files are test definitions,
  71. and the subdirectories contain the test sources (many of which
  72. are unused at present). The test definitions are
  73. segregated for convenience as follows:
  74. <ul>
  75. <li><a href="ajcTests.xml">ajcTests.xml</a>: main test suite.
  76. After a release, these tests should always run and pass.
  77. </li>
  78. <li><a href="ajcTests10.xml">ajcTests10.xml</a>:
  79. Tests for the 1.0 compiler. In some cases, error tests
  80. differ between the 1.0 and 1.1 compiler only in the
  81. errors expected to be generated.
  82. </li>
  83. <li><a href="ajcTestsBroken.xml">ajcTestsBroken.xml</a>:
  84. These tests fail, and the tests are broken.
  85. The tests should be fixed and rolled into ajcTests.xml
  86. </li>
  87. <li><a href="ajcTestsFailing.xml">ajcTestsFailing.xml</a>:
  88. These tests fail, and the compiler is broken.
  89. When fixed, these tests should be rolled into
  90. <a href="ajcTests.xml">ajcTests.xml</a>.
  91. </li>
  92. <li><a href="ajcTestsAttic.xml">ajcTestsAttic.xml</a>:
  93. These are broken or failing tests not slated to be fixed.
  94. </li>
  95. <li><a href="ajcHarnessTests.xml">ajcHarnessTests.xml</a>:
  96. These are tests to exercise the test harness itself.
  97. </li>
  98. </ul>
  99. To run the harness, use <code>org.aspectj.testing.drivers.Harness</code>,
  100. in the <code>testing-drivers</code> module. Since that is the main class
  101. for the <code>testing-drivers</code> module, you can build and
  102. run the harness as follows:
  103. <pre>
  104. cd build/
  105. ../lib/ant/bin/ant build-testing-drivers
  106. cd ../tests
  107. java -jar ../aj-build/jars/testing-drivers-all.jar ajcTests.xml
  108. </pre>
  109. For help on harness options, use <code>-help</code>.
  110. For more help on options for harness components, see
  111. <a href="../testing-drivers/src/org/aspectj/testing/drivers/package.html">
  112. the package documentation for the harness</a>.
  113. Note in particular how to select tests using keywords
  114. and how compiler arguments can be passed on the harness command line.
  115. <p>
  116. To write a new test, evolve an existing example. See the dtd and/or
  117. the javadoc for the testing harness implementation in the
  118. <code>testing</code> module for more details.
  119. <p>To write a test case for a bug, see
  120. <a href="readme-writing-compiler-tests.html">
  121. readme-writing-compiler-tests.html</a>.
  122. <h3><a name="#product"></a>Product</h3>
  123. Product tests target a built distribution or do compiler (argument)
  124. testing not supported by the harness.
  125. Many have been superceded by ant tests.
  126. <h3><a name="#ajctest"></a>AjcTest</h3>
  127. <a href="ajctest.xml">ajctest.xml</a>
  128. is an Ant script that compiles and runs large systems.
  129. The scripts tell the AjcTest task from the testing module to drive
  130. the sources in other-systems through compile/doc/run cycles.
  131. To set up the tests, the script combines the aspects checked in to
  132. other-systems/ with the Java source files from various open-source
  133. projects, contained in aspectj-external-lib.zip.
  134. <!-- XXX install and correct -->
  135. <h3><a name="#jacks"></a>Jacks</h3>
  136. Jacks is the Jikes compiler test suite available at the
  137. <a href="http://www-124.ibm.com/developerworks/oss/cvs/jikes/~checkout~/jacks/jacks.html">
  138. Jacks project page</a>.
  139. We have a bash script to run it using ajc and javac and compare
  140. the results.
  141. <h3><a name="#junit"></a>JUnit</h3>
  142. The JUnit tests should be self-documenting.
  143. For more information on running them, see
  144. <a href="../build/readme-build-and-test-aspectj.html">
  145. ../build/readme-build-and-test-aspectj.html</a>.
  146. </body>
  147. </html>