Skip to content

CI/CD Integration Troubleshooting

This page covers common issues you might encounter when integrating your automated tests with SquashTM, along with their solutions.

Authentication Errors

401 Unauthorized error

Problem: The credentials are invalid.

Solution:

Note that in this guide, if no auth variables are set, the script exits before sending a request (fail fast). If you see 401, it generally means:

  • The token is wrong
  • The token has expired
  • The token does not have write permissions

403 Forbidden error

Problem: Authentication succeeded, but the user account lacks permissions on the target iteration/project.

Solution:

  • Verify that the user account has the necessary permissions in the Executions workspace
  • Check that the user has access to the target project and iteration

API Errors

404 Not found error

Problem: The API endpoint returns 404.

Solution:

  • Check your SQUASH_TM_URL is correct
  • Verify that SQUASH_TM_ITERATION_ID is correct
  • Verify that the endpoint specified in the script is api/rest/latest/import/results.

207 Multi-Status (partial success)

This status code indicates that the import succeeded for some tests but failed for others (for example, automated test references not found). The response body details which items failed and why.

The current script only treats status code 204 as success.
If you want to accept partial success, you can adapt the upload_to_squash_tm function to handle status code 207: parse the response body and decide your strategy (for example, log the details, mark the job as unstable, or consider the operation successful anyway).

Results Issues

Results don't appear in SquashTM

Problem: The upload succeeds but results don't show in SquashTM.

Solution:

  • Check that test cases exist in SquashTM and that the automated test references in SquashTM match exactly what the parser generates
  • Ensure the test cases are in an execution plan (iteration)
  • Review the SquashTM logs for any errors

Need Additional Help?

If you encounter an issue not covered here:

  1. Check your CI/CD pipeline logs for detailed error messages
  2. Review SquashTM logs for server-side errors
  3. Consult the SquashTM API documentation
  4. Ask your question on the SquashTM community forum
  5. If you have access to SquashTM support, feel free to reach out