Executing Tests

Previous Next Contents

5 Executing Tests

The Authentication TCK uses the JUnit and Maven Surefire harness to execute the tests in the test suite.

This chapter includes the following topics:

Note

The instructions in this chapter assume that you have installed and configured your test environment as described in Chapter 3, "Installation," and Chapter 4, "Setup and Configuration,", respectively.

5.1 Starting the tests

Run the Authentication TCK from the command line in your shell environment

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.

5.1.1 To Start the tests in Command-Line Mode

To run all tests against GlassFish, use following command:

mvn -Pglassfish-ci-managed clean test surefire-report:report

This will produce a target/site/surefire-report.html summary. Replace the glassfish-ci-managed profile name with the name of any other configured compatible implementation to run the tests against that implementation.

When doing testing with staged dependencies, you may need to add the -Pstaging profile:

mvn -Pstaging -Pglassfish-ci-managed clean test surefire-report:report

When doing testing with the legacy TCK in staging, you may need to specify that staging location:

mvn -Pglassfish-ci-managed clean test surefire-report:report -Dtck.authentication.url=https://download.eclipse.org/ee4j/jakartaee-tck/jakartaee10/staged/eftl/jakarta-authentication-tck-3.0.0.zip

5.2 Running a Subset of the Tests

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

5.2.1 To Run a Subset of Tests in Command-Line Mode

  1. Change to the directory containing the tests you want to run.

  2. Start the test run by executing the following command:

    mvn clean verify

    The tests in the directory are run.

5.3 Running the Legacy TCK Against GlassFish ~~~~~~~~~~~~~~

The legacy TCK JavaTest based tests can be run against GlassFish by invoking the following from the tck/old-tck-runner directory: mvn verify

5.3 Running the Legacy TCK Against Another Compatible Implementation

Read section 5 "Executing Tests" from old-tck-runner/target/authentication-tck/docs/pdf-usersguide/Jakarta-Authentication-TCK-Users-Guide.pdf after following the "Configure Your Environment for the Legacy Jakarta Authentication TCK" section of this guide.


Previous Next Contents
Eclipse Foundation Logo  Copyright © 2017, 2021 Oracle and/or its affiliates. All rights reserved.