1"use strict";(self.webpackChunkKatalon_Docs=self.webpackChunkKatalon_Docs||[]).push([[10223],{20248:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>c,contentTitle:()=>r,default:()=>m,frontMatter:()=>l,metadata:()=>a,toc:()=>d});const a=JSON.parse('{"id":"integrations/testproject-migration","title":"TestProject migration","description":"This article demonstrates how Katalon Studio helps users migrate their TestProject project to Katalon Studio. With similar major features, Katalon Studio allows you to execute and maintain your existing TestProject test cases without starting everything from scratch.","source":"@site/docs/katalon-studio/integrations/testproject-migration.md","sourceDirName":"integrations","slug":"/integrations/testproject-migration","permalink":"/katalon-studio/integrations/testproject-migration","draft":false,"unlisted":false,"tags":[],"version":"current","lastUpdatedAt":1764053770000,"frontMatter":{"title":"TestProject migration"},"sidebar":"katalon-studio","previous":{"title":"SikuliX integration","permalink":"/katalon-studio/integrations/sikulix-integration"},"next":{"title":"Upload files for web applications","permalink":"/katalon-studio/integrations/upload-files-for-web-applications"}}');var i=t(74848),o=t(28453),n=t(86025);const l={title:"TestProject migration"},r=void 0,c={},d=[{value:'<a class="anchor_top_offset"></a>Migrate TestProject to Katalon Studio',id:"migrate-testproject-to-katalon-studio",level:2}];function p(e){const s={h2:"h2",...(0,o.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("p",{xmlns:"http://www.w3.org/1999/xhtml",className:"shortdesc",children:["This article demonstrates how ",(0,i.jsx)("span",{className:"ph",children:"Katalon Studio"})," helps users migrate their TestProject project to Katalon Studio. With similar major features, Katalon Studio allows you to execute and maintain your existing TestProject test cases without starting everything from scratch. "]}),"\n",(0,i.jsxs)(s.h2,{id:"migrate-testproject-to-katalon-studio",children:[(0,i.jsx)("a",{id:"task-3098",class:"anchor_top_offset"}),"Migrate TestProject to Katalon Studio"]}),"\n",(0,i.jsx)("div",{xmlns:"http://www.w3.org/1999/xhtml",className:"section prereq p",children:(0,i.jsxs)("ul",{className:"ul",children:[(0,i.jsx)("li",{className:"li",children:(0,i.jsx)("p",{className:"p",children:"A TestProject sample project."})}),(0,i.jsx)("li",{className:"li",children:(0,i.jsx)("p",{className:"p",children:"Basic understanding of Junit and TestNG."})}),(0,i.jsx)("li",{className:"li",children:(0,i.jsxs)("p",{className:"p",children:[(0,i.jsx)("a",{className:"xref j-external-link",href:"https://store.katalon.com/product/180/TestNG-JUnit-Keywords",target:"_blank",children:"Junit/TestNG plugin"}),"."]})})]})}),"\n",(0,i.jsxs)("section",{xmlns:"http://www.w3.org/1999/xhtml",className:"section context",children:["You can refer to this ",(0,i.jsx)("a",{className:"xref j-external-link",href:"https://academy.katalon.com/katalon-demo-and-integration/?video=36525",target:"_blank",children:"demonstration video"})," of the steps below."]}),"\n",(0,i.jsxs)("ol",{xmlns:"http://www.w3.org/1999/xhtml",className:"ol steps",children:[(0,i.jsxs)("li",{className:"li step stepexpand",children:[(0,i.jsxs)("span",{className:"ph cmd",children:["Download a TestProject sample project.",(0,i.jsx)("img",{className:"image",src:(0,n.Ay)("/14c56fd0-c310-11ed-a4d3-0242cfbc79b5/TestProject-download_project.png"),alt:"download a TestProject project"})]}),(0,i.jsxs)("div",{className:"itemgroup info",children:["Here is a sample repository for the sample project: ",(0,i.jsx)("a",{className:"xref j-external-link",href:"https://github.com/katalon-studio-samples/Katalon-Migration-TestProject",target:"_blank",children:"TestProject migration sample project"}),"."]})]}),(0,i.jsx)("li",{className:"li step stepexpand",children:(0,i.jsxs)("span",{className:"ph cmd",children:["Open ",(0,i.jsx)("span",{className:"ph uicontrol",children:"Project Settings"})," in ",(0,i.jsx)("span",{className:"ph",children:"Katalon Studio"}),", import all required .jar files (build.gradle). You can refer to: ",(0,i.jsxs)("a",{className:"xref",href:"/katalon-platform/proof-of-concept/dependencies-management-with-native-gradle-support-poc-in-katalon-studio#gradle-settings-in-katalon-studio",children:["Gradle Settings in ",(0,i.jsx)("span",{className:"ph",children:"Katalon Studio"})]}),".",(0,i.jsx)("img",{className:"image",src:(0,n.Ay)("/159b3660-c310-11ed-a4d3-0242cfbc79b5/KS-Project_settings-import_.jar_files.png"),alt:"import .jar files in Katalon Studio project settings"})]})}),(0,i.jsx)("li",{className:"li step stepexpand",children:(0,i.jsxs)("span",{className:"ph cmd",children:["Add all your project files inside ",(0,i.jsx)("span",{className:"ph uicontrol",children:"Include"})," > ",(0,i.jsx)("span",{className:"ph uicontrol",children:"scripts"})," > ",(0,i.jsx)("span",{className:"ph uicontrol",children:"groovy"}),".",(0,i.jsx)("img",{className:"image",src:(0,n.Ay)("/1637c480-c310-11ed-a4d3-0242cfbc79b5/KS-Add_projects_to_Test_Explorer.png"),alt:"add projects Katalon Studio Test Explorer"})]})}),(0,i.jsxs)("li",{className:"li step stepexpand",children:[(0,i.jsx)("span",{className:"ph cmd",children:"Resolve conflicts: "}),(0,i.jsx)("div",{className:"itemgroup info",children:(0,i.jsxs)("ul",{className:"ul",children:[(0,i.jsxs)("li",{className:"li",children:[(0,i.jsx)("p",{className:"p",children:"Change JUnit 5 annotation to TestNG/JUnit 4 (Katalon Studio currently doesn't support JUnit 5): "}),(0,i.jsxs)("p",{className:"p",children:[(0,i.jsx)("code",{className:"ph codeph",children:"@BeforeAll"})," needs changing to ",(0,i.jsx)("code",{className:"ph codeph",children:"@BeforeClass"}),", ",(0,i.jsx)("code",{className:"ph codeph",children:"@AfterAll"})," needs changing to ",(0,i.jsx)("code",{className:"ph codeph",children:"@AfterClass"}),"."]})]}),(0,i.jsxs)("li",{className:"li",children:[(0,i.jsxs)("p",{className:"p",children:["Add ",(0,i.jsx)("code",{className:"ph codeph",children:"@Test"})," annotation before the method ",(0,i.jsx)("code",{className:"ph codeph",children:"void execute()"})," and initialize Katalon Webdriver inside the ",(0,i.jsx)("code",{className:"ph codeph",children:"@BeforeClass"}
1),":",(0,i.jsx)("img",{className:"image",src:(0,n.Ay)("/15d66aa0-c310-11ed-a4d3-0242cfbc79b5/TestProject_conflict_Test_and_BeforeClass.png"),alt:"resolve @Test and @BeforeClass conflict"})]}),(0,i.jsxs)("div",{className:"p",children:["For Web based application:",(0,i.jsx)("pre",{className:"pre codeblock",children:(0,i.jsxs)("code",{children:['WebUiBuiltInKeywords.openBrowser("");',"\n","WebUiBuiltInKeywords.maximizeWindow();","\n","driver = DriverFactory.getWebDriver();"]})}),"For Mobile application:",(0,i.jsx)("pre",{className:"pre codeblock",children:(0,i.jsxs)("code",{children:["String dirName = RunConfiguration.getProjectDir():","\n",'MobileBuiltInKeywords.startApplication(dirName+"/App/APIDemos.apk", false);',"\n","driver = MobileDriverFactory.getDriver();"]})})]})]}),(0,i.jsx)("li",{className:"li",children:(0,i.jsxs)("p",{className:"p",children:["Prepare TestNG.xml file by adding a class name:",(0,i.jsx)("img",{className:"image",src:(0,n.Ay)("/15e0a3d0-c310-11ed-a4d3-0242cfbc79b5/add__class_name_to_TestNG.xml_.png"),alt:"add class
1name to TestNG.xml"})]})}),(0,i.jsx)("li",{className:"li",children:(0,i.jsx)("p",{className:"p",children:"Prepare the test cases by adding TestNG or Junit Keywords."})})]})})]}),(0,i.jsx)("li",{className:"li step stepexpand",children:(0,i.jsxs)("span",{className:"ph cmd",children:["Run the test execution. You can refer to ",(0,i.jsx)("a",{className:"xref",href:"/katalon-studio/execute-tests/execute-tests-with-katalon-studio-overview",children:"Execute tests with Katalon Studio overview"}),"."]})}),(0,i.jsx)("li",{className:"li step stepexpand",children:(0,i.jsxs)("span",{className:"ph cmd",children:["Verify test execution result. You can refer to ",(0,i.jsxs)("a",{className:"xref",href:"/katalon-studio/test-reports/view-test-reports/view-and-customize-execution-log-in-katalon-studio",children:["View and customize execution log in ",(0,i.jsx)("span",{className:"ph",children:"Katalon Studio"})]}),".",(0,i.jsx)("img",{className:"image",src:(0,n.Ay)("/15167600-c310-11ed-a4d3-0242cfbc79b5/KS_TestProject-verify_test_result.png"),alt:"verify test result with TestProject project"})]})})]}),"\n",(0,i.jsx)("section",{xmlns:"http://www.w3.org/1999/xhtml",className:"section result",children:"You have successfully migrated and executed test cases from a TestProject project."})]})}function m(e={}){const{wrapper:s}={...(0,o.R)(),...e.components};return s?(0,i.jsx)(s,{...e,children:(0,i.jsx)(p,{...e})}):p(e)}},28453:(e,s,t)=>{t.d(s,{R:()=>n,x:()=>l});var a=t(96540);const i={},o=a.createContext(i);function n(e){const s=a.useContext(o);return a.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function l(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:n(e.components),a.createElement(o.Provider,{value:s},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.