Our Selenium Grid 4.x setup runs parallel test executions, but the results aren’t updating in Jira 8’s test execution tracker (we’re using Zephyr Scale). The tests complete successfully in Selenium, but Jira shows them as “In Progress” indefinitely.
We’re using a webhook to push results, and I can see the POST requests in our logs, but they’re timing out after about 30 seconds. When I try to update test execution status manually via REST API, it works fine for single tests but fails when batching multiple results.
This is breaking our sprint reporting because test completion metrics are inaccurate. The webhook timeout issue seems related to authentication headers taking too long to validate.
Here’s the complete solution addressing all four technical areas:
1. Zephyr Webhook Timeout Resolution:
The 30-second timeout is caused by Zephyr Scale processing each result synchronously. Configure your webhook to use async mode by adding this header:
X-Zephyr-Async: true
This tells Zephyr to queue the results for background processing instead of blocking the webhook response.
2. Selenium Grid 4.x Configuration:
Modify your Grid hub configuration to batch results before sending to Jira. In your test framework, collect results in memory and flush them every 5 minutes or when 50 results accumulate:
List<TestResult> batch = new ArrayList<>();
if (batch.size() >= 50 || timeSinceLastFlush > 300000) {
zephyrClient.submitBatch(batch);
batch.clear();
}
3. REST API Batch Update Implementation:
Use Zephyr’s bulk endpoint with proper structure:
This endpoint can handle up to 100 results per call and processes them asynchronously.
4. Authentication Headers Optimization:
The authentication delay is caused by token validation on every request. Implement token caching in your integration layer:
Generate a long-lived API token (90 days) instead of using session tokens
Cache the token in your test framework and reuse it across all Grid nodes
Include the token in the Authorization header: `Bearer {cached_token}
Only regenerate the token when you receive a 401 Unauthorized response
Additional Configuration:
In your Jira 8 instance, adjust Zephyr Scale’s webhook timeout setting:
Go to Zephyr Scale settings → Webhooks → Advanced
Increase “Webhook Response Timeout” from 30s to 120s
Enable “Retry Failed Webhooks” with 3 retry attempts
Monitoring and Validation:
Implement logging in your batch submission logic to track:
Number of results in each batch
API response times
Authentication token age
Failed submissions for retry
This approach eliminates the timeout issues by reducing API call frequency, optimizes authentication overhead through token caching, and ensures reliable test execution status updates for accurate sprint reporting in Jira 8.
For batch updates, you need to use the bulk test result endpoint, not the single result endpoint. The payload structure is different - it expects an array of test case keys with their statuses. Also, make sure you’re including the test cycle ID in the batch request, otherwise Zephyr won’t know which test cycle to update. The authentication header should be set once at the request level, not per result in the batch.
The 504 timeout is likely happening because Zephyr is trying to process authentication for each individual request. If you’re sending results one at a time from parallel Grid nodes, each request has to authenticate separately. Try batching your results into a single API call per test suite instead of per test case. Also verify that your authentication token hasn’t expired - Grid 4.x sessions can run for hours and tokens might time out mid-execution.