I’ve implemented this exact integration successfully. The problem is multi-layered and requires addressing all four focus areas:
1. CI/CD Webhook Configuration:
Your webhook endpoint is incorrect. The /rest/api/2/issue/bulk endpoint doesn’t handle test execution creation. Use the test execution-specific endpoint:
POST /rest/api/2/issue
Content-Type: application/json
Configure Jenkins to create Test Execution issues (not update Test Case issues directly). Each automated run should create a new execution record linked to the test case.
2. Test Result Payload Schema Validation:
Your payload must include the test execution link. Here’s the correct structure:
{
"fields": {
"project": {"key": "QA"},
"issuetype": {"name": "Test Execution"},
"issuelinks": [{"type": {"name": "Tests"}, "inwardIssue": {"key": "TC-123"}}]
}
}
The issuelinks array connects the execution to the test case. Without this, executions appear orphaned and don’t contribute to dashboard metrics.
3. API Credential Management:
Verify your service account has these specific permissions:
- Create Issues (Test Execution type)
- Link Issues
- Edit Issues in the target project
- View Test Reports
Use a dedicated service account rather than personal tokens. Check Application Links if using OAuth instead of Bearer tokens.
4. Test Case Key Mapping Between Systems:
This is critical. Your Jenkins tests must output Jira test case keys. Modify your test framework to include Jira keys in test annotations or metadata:
@Test
@JiraTestKey("TC-123")
public void testUserLogin() { ... }
Configure your Jenkins result parser (JUnit XML, TestNG, etc.) to extract these keys and include them in the webhook payload. Without accurate key mapping, the webhook can’t link executions to cases.
Dashboard Configuration:
Ensure your quality dashboard filter includes Test Execution issue type and uses the “Tests” link relationship to aggregate results. The dashboard should query: issueType = "Test Execution" AND issue in linkedIssues("TC-*", "tests").
The root issue is that you’re trying to update test cases directly instead of creating linked test execution records. Jira’s test management model separates test case definitions from execution results for traceability and historical tracking.