Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save justaguywhocodes/7c4a170a7e8598b10aea6c0c8d4446e9 to your computer and use it in GitHub Desktop.
Save justaguywhocodes/7c4a170a7e8598b10aea6c0c8d4446e9 to your computer and use it in GitHub Desktop.
Vectr
**Jira Ticket: Requirements for VECTR Test Cases API to Jira Ticket Script**
**Description:**
Develop a script to create Jira tickets from VECTR test cases API data.
**Requirements:**
1. **Authentication**
- VECTR: API key/token, secure storage (env variables).
- Jira: API token, user with issue creation permissions, secure storage.
2. **API Endpoints**
- VECTR: `GET /testcases` (confirm endpoint/response structure).
- Jira: `POST /rest/api/2/issue`, `GET /rest/api/2/issue/createmeta`.
3. **Data Mapping**
- Map VECTR fields (e.g., `test_case_name` → `summary`, `description` → `description`, `test_case_id` → custom field).
- Validate data, handle missing values.
- Use “Test Case” issue type or create custom type.
4. **Script Development**
- Language: Python (`requests`) or similar.
- Functions: Auth, fetch VECTR test cases, map data, create Jira issues.
- Config: Store API URLs, credentials, project keys.
5. **Error Handling & Logging**
- Handle API errors (401, 400, 500), implement retries.
- Prevent duplicates (e.g., check via JQL or database).
- Log execution (timestamps, test case IDs, Jira keys).
6. **Jira Configuration**
- Project: Valid project key (e.g., “TEST”).
- Custom fields: Add for VECTR data (e.g., “Test Case ID”).
- Permissions: API user can create/edit issues.
- Workflow: Support test case statuses (e.g., “Pass,” “Fail”).
7. **Testing**
- Unit tests: API calls, data mapping.
- Integration tests: Sandbox Jira project.
- Validate: Correct ticket data, no duplicates.
8. **Security**
- Use HTTPS, validate SSL.
- Comply with data privacy (e.g., GDPR).
- Respect API rate limits, use backoff.
9. **Optional Features**
- Attach VECTR files to Jira tickets.
- Schedule script or trigger on VECTR events.
- Link tickets to VECTR test cases.
10. **Documentation**
- README: Setup, mappings, examples.
- Track changes in Git.
- Monitor VECTR/Jira API updates.
**Acceptance Criteria:**
- Script creates Jira tickets with accurate VECTR data.
- No duplicates, errors logged.
- Secure, maintainable code with documentation.
- Tested in sandbox environment.
**Notes:**
- Verify VECTR API details (endpoints, auth).
- Check Jira version for deprecated endpoints (e.g., `createmeta`).
- Consider Xray/Zephyr for advanced test management.
**Assignee:** [TBD]
**Priority:** [TBD]
**Project Key:** [e.g., TEST]
**Issue Type:** Task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment