Skip to content

Run the Selenium contract tests against the on-premise web example too - #54

Merged
jwrosewell merged 1 commit into
rcfrom
feature/selenium-onprem-demo
Nov 7, 2026
Merged

jwrosewell merged 1 commit into
rcfrom
feature/selenium-onprem-demo

Conversation

@ben51degrees

Copy link
Copy Markdown
Contributor

Problem

ci/run-integration-tests.ps1 runs the shared Selenium contract tests from selenium-api-tests, category Contract, against the Device Detection cloud web example only. Every web example, cloud and on-premise, is expected to give the same client-side results, so the on-premise example should be tested the same way.

Change

  • The Selenium section's Invoke-ContractTests takes the example's label, module, port and environment. It builds the module, starts the jar in the background on its port, waits for it to answer, runs dotnet test selenium-api-tests -c Release --filter TestCategory=Contract with EXAMPLE_URL and EXAMPLE_LANG=java, prints the example's output on failure and stops it.
  • It runs twice, for web/getting-started.cloud on port 8099, as before, and for web/getting-started.onprem on port 8098 with 51DEGREES_DD_PATH set to the TAC data file that ci/fetch-assets.ps1 links into the data repository. The Lite data file has neither DeviceType nor the JavaScript properties the contract tests need.
  • Each example is tested whether or not the one before it failed, and each failure is named in the job's list, so either one fails the job.

Where it came from

Opened as a draft in device-detection-java as device-detection-java#589 before that repository was archived. That draft rewrote the integration script of that repository, which cloned the examples from another repository. The script here was written for the root of this repository, so the change is written again for it rather than applied. Two parts of the draft were already here: a Selenium failure reaches the job, and SELENIUM_TESTS_REF picks a branch of the suite. The example change it depended on, device-detection-java-examples#663, is in the on-premise example here, which reads PORT and 51DEGREES_DD_PATH.

#43 changes the gate above this block in the same script, so whichever merges second needs the other merged into it.

Not checked

The contract tests only run in the integration job, so the on-premise run has not been seen passing here. The pull request workflow runs it on the configurations the change needs.

…ple too

ci/run-integration-tests.ps1 ran the shared Selenium contract tests from
selenium-api-tests, category Contract, against the cloud web example
only. Every web example, cloud and on-premise, is expected to give the
same client-side results, so the on-premise example is now tested the
same way, on port 8098, against the TAC data file that fetch-assets.ps1
links into the data repository. The Lite data file has neither
DeviceType nor the JavaScript properties the contract tests need.

Invoke-ContractTests takes the example's label, module, port and
environment, and each example is tested whether or not the one before
it failed, with each failure named in the job's list.

Carried into 51degrees-java from device-detection-java, where it was
opened as a draft against that repository's own integration script. The
script here was written for the root of this repository, so the change
is written again for it rather than applied. The parts of the draft
that let a Selenium failure reach the job and let a suite branch be
chosen were already here.
@jwrosewell
jwrosewell marked this pull request as ready for review November 7, 2026 16:25
@jwrosewell
jwrosewell merged commit d4abce9 into rc Nov 7, 2026
2 checks passed
@jwrosewell
jwrosewell deleted the feature/selenium-onprem-demo branch November 7, 2026 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants