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 running tests against Jakarta EE Compatible Implementation you need to specify the -Pplatform profile: This will set the KEYWORDS parameter accordingly for choosing the tests to be run for Platform mode (Full profile in default).

mvn -Pplatform clean test surefire-report:report 

When running tests against Jakarta EE Web Profile Compatible Implementation you need to specify the -Pplatform,web profiles: This will set the KEYWORDS parameter accordingly for choosing the tests to be run for Platform mode in web profile. Also the glassfish web profile bundle will be chosen to run the test against.

mvn -Pplatform,web clean test surefire-report:report 

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 TCK Against GlassFish

All the tests can be run against GlassFish by invoking the following from the tck/ directory: mvn clean verify.


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