{
    "componentChunkName": "component---src-templates-page-jsx",
    "path": "/docs/test-management/ci-cd-integrations/circleci/",
    "result": {"data":{"markdownRemark":{"html":"<br>\n<p><strong>Integrate CircleCI with Test Management by Testsigma and automate your test runs and generate test reports.</strong></p>\n<hr>\n<p>Integrate CircleCI with Test Management by Testsigma to automate test executions and generate test reports through CI/CD pipelines. This article discusses integrating CircleCI with Test Management by Testsigma.</p>\n<hr>\n<blockquote>\n<h2 id=\"prerequisites\" style=\"position:relative;\"><a href=\"#prerequisites\" aria-label=\"prerequisites permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>Prerequisites</strong></h2>\n<p>Before you begin, ensure:</p>\n<ul>\n<li>You have a <strong>Project</strong> in Test Management by Testsigma and <strong>Test Runs</strong> are available.</li>\n<li>You have an API token from Test Management by Testsigma.</li>\n<li>You have a <strong>CircleCI</strong> account.</li>\n</ul>\n</blockquote>\n<hr>\n<h2 id=\"set-environment-variables-in-circleci\" style=\"position:relative;\"><a href=\"#set-environment-variables-in-circleci\" aria-label=\"set environment variables in circleci permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>Set Environment Variables in CircleCI</strong></h2>\n<ol>\n<li>Navigate to your project in <strong>CircleCI</strong>.</li>\n<li>Go to <strong>Project Settings > Environment Variables</strong>.</li>\n<li>\n<p>Add a new variable:</p>\n<ul>\n<li><strong>Name</strong>: <code class=\"language-text\">TESTSIGMA_API_TOKEN</code></li>\n<li><strong>Value</strong>: API token from Testsigma</li>\n</ul>\n</li>\n</ol>\n<div class=\"custom-block alert alert-info\"><div class=\"custom-block-heading\"><strong>NOTE</strong>:</div><div class=\"custom-block-body\"><p>Ensure this value is kept secret and not displayed in logs.</p></div></div>\n<hr>\n<h2 id=\"configure-the-circleci-pipeline\" style=\"position:relative;\"><a href=\"#configure-the-circleci-pipeline\" aria-label=\"configure the circleci pipeline permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>Configure the CircleCI Pipeline</strong></h2>\n<ol>\n<li>Navigate to your <strong>CircleCI</strong> repository. </li>\n<li>Open or create the <code class=\"language-text\">.circleci/config.yml</code> file in the root directory.</li>\n<li>\n<p>Add the following code into the <code class=\"language-text\">.circleci/config.yml</code> file:</p>\n<div class=\"gatsby-highlight\" data-language=\"yaml\"><pre class=\"language-yaml\"><code class=\"language-yaml\"><span class=\"token key atrule\">version</span><span class=\"token punctuation\">:</span> <span class=\"token number\">2.1</span>\n\n<span class=\"token key atrule\">jobs</span><span class=\"token punctuation\">:</span>\n<span class=\"token key atrule\">build</span><span class=\"token punctuation\">:</span>\n    <span class=\"token key atrule\">docker</span><span class=\"token punctuation\">:</span>\n    <span class=\"token punctuation\">-</span> <span class=\"token key atrule\">image</span><span class=\"token punctuation\">:</span> cimg/openjdk<span class=\"token punctuation\">:</span><span class=\"token number\">8.0</span>\n    <span class=\"token key atrule\">environment</span><span class=\"token punctuation\">:</span>\n    <span class=\"token key atrule\">TESTSIGMA_API_TOKEN</span><span class=\"token punctuation\">:</span> &lt;&lt; pipeline.parameters.testsigma_api_token <span class=\"token punctuation\">></span><span class=\"token punctuation\">></span>\n\n    <span class=\"token key atrule\">steps</span><span class=\"token punctuation\">:</span>\n    <span class=\"token comment\"># ✅ Step 1: Check out the code</span>\n    <span class=\"token punctuation\">-</span> checkout\n\n    <span class=\"token comment\"># 🔨 Step 2: Build and test with Maven</span>\n    <span class=\"token punctuation\">-</span> <span class=\"token key atrule\">run</span><span class=\"token punctuation\">:</span>\n        <span class=\"token key atrule\">name</span><span class=\"token punctuation\">:</span> 🔨 Build and Test with Maven\n        <span class=\"token key atrule\">command</span><span class=\"token punctuation\">:</span> mvn clean package\n\n    <span class=\"token comment\"># 📤 Step 3: Upload JUnit results to Testsigma</span>\n    <span class=\"token punctuation\">-</span> <span class=\"token key atrule\">run</span><span class=\"token punctuation\">:</span>\n        <span class=\"token key atrule\">name</span><span class=\"token punctuation\">:</span> 📤 Upload JUnit Results to Testsigma\n        <span class=\"token key atrule\">command</span><span class=\"token punctuation\">:</span> <span class=\"token punctuation\">|</span><span class=\"token scalar string\">\n            echo \"Uploading JUnit results to Testsigma...\"\n            curl --location 'https://test-management.testsigma.com/api/v1/projects/{Project_ID}/junit-import/test-run/{Run_ID}' \\\n            --header \"Authorization: Bearer $TESTSIGMA_API_TOKEN\" \\\n            --form \"junit_xml=@target/surefire-reports/TEST-MyTests.xml\"</span>\n\n<span class=\"token key atrule\">workflows</span><span class=\"token punctuation\">:</span>\n<span class=\"token key atrule\">version</span><span class=\"token punctuation\">:</span> <span class=\"token number\">2</span>\n<span class=\"token key atrule\">test_and_upload</span><span class=\"token punctuation\">:</span>\n    <span class=\"token key atrule\">jobs</span><span class=\"token punctuation\">:</span>\n    <span class=\"token punctuation\">-</span> <span class=\"token key atrule\">build</span><span class=\"token punctuation\">:</span>\n        <span class=\"token key atrule\">parameters</span><span class=\"token punctuation\">:</span>\n            <span class=\"token key atrule\">testsigma_api_token</span><span class=\"token punctuation\">:</span>\n            <span class=\"token key atrule\">type</span><span class=\"token punctuation\">:</span> env_var_name\n            <span class=\"token key atrule\">default</span><span class=\"token punctuation\">:</span> TESTSIGMA_API_TOKEN</code></pre></div>\n</li>\n</ol>\n<div class=\"custom-block alert alert-info\"><div class=\"custom-block-heading\"><strong>NOTE</strong>:</div><div class=\"custom-block-body\"><ul>\n<li>Replace <code class=\"language-text\">&lt;Project_ID></code> in the curl command with your Project ID, which you can retrieve using the Test Management by Testsigma APIs.</li>\n<li>Replace <code class=\"language-text\">&lt;Run_ID></code> in the curl command with the Run ID, which is available in the URL when viewing a test run in the format: <a href=\"https://test-management.testsigma.com/ui/test_runs/%7BRun_ID%7D/\">https://test-management.testsigma.com/ui/test_runs/{Run_ID}/</a></li>\n<li>Ensure the path to the JUnit report points to the actual XML file generated by Maven.</li>\n</ul></div></div>\n<hr>\n<h2 id=\"triggering-the-pipeline\" style=\"position:relative;\"><a href=\"#triggering-the-pipeline\" aria-label=\"triggering the pipeline permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>Triggering the Pipeline</strong></h2>\n<ol>\n<li>Commit and push your changes to the repository connected to CircleCI.</li>\n<li><strong>CircleCI</strong> will run the workflow.</li>\n<li>After completion, the corresponding test run in Test Management by Testsigma will be automatically updated with the test execution results.</li>\n</ol>\n<hr>","frontmatter":{"title":"CircleCI Integration with Test Management by Testsigma","page_title":"CircleCI Integration with Test Management by Testsigma","metadesc":"Integrate CircleCI with TMS by Testsigma to automate test executions & generate test reports through CI/CD pipelines | CircleCI Integration with TMS by Testsigma","noindex":false,"contextual_links":[{"type":"section","name":"Contents","url":null},{"type":"link","name":"Prerequisites","url":"#prerequisites"},{"type":"link","name":"Set Environment Variables in CircleCI","url":"#set-environment-variables-in-Circleci"},{"type":"link","name":"Configure the CircleCI Pipeline","url":"#configure-the-circle-ci-pipeline"},{"type":"link","name":"Triggering the Pipeline","url":"#triggering-the-pipeline"}]},"fields":{"slug":"/docs/test-management/ci-cd-integrations/circleci/"}}},"pageContext":{"slug":"/docs/test-management/ci-cd-integrations/circleci/","prev":{"fields":{"slug":"/docs/test-management/ci-cd-integrations/travis-ci/"},"frontmatter":{"title":"Travis CI Integration with Test Management by Testsigma","metadesc":"Integrate Travis CI with TMS by Testsigma to automate test executions & generate test reports through CI/CD pipelines | Travis CI Integration with TMS by Testsigma","canonical":null,"keywords":null,"social_share_summary":null,"social_share_desc":null,"social_share_image":null,"noindex":false}},"next":{"fields":{"slug":"/docs/test-management/ci-cd-integrations/gitlab/"},"frontmatter":{"title":"GitLab Integration with Test Management by Testsigma","metadesc":"Integrate GitLab with Test Management by Testsigma to automate test executions & generate test reports through CI/CD pipelines | GitLab Integration with TMS by Testsigma","canonical":null,"keywords":null,"social_share_summary":null,"social_share_desc":null,"social_share_image":null,"noindex":false}}}},
    "staticQueryHashes": ["2855385900","63159454"]}