Skip to content

Commit

Permalink
BVTCK-23 Clarifying the requirements to pass the TCK in the documenta…
Browse files Browse the repository at this point in the history
…tion. Removing obsolete dependency in ant setup
  • Loading branch information
hferentschik committed Apr 10, 2013
1 parent 1bb6b96 commit 78e6f99
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 56 deletions.
26 changes: 14 additions & 12 deletions documentation/src/main/docbook/en-US/configuration.xml
Expand Up @@ -5,7 +5,7 @@
%BOOK_ENTITIES;
]>
<chapter id="configuration">
<title>Running the TCK</title>
<title>Running the TCK test suite</title>

<para>This chapter lays out how to run and configure the TCK harness against
a given Bean Validation provider in a given Java EE container. If you have
Expand All @@ -32,8 +32,10 @@

<para>Each example comes with a <filename>readme.md</filename> containing
the prerequisites for using this setup, how to run the TCK against
Hibernate Validator and Glassfish. The read and what needs to be changed
to use a different Bean Validation provider and EE container.</para>
Hibernate Validator and Glassfish. The readme in
<filename>setup-examples</filename> itself contains information about what
needs to be changed to use a different Bean Validation provider and EE
container.</para>

<para>The following chapters contain some more information about the
general structure of the TCK which will give you a deeper understanding
Expand All @@ -53,7 +55,8 @@
distribution must be run by TestNG (described by the TestNG documentation
as "with a <literal>testng.xml</literal> file") unmodified for an
implementation to pass the TCK. For testing purposes it is of course ok to
modify the file.</para>
modify the file (see also the TestNG <ulink
url="http://testng.org/doc/documentation-main.html#testng-xml">documentation</ulink>)</para>

<programlisting>&lt;suite name="JSR-349-TCK" verbose="1"&gt;
&lt;test name="JSR-349-TCK"&gt;
Expand Down Expand Up @@ -105,9 +108,9 @@
archive and negotiate test execution using Java's service provider
mechanism. Concretely Arquillian is looking for an implementation of the
<classname>DeployableContainer</classname> SPI on the classpath. The setup
examples use a remote JBoss AS 7 container adapter, which means that
examples use a remote Glassfish container adapter, which means that
Arquillian tries to deploy the test artifacts onto a specified remote
JBoss AS instance, run the tests remotely and report the results back to
Glassfish instance, run the tests remotely and report the results back to
the current JVM. The installation directory of the remote container is
specified via the <emphasis>container.home</emphasis> property in the
example build files. <tip>
Expand Down Expand Up @@ -140,19 +143,18 @@
container. Let's look at an example:<programlisting>&lt;arquillian xmlns="http://jboss.org/schema/arquillian" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://jboss.org/schema/arquillian
http://jboss.org/schema/arquillian/arquillian_1_0.xsd"&gt;

&lt;defaultProtocol type="Servlet 3.0"/&gt;

&lt;engine&gt;
&lt;property name="deploymentExportPath"&gt;target/artifacts&lt;/property&gt;
&lt;/engine&gt;

&lt;container qualifier="incontainer"&gt;
&lt;protocol type="Servlet 3.0"/&gt;
&lt;container qualifier="incontainer" default="true"&gt;
&lt;configuration&gt;
&lt;property name="jbossHome"&gt;${container.home}&lt;/property&gt;
&lt;property name="javaVmArguments"&gt;-Xmx1024m -XX:MaxPermSize=512m -Dvalidation.provider=${validation.provider}&lt;/property&gt;
&lt;property name="allowConnectingToRunningServer"&gt;true&lt;/property&gt;
&lt;property name="glassFishHome"&gt;@CONTAINER.HOME@&lt;/property&gt;
&lt;property name="adminHost"&gt;localhost&lt;/property&gt;
&lt;property name="adminPort"&gt;4848&lt;/property&gt;
&lt;property name="debug"&gt;true&lt;/property&gt;
&lt;/configuration&gt;
&lt;/container&gt;

Expand Down
84 changes: 43 additions & 41 deletions documentation/src/main/docbook/en-US/introduction.xml
Expand Up @@ -115,43 +115,6 @@
container is that Bean Validation is part of Java EE 7 itself.</para>
</note></para>

<section>
<title>TCK Specifications and Requirements</title>

<para>This section lists the applicable requirements and specifications
for the Bean Validation TCK.</para>

<itemizedlist>
<listitem>
<para><emphasis role="bold">Bean Validation API</emphasis> - The
Java API defined in the Bean Validation specification and provided
by the reference implementation.</para>
</listitem>

<listitem>
<para><emphasis role="bold">Arquillian</emphasis> - The Bean
Validation TCK requires Arquillian version 1.0.0.Final. The Harness
is based on <ulink url="http://testng.org">TestNG
5.x</ulink>.</para>
</listitem>

<listitem>
<para><emphasis role="bold">TCK Audit Tool</emphasis> - An
itemization of the assertions in the specification documents which
are cross referenced by the individual tests. Describes how well the
TCK covers the specification.</para>
</listitem>

<listitem>
<para><emphasis role="bold">Reference runtime</emphasis> - The
designated reference runtimes for compatibility testing of the Bean
Validation specification is the Sun Java Platform, Enterprise
Edition (Java EE) 7 reference implementation (RI), aka Glassfish
4.</para>
</listitem>
</itemizedlist>
</section>

<section>
<title>TCK Components</title>

Expand All @@ -167,10 +130,10 @@

<listitem>
<para><emphasis role="bold">The TCK audit</emphasis>
(<filename>tck-audit.xml</filename>) is used to list out the
assertions identified in the Bean Validation specification. It
matches the assertions to test cases in the test suite by unique
identifier and produces a coverage report.</para>
(<filename>tck-audit.xml</filename>) used to list out the assertions
identified in the Bean Validation specification. It matches the
assertions to test cases in the test suite by unique identifier and
produces a coverage report.</para>

<para>The audit document is provided along with the TCK. Each
assertion is defined with a reference to a chapter, section and
Expand All @@ -183,7 +146,46 @@
<para><emphasis role="bold">TCK documentation</emphasis> accompanied
by release notes identifying updates between versions.</para>
</listitem>

<listitem>
<para><emphasis role="bold">TCK Container Adapter</emphasis>
provided as a convenience for developers in order to run and debug
tests outside of the EE container. </para>
</listitem>

<listitem>
<para><emphasis role="bold">Setup examples</emphasis> demonstrating
Maven and Ant setups to run the TCK test suite</para>
</listitem>
</itemizedlist>
</section>

<section id="passing-the-tck">
<title>Passing the Bean Validation TCK</title>

<para>In order to pass the Bean Validation TCK and a requirement for
being a certified Bean Validation provider, you need to:</para>

<itemizedlist>
<listitem>
<para>Pass the Bean Validation signature tests (see <xref
linkend="sigtest"/>) asserting the correctness of the Bean
Validation API used.</para>
</listitem>

<listitem>
<para>Run and pass the test suite (see <xref
linkend="configuration"/>). The test must be run within an EE 7
container and pass with an unmodified TestNG suite file.</para>
</listitem>
</itemizedlist>

<note>
<para>The designated reference runtime for compatibility testing of
the Bean Validation specification is the Sun Java Platform, Enterprise
Edition (Java EE) 7 reference implementation (RI), aka Glassfish
4.</para>
</note>
</section>
</section>
</chapter>
1 change: 0 additions & 1 deletion setup-examples/ant/ivy.xml
Expand Up @@ -22,7 +22,6 @@

<!-- The Arquillian container adapter for the container under test. Specific to the container in which to run the tests -->
<dependency org="org.hibernate" name="hibernate-validator" rev="${version.hv}" conf="test->default(*)"/>
<dependency org="org.jboss.spec" name="jboss-javaee-6.0" rev="1.0.0.Final" conf="test->default(*)"/>
<dependency org="org.jboss.arquillian.container" name="arquillian-glassfish-managed-3.1" rev="1.0.0.Final-SNAPSHOT" conf="test-incontainer->default(*)"/>
</dependencies>
</ivy-module>
5 changes: 3 additions & 2 deletions setup-examples/readme.md
Expand Up @@ -7,7 +7,8 @@ the reference implementation of Java EE 7.
Each setup contains a readme outlining how to run the test harness using the given build system. These setups
serve as guide and can be adjusted to run against other EE containers. An example for running against JBoss AS can
be found as part of the [Hibernate Validator TCK Runner](https://github.com/hibernate/hibernate-validator/tree/master/tck-runner)
setup.
setup. It is the responsibility of the container to provide all Bean Validation dependencies, namely the BeanValidation API
as well as the Bean Validation provider. The latter is the so called Bean Validation provider under test.

Generally, to adjust the build script to another container, you would have to:

Expand All @@ -24,4 +25,4 @@ of your Bean Validation implementation.

Note, that is it **not** enough to just run and pass the TCK tests in order to be compliant Bean Validation implementation.
An other requirement for example is to pass the API [signature test](http://docs.jboss.org/hibernate/beanvalidation/tck/1.1/reference/html_single/#sigtest).
More information about all requirements of the Bean Validation TCK can be found [here](http://docs.jboss.org/hibernate/beanvalidation/tck/1.1/reference/html_single/).
More information about all requirements of the Bean Validation TCK can be found [here](http://docs.jboss.org/hibernate/beanvalidation/tck/1.1/reference/html_single/index.html#passing-the-tck).

0 comments on commit 78e6f99

Please sign in to comment.