Skip to content

README: tests()->create needs test_environment_id - #2

Merged
jochen-testingbot merged 2 commits into
masterfrom
docs/create-test-environment-id
Nov 9, 2026
Merged

jochen-testingbot merged 2 commits into
masterfrom
docs/create-test-environment-id

Conversation

@jochen-testingbot

Copy link
Copy Markdown
Contributor

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, NotFoundException on a bad id, builds, storage uploadRemoteUrl/get/delete/list, tunnels, user, team, devices, configuration, screenshots, getAuthenticationHash, and the 1.x TestingBotAPI facade.

  • 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:
    TestingBot\Exception\ApiException: test[test_environment_id] is missing
    
    With 'test_environment_id' => $browsers[0]['browser_id'] it succeeds (created, updated and deleted in the run).

Change

README only: the create example now passes test_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.

The documented call fails with ApiException 'test[test_environment_id]
is missing'; the API requires the browser_id the test ran on.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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_id in the tests()->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

Comment thread README.md Resolved

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approved

The README example now supplies the required browser environment ID when creating a test, addressing the documented API requirement without changing library code.

No open issues 🎉

1 resolved since last review

Review effort: Lite

@jochen-testingbot
jochen-testingbot merged commit 1e9b4b0 into master Nov 9, 2026
1 check passed
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