You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

readme-tests-module.html 5.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  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 the
  72. test source files are no longer used. 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.
  101. For help on harness options, use <code>-help</code>.
  102. For for help on component options, see the package docs.
  103. Note in particular how to select tests using keywords or supply compiler
  104. arguments on the command line.
  105. <p>
  106. To write a new test, evolve an existing example. See the dtd and/or
  107. the javadoc for the testing harness implementation in the
  108. <code>testing</code> module for more details.
  109. <p>To write a test case for a bug, see XXX todo.
  110. <h3><a name="#product"></a>Product</h3>
  111. Product tests target a built distribution or do compiler (argument)
  112. testing not supported by the harness.
  113. Many have been superceded by ant tests.
  114. <h3><a name="#ajctest"></a>AjcTest</h3>
  115. <a href="ajctest.xml">ajctest.xml</a>
  116. is an Ant script that compiles and runs large systems.
  117. The scripts tell the AjcTest task from the testing module to drive
  118. the sources in other-systems through compile/doc/run cycles.
  119. To set up the tests, the script combines the aspects checked in to
  120. other-systems/ with the Java source files from various open-source
  121. projects, contained in aspectj-external-lib.zip.
  122. <!-- XXX install and correct -->
  123. <h3><a name="#jacks"></a>Jacks</h3>
  124. Jacks is the Jikes compiler test suite available at the
  125. <a href="http://www-124.ibm.com/developerworks/oss/cvs/jikes/~checkout~/jacks/jacks.html">
  126. Jacks project page</a>.
  127. We have a bash script to run it using ajc and javac and compare
  128. the results.
  129. </td>
  130. </tr>
  131. </table>
  132. </body>
  133. </html>