{
    "componentChunkName": "component---src-templates-page-jsx",
    "path": "/docs/test-management/ci-cd-integrations/travis-ci/",
    "result": {"data":{"markdownRemark":{"html":"<br>\n<p><strong>Integrate Travis CI with Test Management by Testsigma and automate your test runs and generate test reports.</strong></p>\n<hr>\n<p>Integrate Travis CI with Test Management by Testsigma to automate test executions and generate test reports through CI/CD pipelines. This article discusses integrating Travis CI 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>Travis CI</strong> account.</li>\n</ul>\n</blockquote>\n<hr>\n<h2 id=\"set-environment-variables-in-travis-ci\" style=\"position:relative;\"><a href=\"#set-environment-variables-in-travis-ci\" aria-label=\"set environment variables in travis ci 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 Travis CI</strong></h2>\n<ol>\n<li>Navigate to your project in <strong>Travis CI</strong>.</li>\n<li>Open <strong>Settings</strong>.</li>\n<li>\n<p>Under <strong>Environment Variables</strong>, add the following:</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 the option <strong>Display value in build log</strong> is disabled.</p></div></div>\n<hr>\n<h2 id=\"configure-the-travis-ci-pipeline\" style=\"position:relative;\"><a href=\"#configure-the-travis-ci-pipeline\" aria-label=\"configure the travis ci 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 Travis CI Pipeline</strong></h2>\n<ol>\n<li>Navigate to your <strong>Travis CI</strong> repository. </li>\n<li>Open or create the <code class=\"language-text\">.travis.yml</code> file in the root directory.</li>\n<li>\n<p>Add the following code into the <code class=\"language-text\">.travis.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\">language</span><span class=\"token punctuation\">:</span> java\n<span class=\"token key atrule\">jdk</span><span class=\"token punctuation\">:</span>\n<span class=\"token punctuation\">-</span> openjdk8\n\n<span class=\"token key atrule\">env</span><span class=\"token punctuation\">:</span>\n<span class=\"token key atrule\">global</span><span class=\"token punctuation\">:</span>\n    <span class=\"token punctuation\">-</span> TESTSIGMA_API_TOKEN=$<span class=\"token punctuation\">{</span>TESTSIGMA_API_TOKEN<span class=\"token punctuation\">}</span>\n\n<span class=\"token key atrule\">script</span><span class=\"token punctuation\">:</span>\n<span class=\"token comment\"># 🔨 Build and test using Maven</span>\n<span class=\"token punctuation\">-</span> echo \"Running Maven build and tests<span class=\"token punctuation\">...</span>\"\n<span class=\"token punctuation\">-</span> mvn clean package\n\n<span class=\"token key atrule\">after_success</span><span class=\"token punctuation\">:</span>\n<span class=\"token comment\"># 📤 Upload JUnit report to Testsigma</span>\n<span class=\"token punctuation\">-</span> echo \"Uploading JUnit results to Testsigma<span class=\"token punctuation\">...</span>\"\n<span class=\"token punctuation\">-</span> curl <span class=\"token punctuation\">-</span><span class=\"token punctuation\">-</span>location 'https<span class=\"token punctuation\">:</span>//test<span class=\"token punctuation\">-</span>management.testsigma.com/api/v1/projects/<span class=\"token punctuation\">{</span>Project_ID<span class=\"token punctuation\">}</span>/junit<span class=\"token punctuation\">-</span>import/test<span class=\"token punctuation\">-</span>run/<span class=\"token punctuation\">{</span>Run_ID<span class=\"token punctuation\">}</span>' \\\n    <span class=\"token key atrule\">--header \"Authorization</span><span class=\"token punctuation\">:</span> Bearer $TESTSIGMA_API_TOKEN\" \\\n    <span class=\"token punctuation\">-</span><span class=\"token punctuation\">-</span>form \"junit_xml=@target/surefire<span class=\"token punctuation\">-</span>reports/TEST<span class=\"token punctuation\">-</span>MyTests.xml\"</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>Push a commit to the <strong>main</strong> (or configured) branch.</li>\n<li><strong>Travis CI</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":"Travis CI Integration with Test Management by Testsigma","page_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","noindex":false,"contextual_links":[{"type":"section","name":"Contents","url":null},{"type":"link","name":"Prerequisites","url":"#prerequisites"},{"type":"link","name":"Set Environment Variables in Travis CI","url":"#set-environment-variables-in-travis-ci"},{"type":"link","name":"Configure the Travis CI Pipeline","url":"#configure-the-travis-ci-pipeline"},{"type":"link","name":"Triggering the Pipeline","url":"#triggering-the-pipeline"}]},"fields":{"slug":"/docs/test-management/ci-cd-integrations/travis-ci/"}}},"pageContext":{"slug":"/docs/test-management/ci-cd-integrations/travis-ci/","prev":{"fields":{"slug":"/docs/test-management/ci-cd-integrations/github/"},"frontmatter":{"title":"GitHub Integration with Test Management by Testsigma","metadesc":"Integrate GitHub with TMS by Testsigma to automate test executions & generate test reports through CI/CD pipelines | GitHub 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/circleci/"},"frontmatter":{"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","canonical":null,"keywords":null,"social_share_summary":null,"social_share_desc":null,"social_share_image":null,"noindex":false}}}},
    "staticQueryHashes": ["2855385900","63159454"]}