Repository navigation
Run the Selenium contract tests against the on-premise web example too - #54
Merged
Merged
Conversation
…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
marked this pull request as ready for review
November 7, 2026 16:25
This was referenced Nov 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
ci/run-integration-tests.ps1runs the shared Selenium contract tests from selenium-api-tests, categoryContract, 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
Invoke-ContractTeststakes 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, runsdotnet test selenium-api-tests -c Release --filter TestCategory=ContractwithEXAMPLE_URLandEXAMPLE_LANG=java, prints the example's output on failure and stops it.web/getting-started.cloudon port 8099, as before, and forweb/getting-started.onpremon port 8098 with51DEGREES_DD_PATHset to the TAC data file thatci/fetch-assets.ps1links into the data repository. The Lite data file has neither DeviceType nor the JavaScript properties the contract tests need.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_REFpicks a branch of the suite. The example change it depended on, device-detection-java-examples#663, is in the on-premise example here, which readsPORTand51DEGREES_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.