|
| 1 | +GETTING SETUP |
| 2 | + |
| 3 | + This document and the OpenEJB TCK setup can be checked out from here: |
| 4 | + |
| 5 | + svn co https://svn.apache.org/repos/tck/openejb-tck |
| 6 | + |
| 7 | + The Java EE 6 TCK and RI can be downloaded from here: |
| 8 | + |
| 9 | + svn export https://svn.apache.org/repos/tck/sun-tcks/javaee/6/javaeetck-6.0_25-Oct-2010.zip |
| 10 | + svn export https://svn.apache.org/repos/tck/sun-tcks/javaee/6/javaee6_ri-3.0.1-b22.zip |
| 11 | + |
| 12 | + Both are required to run the TCK. The TCK is 813M, beware. |
| 13 | + |
| 14 | + Once unpacked, they can be "hooked" up via the maven settings.xml |
| 15 | + file like so: |
| 16 | + |
| 17 | + <settings> |
| 18 | + <profiles> |
| 19 | + <profile> |
| 20 | + <id>javaee-tck-environment</id> |
| 21 | + |
| 22 | + <activation> |
| 23 | + <activeByDefault>true</activeByDefault> |
| 24 | + </activation> |
| 25 | + |
| 26 | + <properties> |
| 27 | + <javaee6.cts.home>/Users/dblevins/work/javaeetck</javaee6.cts.home> |
| 28 | + <javaee6.ri.home>/Users/dblevins/work/javaeetck/glassfishv3</javaee6.ri.home> |
| 29 | + </properties> |
| 30 | + </profile> |
| 31 | + </profiles> |
| 32 | + </settings> |
| 33 | + |
| 34 | + The TCK will unzip into a directory called 'javaeetck/'. The RI will |
| 35 | + unzip into a directory called 'glassfishv3'. As you can see above |
| 36 | + we've unzipped the RI inside the javaeetck directory just to keep |
| 37 | + things tidy. This is not required for the TCK to function properly. |
| 38 | + |
| 39 | +TEST RUN |
| 40 | + |
| 41 | + From inside the openejb-tck directory, a command like this will get |
| 42 | + you a little taste of running the TCK: |
| 43 | + |
| 44 | + ./runtests com.sun.ts.tests.ejb30.bb.localaccess.statelessclient |
| 45 | + |
| 46 | + We don't yet pass all of the TCK, but the above tests should be among |
| 47 | + the passing sections and are a good way to validate all is setup |
| 48 | + properly. |
| 49 | + |
| 50 | +TOMCAT |
| 51 | + |
| 52 | + By default the `runtests` command will execute the tests against an |
| 53 | + OpenEJB standalone server. |
| 54 | + |
| 55 | + To run in Tomcat, a command like the following will work: |
| 56 | + |
| 57 | + ./runtests --tomcat-version 6.0.32 com.sun.ts.tests.ejb30.bb.localaccess.statelessclient |
| 58 | + |
| 59 | + Any Tomcat version can be specfified and it will be downloaded prior |
| 60 | + to running the tck. The are stored in the $HOME/.m2/repository, but |
| 61 | + with the group id org.apache.openejb.tck as to discourage accidental |
| 62 | + dependence in other projects. |
| 63 | + |
| 64 | +TOMEE |
| 65 | + |
| 66 | + To run in Tomee, specify the webcontainer is "tomee". |
| 67 | + |
| 68 | + ./runtests --web tomee com.sun.ts.tests.ejb30.bb.localaccess.statelessclient |
| 69 | + |
| 70 | +MISC |
| 71 | + |
| 72 | + The target directory is not cleaned out at the beginning of a test |
| 73 | + run. There are a few thousand tests and sometimes multiple |
| 74 | + executions are required to get complete results. It's also nice to |
| 75 | + be able to look back on older log files when tracking down and fixing |
| 76 | + bugs that the tests uncover. |
| 77 | + |
| 78 | + Bottom line is you have to clear out the target directory manually. |
| 79 | + On occasion some bad state will get into the server install in the |
| 80 | + target/ directory. If you start getting weirld maven or groovy |
| 81 | + errors, clean out the target dir and try again. |
| 82 | + |
| 83 | +TAB COMPLETION |
| 84 | + |
| 85 | + There is a nice little script in the root directory called |
| 86 | + runtests.completer which, when sourced, can give be a great |
| 87 | + time-saver when trying to navigate to run a specific test. |
| 88 | + |
| 89 | + In bash just source the file like so: |
| 90 | + |
| 91 | + source runtests.completer |
| 92 | + |
| 93 | +LOGS |
| 94 | + |
| 95 | + The TCK for the most part runs as a client in a separate vm. The |
| 96 | + test results are sent to this vm and then logged here: |
| 97 | + |
| 98 | + target/logs/javatest.log |
| 99 | + |
| 100 | + When looking at exceptions in that log file often come from the |
| 101 | + remote deployer tool -- the same tool we use on the command line for |
| 102 | + deployment. Most of the deployment related exceptions were generated |
| 103 | + on the server and sent to the client and that's why the show up in |
| 104 | + that log. |
| 105 | + |
| 106 | + The server logs are in the usual place: |
| 107 | + |
| 108 | + target/openejb-3.2-SNAPSHOT/logs/openejb.log |
| 109 | + target/apache-tomcat-6.0.32/logs/openejb.log |
| 110 | + |
0 commit comments