Skip to content

How do I fix the 'no implicit conversion of nil into String' error when creating a plan via API?

You encounter errors like ‘no implicit conversion of nil into String’ or “undefined method `create_issue’ for nil” when creating a test plan and linking Jira issues via the Testomat.io Public API.

These errors are due to an invalid request structure.

Error 1: “no implicit conversion of nil into String” when creating a plan

Section titled “Error 1: “no implicit conversion of nil into String” when creating a plan”
  • The request body format is invalid. Ensure the type and attributes structure matches the expected API format.
  • Send a POST request to https://app.testomat.io/api/{project_id}/plans with this body:
    {
    "data": {
    "type": "plans",
    "attributes": {
    "title": "some title",
    "kind": "manual",
    "test-plan": "{\"tests\":[\"a760adbd\"]}"
    }
    }
    }
  • Important: Do not include jira-issues in this request. Jira issues must be linked separately.

Error 2: “undefined method `create_issue’ for nil” when linking Jira issues

Section titled “Error 2: “undefined method `create_issue’ for nil” when linking Jira issues”
  • This error usually indicates a missing or invalid parameter (plan_id, jira_id, jiraproject_id), incorrect Content-Type header, or a deleted or unrelated plan.
  1. Confirm that the plan exists and belongs to the same project.
  2. Use the endpoint POST https://app.testomat.io/api/{project_id}/jira/issues.
  3. Send this request body:
    {
    "jira_id": "EP-2515",
    "plan_id": "71e04c51",
    "jiraproject_id": "d40a638c"
    }
  4. Add the header Content-Type: application/json.
  5. Verify that jira_id and jiraproject_id are valid and the plan_id is active and exists in the given project if the error persists.
  • Use "type": "plans" and valid attributes when creating a plan.
  • Attach Jira issues via the /jira/issues endpoint, never inside the plan-creation request.
  • Always include Content-Type: application/json in the headers.
  • Ensure all IDs exist and belong to the same project.