type=page
status=published
title=Executing Tests
next=debug.html
prev=config.html
~~~~~~
include::attributes.conf[]
Executing Tests
===============

[[GBFWO]]


[[executing-tests]]
5 Executing Tests
-----------------

The {TechnologyShortName} TCK uses the Junit 
framework to execute the tests.

This chapter includes the following topics:

* link:#GBFUZ[Running All Tests]
* link:#GBFWM[Running a Subset of the Tests]
* link:#GCLRR[Running the TCK Against your selected CI]
* link:#GCLRZ[Running the TCK Against a Vendor's Implementation]
* link:#GBFVK[Test Reports]


[NOTE]
=======================================================================

The instructions in this chapter assume that you have installed and
configured your test environment as described in
link:install.html#GBFTP[Chapter 3, "Installation,"] and
link:config.html#GBFVV[Chapter 4, "Setup and Configuration,"],
respectively.

=======================================================================

ifdef::rebuild[]
As explained in link:rebuild.html#GCLIZ[Appendix B, "Packaging the
Test Applications in Servlet-Compliant WAR
Files With VI-Specific Information,"] the {TechnologyShortName} TCK
introduces the concept of repackaging the TCK tests.
endif::rebuild[]


[[GBFUZ]][[starting-javatest]]

5.1 Starting the tests
~~~~~~~~~~~~~~~~~~~~~~

The {TechnologyShortName} TCK can be run from the command line 
in your shell environment by executing tests from the TCK jar.


[NOTE]
=======================================================================

The `mvn` command referenced in the following
two procedures and elsewhere in this guide is the Apache Maven
build tool, which will need to be downloaded separately.

=======================================================================


[[GBFVW]][[to-start-javatest-in-command-line-mode]]

5.1.1 To Run All Tests
^^^^^^^^^^^^^^^^^^^^^^

To run all tests, enter the following command:

[source,subs="attributes"]
----
cd ${TechnologyTCKHomeEnv}/bin
mvn verify
----

[[GBFWM]][[running-a-subset-of-the-tests]]

5.2 Running a Subset of the Tests
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Use the following modes to run a subset of the tests:

* link:#GBFWK[Section 5.2.1, "To Run a Single Test"]
* link:#GCMCA[Section 5.2.2, "To Run a Subset of Tests"]
* link:#GCMCU[Section 5.2.3, "To Run Signature Tests"]


[[GBFWK]][[to-run-a-single-test]]

5.2.1 To Run a Single Test
^^^^^^^^^^^^^^^^^^^^^^^^^^

To run a single test, enter the following command:

[source,subs="attributes"]
----
cd ${TechnologyTCKHomeEnv}/bin
mvn verify -Dtest={singleTestExample}
----

[[GCMCA]][[to-run-a-subset-of-tests]]

5.2.2 To Run a Subset of Tests
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

To run a subset of tests, enter the following command:

[source,subs="attributes"]
----
cd ${TechnologyTCKHomeEnv}/bin
mvn verify -Dtest={subsetTestDirectoryExample}
----

[[GCMCU]][[to-run-signature-tests]]

5.2.3 To Run Signature Tests
^^^^^^^^^^^^^^^^^^^^^^^^^^^^

To run the {TechnologyShortName} TCK Signature Tests, enter the
following command:

[source,subs="attributes"]
----
cd ${TechnologyTCKHomeEnv}/bin
mvn verify -Dtest={sigTestExample}
----


[[GCLRR]][[running-the-tck-against-the-ri]]

5.3 Running the TCK Against another CI
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Some test scenarios are designed to ensure that the configuration and deployment of
all the prebuilt {TechnologyShortName} TCK tests against one Compatible
Implementation are successful operating with other compatible implementations, and that the TCK is ready for
compatibility testing against the Vendor and Compatible Implementations.

1.  Verify that you have followed the configuration instructions in
link:config.html#GBFVU[Section 4.1, "Configuring Your Environment to Run
the TCK Against the Compatible Implementation."]
2.  Run the tests, as described in link:#GBFUZ[Section 5.1, "Starting
the Tests"], and, if desired, link:#GBFWM[Section 5.2, "Running a Subset
of the Tests."]

.Example:
[source,subs="attributes"]
----
cd ${TechnologyTCKHomeEnv}/bin
mvn verify -Djsonp-impl.groupId=org.eclipse.parsson -Djsonp-impl.artifactId=parsson -Djsonp-impl.version=1.1.0
----

[[GCLRZ]][[running-the-tck-against-a-vendors-implementation]]

5.4 Running the TCK Against a Vendor's Implementation
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This test scenario is one of the compatibility test phases that all
Vendors must pass.

1.  Verify that you have followed the configuration instructions in
link:config.html#GCLHU[Section 4.2, "Configuring Your Environment to
Run the TCK Against the Vendor Implementation."]
2.  Run the tests, as described in link:#GBFUZ[Section 5.1, "Starting
the Tests"], and, if desired, link:#GBFWM[Section 5.2, "Running a Subset
of the Tests."]

.Example:
[source,subs="attributes"]
----
cd ${TechnologyTCKHomeEnv}/bin
mvn verify -Djsonp-api.groupId=jakarta.json -Djsonp-api.artifactId=jakarta.json-api -Djsonp-api.version=2.1.0
----

[[GBFVK]][[test-reports]]

5.5 Test Reports
~~~~~~~~~~~~~~~~

A set of report files is created for every test run. These report files
can be found in the target directory that the test is run. After a test run is
completed, the Junit framework writes  reports for the test run.


