Skip to content

Commit

Permalink
Merge pull request #195 from jamezp/issue194
Browse files Browse the repository at this point in the history
[194] Create a TCK runner for the Jakarta Servlet TCK.
  • Loading branch information
jamezp authored Oct 24, 2024
2 parents b142003 + b1bcd60 commit f9872b7
Show file tree
Hide file tree
Showing 11 changed files with 881 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@ updates:
- dependency-name: '*:*'
update-types: ['version-update:semver-major', 'version-update:semver-minor']
open-pull-requests-limit: 10
# WildFly Jakarta Servlet TCK Runner
- package-ecosystem: "maven"
directory: "/servlet-tck"
schedule:
interval: "daily"
ignore:
- dependency-name: '*:*'
update-types: ['version-update:semver-major', 'version-update:semver-minor']
open-pull-requests-limit: 10
- package-ecosystem: "github-actions"
# Workflow files stored in the
# default location of `.github/workflows`
Expand Down
61 changes: 61 additions & 0 deletions .github/workflows/servlet-tck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# This is a basic workflow that is manually triggered

name: Jakarta Servlet TCK on WildFly

# Controls when the action will run. Workflow runs when manually triggered using the UI
# or API.
on:
push:
branches:
- 'main'
paths:
- '.github/workflows/servlet-tck.yml'
- 'servlet-tck/**'
pull_request:
branches:
- 'main'
paths:
- '.github/workflows/servlet-tck.yml'
- 'servlet-tck/**'
# Currently disabled as we're not yet passing, and we don't need to add extra noise
#schedule:
# - cron: '0 0 * * *' # Every day at 00:00 UTC
workflow_dispatch:

# Only run the latest job
concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
jakarta-servlet-tck:
# The type of runner that the job will run on
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
java: ['17', '21']

# Runner steps
steps:
- uses: actions/checkout@v4
- name: Setup Java JDK
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: 'temurin'
cache: 'maven'
- name: Jakarta Servlet TCK on WildFly with Java ${{ matrix.java }}
run: |
cd servlet-tck
mvn -B clean verify -fae
- uses: actions/upload-artifact@v4
if: failure()
with:
name: test-reports-${{ matrix.java }}
path: |
'**/surefire-reports/'
'**/failsafe-reports/'
'**/server.log'
60 changes: 60 additions & 0 deletions servlet-tck/README.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
= WildFly Jakarta Servlet TCK Runner

This project allows WildFly to run the https://jakarta.ee/specifications/servlet/[Jakarta Servlet TCK].

== Requirements

You must have at least Java SE 17 and Maven installed.

== Running the TCK

The simplest way to run the TCK is to run:

[source,bash]
----
mvn clean verify
----

What this will do is download the Jakarta Servlet TCK, unzip it and install the artifacts from the ZIP to your local
Maven Repository.

=== Running Against a Specific Build of WildFly

IMPORTANT: The build must container JAR's for modules. These are used for client side testing.

To run against a specific build of WildFly you must set the `JBOSS_HOME` environment variable to the path of the server.

[source,bash]
----
JBOSS_HOME=/path/to/wildfly mvn clean verify
----

This will run the TCK against that build of WildFly and will not provision a WildFly server.

=== Running a Single Test

Running a single test is fairly easy. You simply need to run:

[source,bash]
----
mvn clean verify -Dtest=SomeTests
----

This is the same as any other

=== Debug Logging

You can output debug logging be passing the `-Dtest.log.level=DEBUG` via the command line.

=== Debugging Tests

You can debug a test by using the WildFly Arquillian debug properties.

* `wildfly.debug`: enables debugging
* `wildfly.debug.port`: The port to listen on, defaults to 8787
* `wildfly.debug.suspend`: Waits for you to attach the debugger before the startup of WildFly continues

[source,bash]
----
mvn clean verify -Dtest=SomeTests -Dwildfly.debug -Dwildfly.debug.port=5005 -Dwildfly.debug.suspend
----
133 changes: 133 additions & 0 deletions servlet-tck/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright The WildFly Authors
~ SPDX-License-Identifier: Apache-2.0
-->

<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.jboss</groupId>
<artifactId>jboss-parent</artifactId>
<version>41</version>
</parent>

<groupId>org.wildfly.tck.servlet</groupId>
<artifactId>servlet-tck-parent</artifactId>
<version>1.0.0.Final-SNAPSHOT</version>
<packaging>pom</packaging>

<name>WildFly: Jakarta Servlet TCK Parent</name>
<description>A TCK runner for the Jakarta Servlet TCK</description>
<url>https://github.com/wildfly/wildfly-tck-runner</url>
<inceptionYear>2024</inceptionYear>
<organization>
<name>Red Hat, Inc.</name>
<url>https://wildfly.org</url>
</organization>

<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>https://www.apache.org/licenses/LICENSE-2.0</url>
</license>
</licenses>

<developers>
<developer>
<name>James R. Perkins</name>
<email>[email protected]</email>
<organization>Red Hat Inc.</organization>
</developer>
</developers>
<contributors/>

<prerequisites/>

<modules>
<module>tck-setup</module>
<module>tck-runner</module>
</modules>

<scm>
<connection>scm:git:[email protected]:wildfly/wildfly-tck-runners.git</connection>
<developerConnection>scm:git:[email protected]:wildfly/wildfly-tck-runner.git</developerConnection>
<url>github.com/wildfly/wildfly-tck-runners</url>
<tag>HEAD</tag>
</scm>

<issueManagement>
<system>GitHub</system>
<url>https://github.com/wildfly/wildfly-tck-runner/issues</url>
</issueManagement>
<ciManagement/>
<distributionManagement/>

<properties>
<!-- Compile to Java 17 -->
<maven.compiler.release>17</maven.compiler.release>
<!-- The following two properties are set as IDEA doesn't just look at the maven.compiler.release property -->
<maven.compiler.source>${maven.compiler.release}</maven.compiler.source>
<maven.compiler.target>${maven.compiler.release}</maven.compiler.target>
<!-- Require a minimum of Java 17 -->
<jdk.min.version>${maven.compiler.release}</jdk.min.version>
<maven.repo.local>${settings.localRepository}</maven.repo.local>

<!-- Jakarta EE APIs Core -->
<version.jakarta.servlet-api>6.1.0</version.jakarta.servlet-api>
<version.jakarta.servlet-tck>${version.jakarta.servlet-api}</version.jakarta.servlet-tck>
</properties>
<dependencies/>

<repositories/>
<pluginRepositories/>

<build/>

<reporting/>


<profiles>
<!--
This profile enables consuming artifacts from the ossrh staging
repository group.
-->
<profile>
<id>staging</id>
<properties>
<sonatypeOssDistMgmtNexusUrl>https://jakarta.oss.sonatype.org</sonatypeOssDistMgmtNexusUrl>
<sonatypeOssDistMgmtStagingUrl>${sonatypeOssDistMgmtNexusUrl}/content/repositories/staging/</sonatypeOssDistMgmtStagingUrl>
</properties>
<repositories>
<repository>
<id>sonatype-nexus-staging</id>
<name>Sonatype Nexus Staging</name>
<url>${sonatypeOssDistMgmtStagingUrl}</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>sonatype-nexus-staging</id>
<name>Sonatype Nexus Staging</name>
<url>${sonatypeOssDistMgmtStagingUrl}</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>

</project>
Loading

0 comments on commit f9872b7

Please sign in to comment.