From 9eb54c02e2e8af432ea1dc7ee8bde125074ddaf1 Mon Sep 17 00:00:00 2001 From: Jochen Delabie Date: Mon, 9 Nov 2026 18:42:08 +0100 Subject: [PATCH 1/2] README: tests()->create needs test_environment_id The documented call fails with ApiException 'test[test_environment_id] is missing'; the API requires the browser_id the test ran on. --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8d97fce..0111184 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,9 @@ $client = new TestingBot\Client($key, $secret, [ $client->tests()->list(0, 10, ['build' => 'ci-42']); // paginated, filterable $client->tests()->get($sessionId); $client->tests()->update($sessionId, ['name' => 'checkout', 'success' => false]); -$client->tests()->create(['name' => 'external result', 'success' => true]); +// test_environment_id (required): the browser_id of the browser/device it ran on, +// from $client->browsers()->list() +$client->tests()->create(['name' => 'external result', 'test_environment_id' => $browserId, 'success' => true]); $client->tests()->stop($sessionId); $client->tests()->delete($sessionId); ``` From 7d028d6b2d34b1f6b3bca3d34f66b0f1298b13c5 Mon Sep 17 00:00:00 2001 From: Jochen Delabie Date: Mon, 9 Nov 2026 19:14:17 +0100 Subject: [PATCH 2/2] README: define $browserId in the create example --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0111184..df526a4 100644 --- a/README.md +++ b/README.md @@ -53,8 +53,8 @@ $client = new TestingBot\Client($key, $secret, [ $client->tests()->list(0, 10, ['build' => 'ci-42']); // paginated, filterable $client->tests()->get($sessionId); $client->tests()->update($sessionId, ['name' => 'checkout', 'success' => false]); -// test_environment_id (required): the browser_id of the browser/device it ran on, -// from $client->browsers()->list() +// test_environment_id (required): the browser_id of the browser/device it ran on +$browserId = $client->browsers()->list()[0]['browser_id']; $client->tests()->create(['name' => 'external result', 'test_environment_id' => $browserId, 'success' => true]); $client->tests()->stop($sessionId); $client->tests()->delete($sessionId);