{"id":21902103,"url":"https://github.com/destafajri/qa-automation","last_synced_at":"2026-05-01T08:31:29.065Z","repository":{"id":49808481,"uuid":"516218058","full_name":"destafajri/QA-Automation","owner":"destafajri","description":"Sample Project Selenium,  Appium, TestNG, JUnit, Maven, Cucumber, Architecture Testing for BDD and how to using existing chrome selenium for login solution","archived":false,"fork":false,"pushed_at":"2022-09-02T09:02:35.000Z","size":8013,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-27T06:45:32.635Z","etag":null,"topics":["appium","architecture","automation","bdd-tests","cucumber","existing-customer","java","maven-plugin","maven-pom","selenium","testing","testng-framework"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/destafajri.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-07-21T04:00:06.000Z","updated_at":"2023-04-26T04:05:34.000Z","dependencies_parsed_at":"2022-08-12T20:40:44.329Z","dependency_job_id":null,"html_url":"https://github.com/destafajri/QA-Automation","commit_stats":null,"previous_names":["destafajri/qa-automation"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/destafajri%2FQA-Automation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/destafajri%2FQA-Automation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/destafajri%2FQA-Automation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/destafajri%2FQA-Automation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/destafajri","download_url":"https://codeload.github.com/destafajri/QA-Automation/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244913991,"owners_count":20530939,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["appium","architecture","automation","bdd-tests","cucumber","existing-customer","java","maven-plugin","maven-pom","selenium","testing","testng-framework"],"created_at":"2024-11-28T15:16:29.949Z","updated_at":"2026-05-01T08:31:29.034Z","avatar_url":"https://github.com/destafajri.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SQA-Project\nSelenium, TestNG, Maven, Cucumber, and using existing chrome selenium for login solution\n\n\n#How To Execute Selenium Scripts On Already Opened Browser.\n\n\nStep 1- Start Chrome in debug mode\n\n      Navigate to chrome directory using the cd command\n      In my case chrome.exe is under C:\\Program Files (x86)\\Google\\Chrome\\Application\n    ==\u003e cd C:\\Program Files (x86)\\Google\\Chrome\\Application\n\n      Syntax\n      chrome.exe –remote-debugging-port=any-free-port –user-data-dir=directory (path where you need to store data)\n\n      Example in my case\n    ==\u003e  chrome.exe --remote-debugging-port=9222 --user-data-dir=C:\\chromeData\n\nStep 2- Execute Selenium test on port 9222\n\n      // set the driver path- You can also use WebDriverManager for drivers\n      System.setProperty(\"webdriver.chrome.driver\",\"your chrome driver\");\n\n      // Create object of ChromeOptions Class\n      ChromeOptions opt=new ChromeOptions();\n\n      // pass the debuggerAddress and pass the port along with host. Since I am running test on local so using localhost\n      opt.setExperimentalOption(\"debuggerAddress\",\"localhost:9222 \");\n\n      // pass ChromeOptions object to ChromeDriver constructor\n      WebDriver driver=new ChromeDriver(opt);\n\n      // now you can use now existing Browser\n      driver.get(targetURL); ==\u003etype the URL what you want to browse\n      \n      \n      \n      \n#HOW TO OPEN EXCEL (.xlsx) using maven\n\nMaven dependency\nhttps://www.java67.com/2014/09/how-to-read-write-xlsx-file-in-java-apache-poi-example.html\n\n                  \u003c!--       \n                        \u003cdependency\u003e\n                            \u003cgroupId\u003eorg.apache.poi\u003c/groupId\u003e\n                            \u003cartifactId\u003epoi\u003c/artifactId\u003e\n                            \u003cversion\u003e5.2.0\u003c/version\u003e\n                        \u003c/dependency\u003e\n                        \u003cdependency\u003e\n                            \u003cgroupId\u003eorg.apache.poi\u003c/groupId\u003e\n                            \u003cartifactId\u003epoi-ooxml\u003c/artifactId\u003e\n                            \u003cversion\u003e5.2.0\u003c/version\u003e\n                        \u003c/dependency\u003e\n                   --\u003e\n\nLibrary\n\n      import org.apache.poi.ss.usermodel.Cell;\n      import org.apache.poi.ss.usermodel.Row;\n      import org.apache.poi.ss.usermodel.Sheet;\n      import org.apache.poi.ss.usermodel.Workbook;\n      import org.apache.poi.xssf.usermodel.XSSFRow;\n      import org.apache.poi.xssf.usermodel.XSSFSheet;\n      import org.apache.poi.xssf.usermodel.XSSFWorkbook;\n\n      import java.io.File;\n      import java.io.FileInputStream;\n      import java.io.IOException;\n      import java.util.Iterator;\n\n\n\n\n# Architecture Testing\n\n#Singleton Design Pattern.\n\n\nThe Singleton pattern encapsulates a shared resource within a single unique class instance.\nThis instance arbitrates access to the resource and storage-related state information.\nA class method provides the reference to this instance, so there is no need to pass the reference around.\nAny object that has access to the Singleton’s class header can use the Singleton.\n\n\n\n![alt text](https://miro.medium.com/max/1400/1*PU3WlRgmmIBPsW1L_2S2MQ.png)\nhttps://miro.medium.com/max/1400/1*PU3WlRgmmIBPsW1L_2S2MQ.png\n\nThe Singleton Design Pattern can be used in the automation tests to build up easier access to page objects and facades.\nIts usage can speed up the tests writing process dramatically.\n\nI’ve covered the basic mechanics of the Singleton pattern, but why should we use it? Isn’t this just making our code more verbose and confusing? And what does all of this have to do with testing anyway?!\n\nWe should only apply patterns when we really need them, not just because some writer on the internet tells you to use it.\n\nIn the case of testing, here are some problems we may encounter:\n\n1. Our classes and their dependencies can get very complex, and we don’t want to do end-to-end testing for every class, especially controllers.\n2. We can’t always test at specific dates or times. What about bugs that happen only on the last day of the month, or 11:59PM GMT?\n3. We can’t (or don’t want to) create specific data, such as custom settings, objects, or permissions.\n\nHow do we solve these problems with this pattern?\n\nStub it out!\n\nThe Singleton pattern allows us to stub out the data we’re expecting, and test one method at a time (as a good test should). We can return “data” from downstream methods that we haven’t actually inserted, or specific dates and times.\n\nFor those of you intimately familiar with Apex development, this all might seem eerily similar to the Stub API — and it is! However, this is a fully customizable solution that allows you to stub out everything that you want without worrying about platform limitations.\n\n            \n          \n\n\n#MVC architecture\n\nMVC is known as an architectural pattern, which embodies three parts Model, View and Controller, or to be more exact it divides the application into three logical parts: the model part, the view and the controller. It was used for desktop graphical user interfaces but nowadays is used in designing mobile apps and web apps.\n\n\n![alt text](https://www.freecodecamp.org/news/content/images/2021/04/MVC3.png)\nhttps://www.freecodecamp.org/\n\nHistory\n\nTrygve Reenskaug invented MVC. The first reports on MVC were written when he was visiting a scientist at Xerox Palo Alto Research Laboratory (PARC) in 1978/79. At first, MVC was called “Thing Model View Editor” but rapidly changed it to “Model View Controller”.\n\nThe goal of Tygrve was to solve the problem of users controlling a large and complex data set. The practice of MVC has changed over the years. Since the MVC pattern was invented before web browsers, initially was used as an architectural pattern for graphical user interfaces(GUI).\n\nAdvantages of MVC\n- MVC architecture will separate the user interface from business logic.\n- Components are reusable.\n- Easy to maintain.\n- Different components of the application in MVC can be independently deployed and maintained.\n- This architecture helpt to test components independently.\n\nDisadvantages of MVC\n- The complexity is high.\n- Not suitable for small applications.\n- The inefficiency of data access in view.\n\n  #reference article\n  https://www.automatetheplanet.com/category/series/designpatterns/\n  https://engineering.salesforce.com/simplify-testing-with-the-singleton-pattern-1a53ba5c2c50/\n  https://www.freecodecamp.org/news/singleton-design-pattern-pros-and-cons-e10f98e23d63/\n  https://towardsdatascience.com/everything-you-need-to-know-about-mvc-architecture-3c827930b4c1\n  https://medium.com/nerd-for-tech/lets-understand-the-design-patterns-and-the-power-of-singleton-design-pattern-aba13bdc32f\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdestafajri%2Fqa-automation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdestafajri%2Fqa-automation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdestafajri%2Fqa-automation/lists"}