Skip to content

BUILD: Give the browser contract suite its _51DEGREES_ names - #225

Merged
jwrosewell merged 2 commits into
rcfrom
build/suite-example-names
Nov 23, 2026
Merged

jwrosewell merged 2 commits into
rcfrom
build/suite-example-names

Conversation

@jwrosewell

@jwrosewell jwrosewell commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Problem

The selenium-api-tests suite's main (eafc1ce5, "Release Candidate (#45)", 01:11 UTC on 23 November) reads only the _51DEGREES_ names, in TestsCommon/TestConfig.cs and Examples/ExampleApps.cs. The browser contract run here still set EXAMPLE_URL, EXAMPLE_LANG, CLOUD_ROOT_URL and PAID_RESOURCE_KEY. With no _51DEGREES_EXAMPLE_URL the suite treats the example as not running, picks its default dotnet descriptor and tries to launch that example itself, which needs _51DEGREES_RESOURCE_KEY_BESPOKE. Every Contract test then fails in ClassInit or Init with "Required environment variable '_51DEGREES_RESOURCE_KEY_BESPOKE' is not set". The same fault, with the same message, failed all 9 Contract tests of the Rust repository's browser contract job (51degrees-rust run 45094371870).

A second fault kept the contract from running in CI at all. The Selenium contract ran only when _51DEGREES_RESOURCE_KEY was set. No organization secret, organization variable, repository secret or repository variable has that name, and the shared export step in common-ci exports each _51DEGREES_ name as it is, without renaming. So in CI the contract was skipped with "_51DEGREES_RESOURCE_KEY is not set, so the Selenium contract tests were not run against the web examples."

Change

ci/run-integration-tests.ps1 sets _51DEGREES_EXAMPLE_URL and _51DEGREES_EXAMPLE_LANG=java for the running example, clears both afterwards, and no longer sets CLOUD_ROOT_URL and PAID_RESOURCE_KEY, which the suite no longer reads.

The contract now asks for _51DEGREES_RESOURCE_KEY_BESPOKE, the key that carries every property, and gives it to the cloud example as _51DEGREES_RESOURCE_KEY for that run only, which is how the .NET, Python and PHP repositories give their cloud examples the key (second commit, 4d29621).

No key is passed to the suite. Its README says a Contract run against an example that is already running needs no cloud address and no key, and ExampleApps.BuildOptions reads the key only as optional in that case.

Verification

This repository's suite run happens in the Pull Requests workflow, which builds the pull requests that are ready, so it does not build this draft.

  • Every script changed parses with the PowerShell parser, and ci/check-environment-variable-names.ps1 passes on this branch, locally and in its workflow.
  • The contract section of ci/run-integration-tests.ps1 (first commit) was run on its own on Windows against the cloud web example built from the published packages, with the suite cloned at its main (eafc1ce5). The suite tested the running example under the new names, and no test asked for a key ("The 'java' example's client-side callback did not complete and render into '#apple-detection' within 60s."). The example's web application did not start in that local build, so all 9 tests failed on the page and this is not a pass. The CI build uses the -Pdev profile instead.
  • The same change was proven elsewhere against the suite's main. In the Rust repository (51degrees-rust#512) it took both browser contract jobs from 0 of 9 to 9 of 9 (run 45097629163). The contract sections of the .NET (51degrees-dotnet#311) and Node (51degrees-node#230) repositories, run on their own against their cloud web examples, went from 0 of 9 on rc to 9 of 9 with the change, the Node one with only _51DEGREES_RESOURCE_KEY_BESPOKE set.

A Pull Requests run once this draft is ready is still needed to show the contract passing here.

The selenium-api-tests suite now reads only the _51DEGREES_ names. The
browser contract run still set EXAMPLE_URL and EXAMPLE_LANG, so the suite
saw no running example, tried to launch a .NET example of its own, and
failed every Contract test asking for _51DEGREES_RESOURCE_KEY_BESPOKE.

Set _51DEGREES_EXAMPLE_URL and _51DEGREES_EXAMPLE_LANG instead. An example
that is already running needs no key from the suite.

CLOUD_ROOT_URL and PAID_RESOURCE_KEY are no longer set, because the suite
no longer reads them.
The Selenium contract ran only when _51DEGREES_RESOURCE_KEY was set. CI
has no secret or variable of that name, and common-ci exports each
_51DEGREES_ name as it is, so the contract was skipped in CI.

The run now asks for _51DEGREES_RESOURCE_KEY_BESPOKE, the key that
carries every property, and gives it to the cloud example under the name
it reads, _51DEGREES_RESOURCE_KEY, for that run only.
@jwrosewell
jwrosewell marked this pull request as ready for review November 23, 2026 03:00
@jwrosewell
jwrosewell merged commit 3f4d643 into rc Nov 23, 2026
6 checks passed
@jwrosewell
jwrosewell deleted the build/suite-example-names branch November 23, 2026 03:00
@jwrosewell jwrosewell mentioned this pull request Nov 23, 2026
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.

1 participant