Repository navigation
README: tests()->create needs test_environment_id - #2
Merged
Merged
Conversation
The documented call fails with ApiException 'test[test_environment_id] is missing'; the API requires the browser_id the test ran on.
There was a problem hiding this comment.
🟡 Changes recommended
The README example uses an undefined $browserId, resulting in an invalid request without a valid test_environment_id until the snippet is corrected.
1 open issue
What changed in this PR
Updates the README’s external test creation example to include the required test_environment_id parameter.
Changes:
- Documents that the environment ID comes from
browsers()->list(). - Includes
test_environment_idin thetests()->create()payload. - Makes no source-code or release changes.
| File | Summary | Review |
|---|---|---|
README.md |
Documents the required test environment ID for creating external results. | Nit: $browserId is referenced without being defined; derive it from the listed browser environments before calling create. |
Review effort: Lite
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.

Part of https://testingbot-team.atlassian.net/browse/TB-1008 (docs audit: run every SDK README snippet).
README walkthrough (Packagist 2.0.0,
composer:2/ PHP 8.5)28 of 30 calls work against the live API: browsers (incl.
BrowserType::Webdriver), tests list/get/update/delete,NotFoundExceptionon a bad id, builds, storageuploadRemoteUrl/get/delete/list, tunnels, user, team, devices, configuration, screenshots,getAuthenticationHash, and the 1.xTestingBotAPIfacade.tests()->list(0, 10, ['build' => 'ci-42'])404s only because that build doesn't exist in the account. That is expected.tests()->create(['name' => 'external result', 'success' => true])fails:'test_environment_id' => $browsers[0]['browser_id']it succeeds (created, updated and deleted in the run).Change
README only: the
createexample now passestest_environment_id, with a comment saying where the id comes from. No code change and no release needed. Packagist renders the README from the default branch.