PageSourceSearch

https://docs-production-katalon.netlify.app/assets/js/42b0b48c.25f2cdba.js

js docs-production-katalon.netlify.app collected 2026-10-03 10:41:38 UTC 7,691 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkKatalon_Docs=self.webpackChunkKatalon_Docs||[]).push([[7222],{14658:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>d,frontMatter:()=>s,metadata:()=>r,toc:()=>c});const r=JSON.parse('{"id":"integrations/testing-framework/protractor-jasmine-integration","title":"Protractor Jasmine Integration","description":"This document shows you how to integrate Protractor Jasmine with Katalon True Platform to upload test reports.","source":"@site/docs/katalon-platform/integrations/testing-framework/protractor-jasmine-integration.md","sourceDirName":"integrations/testing-framework","slug":"/integrations/testing-framework/protractor-jasmine-integration","permalink":"/katalon-platform/integrations/testing-framework/protractor-jasmine-integration","draft":false,"unlisted":false,"tags":[],"version":"current","lastUpdatedAt":1775545163000,"frontMatter":{"title":"Protractor Jasmine Integration"},"sidebar":"katalon-platform","previous":{"title":"Mocha Integration","permalink":"/katalon-platform/integrations/testing-framework/mocha-integration"},"next":{"title":"Protractor Mocha Integration","permalink":"/katalon-platform/integrations/testing-framework/protractor-mocha-integration"}}');var o=n(74848),a=n(28453);const s={title:"Protractor Jasmine Integration"},i=void 0,l={},c=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Upload Protractor Jasmine test reports to Katalon True Platform",id:"upload-protractor-jasmine-test-reports-to-katalon-true-platform",level:2},{value:"Result",id:"result",level:2}];function p(e){const t={a:"a",admonition:"admonition",code:"code",h2:"h2",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,a.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.p,{children:"This document shows you how to integrate Protractor Jasmine with Katalon True Platform to upload test reports."}),"\n",(0,o.jsx)(t.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsx)(t.li,{children:"Node.js and npm installed on your machine."}),"\n",(0,o.jsxs)(t.li,{children:["Katalon API key \u2013 If you haven\u2019t set one up yet, follow this ",(0,o.jsx)(t.a,{href:"/katalon-platform/administer/profile/katalon-api-key-in-katalon-testops",children:"guide"})," to generate your API key."]}),"\n",(0,o.jsxs)(t.li,{children:["Project ID - You can find your Katalon project ID in the URL (typically after ",(0,o.jsx)(t.code,{children:"/project/"}),', e.g., ".../project/1234567/...").']}),"\n"]}),"\n",(0,o.jsx)(t.h2,{id:"upload-protractor-jasmine-test-reports-to-katalon-true-platform",children:"Upload Protractor Jasmine test reports to Katalon True Platform"}),"\n",(0,o.jsx)(t.admonition,{type:"info",children:(0,o.jsxs)(t.p,{children:["The step-by-step instructions below use a Katalon ",(0,o.jsx)(t.a,{href:"https://github.com/katalon-studio/testops-report-js/tree/master/packages/testops-protractor",children:"sample project"})," for illustration purposes."]})}),"\n",(0,o.jsxs)(t.ol,{children:["\n",(0,o.jsxs)(t.li,{children:["\n",(0,o.jsxs)(t.p,{children:[(0,o.jsx)(t.strong,{children:"Install dependencies"}),": Open your source code editor, navigate to your sample project, and run the following command in your terminal:"]}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{children:"npm i -s @katalon/testops-jasmine @katalon/testops-protractor\n"})}),"\n"]}),"\n",(0,o.jsxs)(t.li,{children:["\n",(0,o.jsxs)(t.p,{children:[(0,o.jsx)(t.strong,{children:"Configure Katalon True Platform credentials & project"}),":"]}),"\n",(0,o.jsxs)(t.p,{children:["a. Create a new file named ",(0,o.jsx)(t.code,{children:"testops-config.json"})," in the root directory of your sample project and add the following content:"]}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-jsx",children:'{\n    "apiKey": "your_api_key_value",\n    "projectId": "your_project_id_value",\n    "reportFolder": "testops-report"\n}\n'})}),"\n",(0,o.jsx)(t.p,{children:"Replace the placeholder values with your actual details, for example:"}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.code,{children:"apiKey"}),": Your Katalon API key (e.g., 1a11111a-1aa1-1a1a-1a1a-a1aaa111111)."]}),"\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.code,{children:"projectId"}),": Your Katalon project ID (e.g., 1111111)."]}),"\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.code,{children:"reportFolder"}),": The directory where Protractor Jasmine will store test report JSON files (e.g., metadata, results, etc) after execution (default: ",(0,o.jsx)(t.code,{children:"testops-report"}),")."]}),"\n"]}),"\n",(0,o.jsxs)(t.p,{children:["b. ",(0,o.jsx)(t.strong,{children:"Add reporter"}),": Create a file named ",(0,o.jsx)(t.code,{children:"protractor-jasmine.config.js"})," in your root directory and add the following content:"]}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-jsx",children:'const TestOpsJasmineReporter = require(\'@katalon/testops-jasmine\');\n\nexports.config = {\n    ...\n    framework: "jasmine",\n    plugins: [\n        {\n            package: "@katalon/testops-protractor",\n        }\n    ],\n    onPrepare: () => {\n        const reporter = new TestOpsJasmineReporter();\n        jasmine.getEnv().addReporter(reporter);\n    }\n    ...\n}\n'})}),"\n",(0,o.jsx)("img",{src:"https://tw-cdn.katalon.com/katalon-platform/integration/testing-framework/protractor-jasmine-config.png",alt:"Config Protractor Jasmine file",width:"700"}),"\n",(0,o.jsxs)(t.p,{children:["c. Configure a proxy ",(0,o.jsx)(t.strong,{children:"(optional)"}),": Add the following to ",(0,o.jsx)(t.code,{children:"testops-config.json"})," if a proxy is needed:"]}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-jsx",children:'{\n    ...\n    "proxy": {\n        "protocol": "http or https",\n        "host": "your_proxy_host",\n        "port": "your_proxy_port",\n        "auth": {\n            "username": "your_username",\n            "password": "your_password"\n        }\n    }\n}\n'})}),"\n"]}),"\n",(0,o.jsxs)(t.li,{children:["\n",(0,o.jsx)(t.p,{children:"Run tests and upload reports: You can run your tests and upload reports to Katalon True Platform using either of the following commands:"}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsx)(t.li,{children:"If you have Protractor installed locally"}),"\n"]}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-jsx",children:"npx protractor\n"})}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsx)(t.li,{children:"If you have defined a test script in your package.json:"}),"\n"]}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-jsx",children:"npm test\n"})}),"\n"]}),"\n"]}),"\n",(0,o.jsx)(t.h2,{id:"result",children:"Result"}),"\n",(0,o.jsxs)(t.p,{children:["Once the reports are uploaded successfully, navigate to ",(0,o.jsx)(t.strong,{children:"Reports"})," to view all the uploaded test reports."]}),"\n",(0,o.jsx)("img",{src:"https://tw-cdn.katalon.com/katalon-platform/integration/testing-framework/pro-jasmine-uploaded.png",alt:"Uploaded Protractor Jasmine files",width:"700"})]})}function d(e={}){const{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(p,{...e})}):p(e)}},28453:(e,t,n)=>{n.d(t,{R:()=>s,x:()=>i});var r=n(96540);const o={},a=r.createContext(o);function s(e){const t=r.useContext(a);return r.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:s(e.components),r.createElement(a.Provider,{value:t},e.children)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.