| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!--NewPage--> |
| <HTML> |
| <HEAD> |
| <!-- Generated by javadoc (build 1.6.0_13) on Mon Dec 07 14:17:39 IST 2009 --> |
| <META http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <TITLE> |
| org.apache.axis2.transport.testkit (Apache Axis2 - Transport - Root 1.0.0 API) |
| </TITLE> |
| |
| <META NAME="date" CONTENT="2009-12-07"> |
| |
| <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style"> |
| |
| <SCRIPT type="text/javascript"> |
| function windowTitle() |
| { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="org.apache.axis2.transport.testkit (Apache Axis2 - Transport - Root 1.0.0 API)"; |
| } |
| } |
| </SCRIPT> |
| <NOSCRIPT> |
| </NOSCRIPT> |
| |
| </HEAD> |
| |
| <BODY BGCOLOR="white" onload="windowTitle();"> |
| <HR> |
| |
| |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <A NAME="navbar_top"><!-- --></A> |
| <A HREF="#skip-navbar_top" title="Skip navigation links"></A> |
| <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> |
| <TR> |
| <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> |
| <A NAME="navbar_top_firstrow"><!-- --></A> |
| <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> |
| <TR ALIGN="center" VALIGN="top"> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> |
| <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Package</B></FONT> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-use.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> |
| </TR> |
| </TABLE> |
| </TD> |
| <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> |
| </EM> |
| </TD> |
| </TR> |
| |
| <TR> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| <A HREF="../../../../../org/apache/axis2/transport/tcp/package-summary.html"><B>PREV PACKAGE</B></A> |
| <A HREF="../../../../../org/apache/axis2/transport/testkit/axis2/package-summary.html"><B>NEXT PACKAGE</B></A></FONT></TD> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| <A HREF="../../../../../index.html?org/apache/axis2/transport/testkit/package-summary.html" target="_top"><B>FRAMES</B></A> |
| <A HREF="package-summary.html" target="_top"><B>NO FRAMES</B></A> |
| <SCRIPT type="text/javascript"> |
| <!-- |
| if(window==top) { |
| document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); |
| } |
| //--> |
| </SCRIPT> |
| <NOSCRIPT> |
| <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A> |
| </NOSCRIPT> |
| |
| |
| </FONT></TD> |
| </TR> |
| </TABLE> |
| <A NAME="skip-navbar_top"></A> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| |
| <HR> |
| <H2> |
| Package org.apache.axis2.transport.testkit |
| </H2> |
| Transport test kit base package. |
| <P> |
| <B>See:</B> |
| <BR> |
| <A HREF="#package_description"><B>Description</B></A> |
| <P> |
| |
| <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
| <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> |
| <B>Interface Summary</B></FONT></TH> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD WIDTH="15%"><B><A HREF="../../../../../org/apache/axis2/transport/testkit/Adapter.html" title="interface in org.apache.axis2.transport.testkit">Adapter</A></B></TD> |
| <TD> </TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD WIDTH="15%"><B><A HREF="../../../../../org/apache/axis2/transport/testkit/MessageExchangeValidator.html" title="interface in org.apache.axis2.transport.testkit">MessageExchangeValidator</A></B></TD> |
| <TD> </TD> |
| </TR> |
| </TABLE> |
| |
| |
| <P> |
| |
| <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
| <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> |
| <B>Class Summary</B></FONT></TH> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD WIDTH="15%"><B><A HREF="../../../../../org/apache/axis2/transport/testkit/AdapterUtils.html" title="class in org.apache.axis2.transport.testkit">AdapterUtils</A></B></TD> |
| <TD> </TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD WIDTH="15%"><B><A HREF="../../../../../org/apache/axis2/transport/testkit/ManagedTestSuite.html" title="class in org.apache.axis2.transport.testkit">ManagedTestSuite</A></B></TD> |
| <TD> </TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD WIDTH="15%"><B><A HREF="../../../../../org/apache/axis2/transport/testkit/MessageTestData.html" title="class in org.apache.axis2.transport.testkit">MessageTestData</A></B></TD> |
| <TD> </TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD WIDTH="15%"><B><A HREF="../../../../../org/apache/axis2/transport/testkit/TransportTestSuiteBuilder.html" title="class in org.apache.axis2.transport.testkit">TransportTestSuiteBuilder</A></B></TD> |
| <TD> </TD> |
| </TR> |
| </TABLE> |
| |
| |
| <P> |
| <A NAME="package_description"><!-- --></A><H2> |
| Package org.apache.axis2.transport.testkit Description |
| </H2> |
| |
| <P> |
| Transport test kit base package. |
| |
| <h2>Introduction and high level overview</h2> |
| |
| In general a good test suite for an Axis2 transport should contain test cases that |
| <ul> |
| <li>test the transport sender in isolation, i.e. with non Axis2 endpoints;</li> |
| <li>test the transport listener in isolation, i.e. with non Axis2 clients;</li> |
| <li>test the interoperability between the transport sender and the transport listener.</li> |
| </ul> |
| In addition, the test suite should cover |
| <ul> |
| <li>different message exchange patterns (at least one-way and request-response);</li> |
| <li>different content types (SOAP 1.1/1.2, POX, SOAP with attachments, MTOM, plain text, binary, etc.).</li> |
| </ul> |
| Also for some transports it is necessary to execute the tests with different transport |
| configurations or with different protocol providers. For example, HTTP transport implementations |
| are tested in HTTP 1.0 and HTTP 1.1 mode, and the JMS transport is tested with different |
| JMS providers (currently Qpid and ActiveMQ). |
| <p> |
| The test kit grew out of the idea that is should be possible to apply a common set of tests |
| (with different MEPs and content types) to several transports with a minimum of code duplication. |
| By providing non Axis2 test clients and endpoints as well as the code that sets up the |
| necessary environment as input, the framework should then be able to build a complete test suite |
| for the transport. |
| <p> |
| It is clear that since each transport protocol has its own specificities, a high level of abstraction |
| is required to achieve this goal. The following sections give a high level overview of the |
| various abstractions that have been introduced in the test kit. |
| |
| <h3>Integration with JUnit</h3> |
| |
| One of the fundamental requirements for the test kit is to integrate well with JUnit. |
| This requirement ensures that the tests can be executed easily as part of the Maven |
| build and that other available tools such as test report generators and test coverage |
| analysis tools can be used. |
| <p> |
| The usual approach to write JUnit tests is to extend <CODE>junit.framework.TestCase.TestCase</CODE> |
| and to define a set of methods that implement the different test cases. Since the goal of the framework |
| is to build test suites in an automated way and the number of test cases can be fairly high, this |
| approach would not be feasible. Fortunately JUnit supports another way to create a test suite |
| dynamically. Indeed JUnit scans the test code for methods with the following signature: |
| |
| <pre>public static TestSuite suite()</pre> |
| |
| A typical transport test will implement this method and use <A HREF="../../../../../org/apache/axis2/transport/testkit/TransportTestSuiteBuilder.html" title="class in org.apache.axis2.transport.testkit"><CODE>TransportTestSuiteBuilder</CODE></A> |
| to let the framework create the test suite. |
| |
| <h3>Test case naming</h3> |
| |
| One problem that immediately arises when building a test suite dynamically is that each test |
| case must have a name (which should be unique) and that this name should be sufficiently meaningful |
| so that when it appears in a report a human should be able to get a basic idea of what the test case does. |
| The names generated by the test kit have two parts: |
| <ul> |
| <li>A numeric ID which is the sequence number of the test case in the test suite.</li> |
| <li>A set of key-value pairs describing the components that are used in the test case.</li> |
| </ul> |
| Example: |
| |
| <pre>0076:test=REST,client=java.net,endpoint=axis</pre> |
| |
| The algorithm used by the test kit to collect the key-value pairs is described in the documentation of |
| the <A HREF="../../../../../org/apache/axis2/transport/testkit/name/package-summary.html"><CODE>org.apache.axis2.transport.testkit.name</CODE></A> package. |
| |
| <h3>Resource management</h3> |
| |
| In general setting up the environment in which a given test case is executed may be quite expensive. |
| For example, running a test case for the JMS transport requires starting a message broker. Also |
| every test case requires at least an Axis2 client and/or server environment to deploy the transport. |
| Setting up and tearing down the entire environment for every single test case would be far too |
| expensive. On the other hand the environments required by different test cases in a single test suite |
| are in general very different from each other so that it would not possible to set up a common |
| environment used by all the test cases. |
| <p> |
| To overcome this difficulty, the test kit has a mechanism that allows a test case to reuse resources |
| from the previous test case. This is managed in an entirely transparent way by a lightweight |
| dependency injection container (see [TODO: need to regroup this code in a single package]), so that |
| the test case doesn't need to care about it. |
| <p> |
| The mechanism is based on a set of simple concepts: [TODO: this is too detailed for a high level overview and |
| should be moved to the Javadoc of the relevant package] |
| <ul> |
| <li><p>Every test case is linked to a set of <em>resources</em> which are plain Java objects (that are not |
| required to extend any particular class or implement any particular interface). |
| These objects define the <em>resource set</em> of the test case (which is represented |
| internally by a <A HREF="../../../../../org/apache/axis2/transport/testkit/tests/TestResourceSet.html" title="class in org.apache.axis2.transport.testkit.tests"><CODE>TestResourceSet</CODE></A> |
| object).</p></li> |
| <li><p>The lifecycle of a resource is managed through methods annotated by |
| <A HREF="../../../../../org/apache/axis2/transport/testkit/tests/Setup.html" title="annotation in org.apache.axis2.transport.testkit.tests"><CODE>Setup</CODE></A> and <A HREF="../../../../../org/apache/axis2/transport/testkit/tests/TearDown.html" title="annotation in org.apache.axis2.transport.testkit.tests"><CODE>TearDown</CODE></A>. |
| These annotations identify the methods to be called when the framework sets up and tears down the resource. |
| The arguments of the methods annotated using <A HREF="../../../../../org/apache/axis2/transport/testkit/tests/Setup.html" title="annotation in org.apache.axis2.transport.testkit.tests"><CODE>Setup</CODE></A> also |
| define the <em>dependencies</em> of that resource.</p> |
| <p>Example:</p> |
| <pre>public class MyTestClient { |
| \@Setup |
| private void setUp(MyProtocolProvider provider) throws Exception { |
| provider.connect(); |
| } |
| }</pre> |
| <p>As shown in this example, dependencies are specified by class (which may be abstract). The actual |
| instance that will be injected is selected during <em>resource resolution</em>.</p></li> |
| <li><p>Resources are (in general) resolved from the resource set of the test case. For example an instance |
| of the <code>MyTestClient</code> class can only be used as a resource for a given test case |
| if the resource set of this test case also contains an instance of <code>MyProtocolProvider</code> |
| (more precisely an object that is assignment compatible with <code>MyProtocolProvider</code>).</p></li> |
| <li><p>A resource will be reused across two test cases if it is part of the resource sets of both |
| test cases and all its dependencies (including transitive dependencies) are part of both resource sets. |
| The precise meaning of "reusing" in this context is using the same instance without calling the |
| tear down and set up methods.</p> |
| <p>For example, consider the following test cases and resource sets:</p> |
| <table border="1"> |
| <tr><th>Test case</th><th>Resource set</th></tr> |
| <tr><td>T1</td><td><code>c:MyTestClient</code>, <code>p1:MyProtocolProvider</code></td></tr> |
| <tr><td>T2</td><td><code>c:MyTestClient</code>, <code>p1:MyProtocolProvider</code>, <code>r:SomeOtherResourceType</code></td></tr> |
| <tr><td>T3</td><td><code>c:MyTestClient</code>, <code>p2:MyProtocolProvider</code>, <code>r:SomeOtherResourceType</code></td></tr> |
| </table> |
| <p>Assuming that <code>SomeOtherResourceType</code> is independent of <code>MyTestClient</code> and |
| <code>MyProtocolProvider</code>, the lifecycle of the different resources will be as follows:</p> |
| <table border="1"> |
| <tr><th>Transition</th><th>Lifecycle actions</th></tr> |
| <tr><td>• → T1</td><td>set up <code>p1</code>, set up <code>c</code></td></tr> |
| <tr><td>T1 → T2</td><td>set up <code>r</code></td></tr> |
| <tr><td>T2 → T3</td><td>tear down <code>c</code>, tear down <code>p1</code>, set up <code>p2</code>, set up <code>c</code></td></tr> |
| <tr><td>T3 → •</td><td>tear down <code>c</code>, tear down <code>p2</code>, tear down <code>r</code></td></tr> |
| </table> |
| <p>Even if T2 and T3 use the same instance <code>c</code> of <code>MyTestClient</code>, this resource |
| is not reused (in the sense defined above) since the <code>MyProtocolProvider</code> dependency |
| resolves to different instances.</p></li> |
| </ul> |
| |
| <h3>Resources required by a transport test case</h3> |
| |
| Every transport test case (extending <A HREF="../../../../../org/apache/axis2/transport/testkit/tests/MessageTestCase.html" title="class in org.apache.axis2.transport.testkit.tests"><CODE>MessageTestCase</CODE></A>) |
| at least requires three resources: |
| <ul> |
| <li>A test client (<A HREF="../../../../../org/apache/axis2/transport/testkit/client/AsyncTestClient.html" title="interface in org.apache.axis2.transport.testkit.client"><CODE>AsyncTestClient</CODE></A> |
| or <A HREF="../../../../../org/apache/axis2/transport/testkit/client/RequestResponseTestClient.html" title="interface in org.apache.axis2.transport.testkit.client"><CODE>RequestResponseTestClient</CODE></A>) that |
| allows the test case to send messages (and receive responses).</li> |
| <li>A test endpoint (<A HREF="../../../../../org/apache/axis2/transport/testkit/endpoint/AsyncEndpoint.html" title="interface in org.apache.axis2.transport.testkit.endpoint"><CODE>AsyncEndpoint</CODE></A> |
| or <A HREF="../../../../../org/apache/axis2/transport/testkit/endpoint/InOutEndpoint.html" title="interface in org.apache.axis2.transport.testkit.endpoint"><CODE>InOutEndpoint</CODE></A>). In the one-way case, |
| this resource is used to receive requests send by the test client. In the request-response |
| case its responsibility is to generate well defined responses (typically a simple echo).</li> |
| <li>A channel (<A HREF="../../../../../org/apache/axis2/transport/testkit/channel/AsyncChannel.html" title="interface in org.apache.axis2.transport.testkit.channel"><CODE>AsyncChannel</CODE></A> or |
| <A HREF="../../../../../org/apache/axis2/transport/testkit/channel/RequestResponseChannel.html" title="interface in org.apache.axis2.transport.testkit.channel"><CODE>RequestResponseChannel</CODE></A>. This resource |
| manages everything that it necessary to transport a message from a client to an endpoint. |
| Depending on the transport this task can be fairly complex. For example, in the JMS case, |
| the channel creates the required JMS destinations and registers them in JNDI, so that |
| they can be used by the client and by the endpoint. On the other hand, for HTTP the |
| channel implementation is very simple and basically limited to the computation of the |
| endpoint reference.</li> |
| </ul> |
| <p>The test kit provides the following Axis2 based test client and endpoint implementations:</p> |
| <table border="1"> |
| <tr> |
| <th></th> |
| <th>One-way</th> |
| <th>Request-response</th> |
| </tr> |
| <tr> |
| <th>Client</th> |
| <td><A HREF="../../../../../org/apache/axis2/transport/testkit/axis2/client/AxisAsyncTestClient.html" title="class in org.apache.axis2.transport.testkit.axis2.client"><CODE>AxisAsyncTestClient</CODE></A></td> |
| <td><A HREF="../../../../../org/apache/axis2/transport/testkit/axis2/client/AxisRequestResponseTestClient.html" title="class in org.apache.axis2.transport.testkit.axis2.client"><CODE>AxisRequestResponseTestClient</CODE></A></td> |
| </tr> |
| <tr> |
| <th>Endpoint</th> |
| <td><A HREF="../../../../../org/apache/axis2/transport/testkit/axis2/endpoint/AxisAsyncEndpoint.html" title="class in org.apache.axis2.transport.testkit.axis2.endpoint"><CODE>AxisAsyncEndpoint</CODE></A></td> |
| <td><A HREF="../../../../../org/apache/axis2/transport/testkit/axis2/endpoint/AxisEchoEndpoint.html" title="class in org.apache.axis2.transport.testkit.axis2.endpoint"><CODE>AxisEchoEndpoint</CODE></A></td> |
| </tr> |
| </table> |
| |
| <h3>Message encoders and decoders</h3> |
| |
| Different clients, endpoints and test cases may have fairly different ways to "naturally" represent |
| a message: |
| <ul> |
| <li>To test the listener of an HTTP transport, an obvious choice is to build a test client |
| that relies on standard Java classes such as <CODE>URLConnection</CODE>. For that |
| purpose the most natural way to represent a message is as a byte sequence.</li> |
| <li>All Axis2 based test clients and endpoints already have a canonical message |
| representation, which is the SOAP infoset retrieved by |
| <CODE>MessageContext.getEnvelope()</CODE>.</li> |
| <li>A test case for plain text messages would naturally represent the test message |
| as a string.</li> |
| </ul> |
| Since defining a message representation that would be suitable for all clients, endpoints and test |
| cases (and make their implementation simple) is impossible, a different approach has been chosen |
| in the framework. Every client, endpoint or test case implementation chooses the Java type that is |
| considers as best suited to represent the message. When invoking the test client, a test case |
| uses a <A HREF="../../../../../org/apache/axis2/transport/testkit/message/MessageEncoder.html" title="interface in org.apache.axis2.transport.testkit.message"><CODE>MessageEncoder</CODE></A> to transform the message |
| from its own representation to the representation used by the test client. In the same way, |
| a <A HREF="../../../../../org/apache/axis2/transport/testkit/message/MessageDecoder.html" title="interface in org.apache.axis2.transport.testkit.message"><CODE>MessageDecoder</CODE></A> is used to transform the message |
| intercepted by the endpoint (in the one-way case) or the response message received by the test client |
| (in the request-response case). |
| <p> |
| [TODO: currently message encoders and decoders are chosen at compile time and the transformation is |
| is invoked indirectly by adapters; this will change in the future so that encoders and decoders are |
| selected dynamically at runtime] |
| |
| <h3>Exclusion rules</h3> |
| |
| Sometimes it is necessary to exclude particular test cases (or entire groups of test cases) from the |
| test suite generated by the test kit. There are various reasons why one would do that: |
| <ul> |
| <li>A test case fails because of some known issue in the transport. In that case it should be excluded |
| until the issue is fixed. This is necessary to distinguish this type of failure from regressions. |
| In general the tests checked in to source control should always succeed unless there is a regression.</li> |
| <li>Sometimes a particular test case doesn't make sense for a given transport. For example a test |
| case that checks that the transport is able to handle large payloads would not be applicable |
| to the UDP transport which has a message size limitation.</li> |
| <li>The test suite builder generates test cases by computing all possible combinations of MEPs, content types, |
| clients, endpoints and environment setups. For some transports this results in a very high number of test |
| cases. Since these test cases generally have a high degree of overlap, one can use exclusion rules |
| to reduce the number of test cases to a more reasonable value.</li> |
| </ul> |
| The test kit allows to specify exclusion rules using LDAP filter expressions. It takes advantage of the |
| fact that each test case has a set of key-value pairs used to build the test case name. The LDAP filters |
| are evaluated against this set. |
| For example, <A HREF="../../../../../org/apache/axis2/transport/testkit/TransportTestSuiteBuilder.html" title="class in org.apache.axis2.transport.testkit"><CODE>TransportTestSuiteBuilder</CODE></A> defines the following |
| default exclusion rule: |
| |
| <pre>(&(client=*)(endpoint=*)(!(|(client=axis)(endpoint=axis))))</pre> |
| |
| This rule excludes all test cases that would use a non Axis2 client and a non Axis2 endpoint. |
| |
| <h3>Logging</h3> |
| |
| Transport test cases generally involve several interacting components and some of these components |
| may use multithreading. Also experience has shown that some test cases may randomly fail (often with |
| a failure probablity highly dependent on the execution platform) because of subtle problems in the |
| transport under test or in the tests themselves. All this can make debugging extremely difficult. |
| To simplify this task, the test kit collects (or provides the necessary infrastructure to collect) |
| a maximum of information during the execution of each test case. |
| <p> |
| The collected information is written to a set of log files managed by |
| <A HREF="../../../../../org/apache/axis2/transport/testkit/util/LogManager.html" title="class in org.apache.axis2.transport.testkit.util"><CODE>LogManager</CODE></A>. An instance is added automatically to |
| the resource set of every test case and other resources can acquire a reference through the dependency |
| injection mechanism described above. This is the recommended approach. Alternatively, the log manager |
| can be used as a singleton through <A HREF="../../../../../org/apache/axis2/transport/testkit/util/LogManager.html#INSTANCE"><CODE>LogManager.INSTANCE</CODE></A>. |
| <p> |
| Logs files are written to subdirectories of <tt>target/testkit-logs</tt>. The directory structure has |
| a two level hierarchy identifying the test class (by its fully qualified name) and the test case |
| (by its ID). It should be noted that the test results themselves (in particular the exception in case |
| of failure) are still written to the standard JUnit/Surefire logs and that these logs should be |
| consulted first. The test kit specific log files are only meant to provide additional information. |
| <p> |
| Each test case at least produces a <tt>01-debug.log</tt> file with the messages that were logged |
| (using JCL) at level DEBUG during the execution of the test case. In addition, depending on the |
| components involved in the test, the test kit will produce the following logs (<tt>XX</tt> |
| denotes a sequence number which is generated automatically): |
| <dl> |
| <dt><tt>XX-formatter.log</tt></dt> |
| <dt><tt>XX-builder.log</tt></dt> |
| <dd><p>These files are produced when Axis2 test clients and endpoints are used. |
| <tt>XX-formatter.log</tt> will contain the payload of an incoming message as seen by the |
| <CODE>MessageFormatter</CODE>. <tt>XX-builder.log</tt> on the other |
| hand will contain the payload of an outgoing message as produced by the |
| <CODE>Builder</CODE>. Note that the number of log files depends on |
| serveral factors, such as the MEP, whether the client or endpoint is Axis2 based or not and |
| whether the transport chooses to use message builders and formatters or not.</p> |
| <p>These files provides extremely valuable information since it is very difficult to get this |
| data using other debugging techniques. Note that the files are created by |
| <A HREF="../../../../../org/apache/axis2/transport/testkit/axis2/LogAspect.html" title="class in org.apache.axis2.transport.testkit.axis2"><CODE>LogAspect</CODE></A> which relies on Aspect/J to |
| intercept calls to message formatters and builders. This will only work if the tests are |
| run with the Aspect/J weaver.</p></dd> |
| <dt><tt>XX-service-parameters.log</tt></dt> |
| <dd><p>If the test case uses an Axis2 based endpoint, this file will contain the parameters |
| of the <CODE>AxisService</CODE> implementing this endpoint. |
| This information is useful since the service configuration is in general determined |
| by different components involved in the test.</p></dd> |
| </dl> |
| <P> |
| |
| <P> |
| <DL> |
| </DL> |
| <HR> |
| |
| |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <A NAME="navbar_bottom"><!-- --></A> |
| <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> |
| <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> |
| <TR> |
| <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> |
| <A NAME="navbar_bottom_firstrow"><!-- --></A> |
| <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> |
| <TR ALIGN="center" VALIGN="top"> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> |
| <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Package</B></FONT> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-use.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> |
| </TR> |
| </TABLE> |
| </TD> |
| <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> |
| </EM> |
| </TD> |
| </TR> |
| |
| <TR> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| <A HREF="../../../../../org/apache/axis2/transport/tcp/package-summary.html"><B>PREV PACKAGE</B></A> |
| <A HREF="../../../../../org/apache/axis2/transport/testkit/axis2/package-summary.html"><B>NEXT PACKAGE</B></A></FONT></TD> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| <A HREF="../../../../../index.html?org/apache/axis2/transport/testkit/package-summary.html" target="_top"><B>FRAMES</B></A> |
| <A HREF="package-summary.html" target="_top"><B>NO FRAMES</B></A> |
| <SCRIPT type="text/javascript"> |
| <!-- |
| if(window==top) { |
| document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); |
| } |
| //--> |
| </SCRIPT> |
| <NOSCRIPT> |
| <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A> |
| </NOSCRIPT> |
| |
| |
| </FONT></TD> |
| </TR> |
| </TABLE> |
| <A NAME="skip-navbar_bottom"></A> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| |
| <HR> |
| Copyright © 2004-2009 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved. |
| </BODY> |
| </HTML> |