{"id":7023,"date":"2021-04-27T18:12:41","date_gmt":"2021-04-27T18:12:41","guid":{"rendered":"https:\/\/codoid.com\/?p=7023"},"modified":"2023-11-07T13:51:36","modified_gmt":"2023-11-07T13:51:36","slug":"browserstack-tutorial","status":"publish","type":"post","link":"https:\/\/codoid.com\/software-testing\/browserstack-tutorial\/","title":{"rendered":"An End-to-End BrowserStack Tutorial for Beginners"},"content":{"rendered":"<p>Are you someone who wants to run their test cases on multiple browsers or machines? Then this BrowserStack Tutorial is a must-read for you as without it, you could be spending a lot of time, money, and effort to set up the multiple browsers or machines needed to perform the offline tests using real devices. As a premier Automation Testing Company in the market, we have opted for a <a href=\"https:\/\/kobiton.com\/\" target=\"_blank\" rel=\"noopener noreferrer\">cloud testing platform<\/a> like BrowserStack that provides real cloud devices that consist of different platforms, browsers, and devices. BrowserStack is a cloud-based web and mobile testing platform using which is predominantly used by testers to perform Cross-browser testing of various web and native mobile applications across different platforms, different browsers, and different devices.\u00a0<\/p>\n<p> So it has been established that using the cloud is the optimal choice. But why BrowserStack in particular when there are other cloud testing platforms are available could be a question looming in your mind. You will find the answer to that question in detail in this BrowserStack Tutorial. We have mentioned all the wonders you could do using BrowserStack and explained how to do it as well.<\/p>\n<h3>Why BrowserStack?<\/h3>\n<p>BrowserStack can be used to avoid the complexity of switching between the operating systems, browsers, and its different versions. When it comes to mobile application testing, we can avoid the hassle of having to buy all the <a href=\"https:\/\/codoid.com\/mobile-application-testing\/what-are-the-best-mobile-app-testing-tools-to-use-in-2022\/\">mobile devices<\/a> that are available today to perform the testing. BrowserStack is very flexible and scalable, making it possible to test anywhere and anytime. We can use BrowserStack as a remote lab, and we can even use it as Real Desktop Browsers or Mobile Browsers. There is no setup required for using Browser Stack. We can use it directly on any independent machine by using the Browser Stack URL and its login credentials. Yes, it is that simple.<\/p>\n<p>There are 4 main features of BrowserStack that we will be exploring in this blog and they are namely, Live, Automate, App Live, and App Automate. Let\u2019s get the ball rolling by exploring the \u2018Live\u2019 feature.<\/p>\n<h3>BrowserStack Tutorial for Live\/Manual Testing Feature<\/h3>\n<p>The Live option will help you perform manual testing in a list of real cloud device platforms like Android, iOS, Windows Phone, Windows, and Mac. Once you select any platform, it will show a list of browsers like Chrome, Mozilla, IE, UC Browser, and Safari with different versions. Once you have selected the browser of your choice, it will create a session and open a browser. You can simply enter the URL of the site and kick start your manual testing the same way you would do on a real device.<\/p>\n<p><img decoding=\"async\" title=\"BrowserStack Tutorial for Live or Manual Testing\" src=\"https:\/\/codoid.com\/wp-content\/uploads\/2021\/04\/BrowserStack-Tutorial-for-Live-or-Manual-Testing.png\" alt=\"BrowserStack Tutorial for Live or Manual Testing\" \/><\/p>\n<h4>Key Features in Live:<\/h4>\n<h5>1. Switch Browser:<\/h5>\n<p>If you want to check the compatibility of the testing site in another browser, it is not necessary to close the current browser to switch to the other one. You can simply choose the \u2018Switch Browser\u2019 option, and it will display the device platform and browser list from which you can select the device and browser.<\/p>\n<p><img decoding=\"async\" title=\"Switch Browser Feature\" src=\"https:\/\/codoid.com\/wp-content\/uploads\/2021\/04\/Switch-Browser-Feature.png\" alt=\"Switch Browser Feature\" \/><\/p>\n<p><img decoding=\"async\" title=\"BrowserStack Tutorial for Switching the Browser\" src=\"https:\/\/codoid.com\/wp-content\/uploads\/2021\/04\/BrowserStack-Tutorial-for-Switching-the-Browser.png\" alt=\"BrowserStack Tutorial for Switching the Browser\"\/><\/p>\n<h5>2. Resolution:<\/h5>\n<p>If you need to test your site in different screen resolutions, then you can make use of the \u2018Resolution\u2019 option. Once the \u2018Resolution\u2019 option is selected, a list of the available resolutions will appear, and you can select the required resolution to carry on with your testing as per your needs.<\/p>\n<p><img decoding=\"async\" title=\"BrowserStack Tutorial for Changing Resolution\" src=\"https:\/\/codoid.com\/wp-content\/uploads\/2021\/04\/BrowserStack-Tutorial-for-Changing-Resolution.png\" alt=\"BrowserStack Tutorial for Changing Resolution\" \/><\/p>\n<h5>3. Reporting a Bug using BrowserStack:<\/h5>\n<p>The primary objective of testing across so many platforms and devices is to identify and report the bugs that are present so that the end-user doesn\u2019t face any difficulty. Once you have found a bug, you can report it by clicking on the Report a Bug option. After you click on this option, you will see an option box to highlight the issue on the page. You can highlight the issue by using different options like rectangle, circle, pencil, etc.<\/p>\n<p>In addition to that, you can even select the mode to report a bug. There are so many tools like Jira, Trello, GitHub, and Slack through which you could report the bugs. You can even share it by email or download the issue page if needed.<\/p>\n<p><img decoding=\"async\" title=\"BrowserStack Tutorial to Report a Bug \" src=\"https:\/\/codoid.com\/wp-content\/uploads\/2021\/04\/BrowserStack-Tutorial-to-Report-a-Bug.png\" alt=\"BrowserStack Tutorial to Report a Bug \" \/><\/p>\n<h5>4. Local Testing:<\/h5>\n<p>BrowserStack enables users to run tests on their internal development environments, on their localhost, or even behind a corporate firewall. This feature is called \u2018Local Testing\u2019.<br \/>\nLocal Testing establishes a secure connection between the user\u2019s machine and the BrowserStack cloud. Once Local Testing is set up, all the URLs will work straight out of the box, including the HTTPS URLs and also the ones behind a proxy or firewall.<\/p>\n<p>BrowserStack local testing can be enabled for both \u2018Live\u2019 and \u2018Automate\u2019.<\/p>\n<h5>5. Local Testing Live<\/h5>\n<p>Download the BrowserStack local application from the local testing option and install it on your machine. Start the application, and you\u2019ll see the BrowserStack local icon in the system tray area.<\/p>\n<p style=\"text-align:center;\"><img decoding=\"async\" title=\"BrowserStack local icon\" src=\"https:\/\/codoid.com\/wp-content\/uploads\/2021\/04\/BrowserStack-local-icon.png\" alt=\"BrowserStack local icon\"><\/p>\n<p>This enables Local Testing. Start a Live session and look for a green indicator on the Local Testing icon in the toolbar dock. You can launch the Live dashboard right from the app by just clicking on the BrowserStack Local app and navigating to Launch > Live.<\/p>\n<p style=\"text-align:center;\"><img decoding=\"async\" title=\"Launching BrowserStack local\" src=\"https:\/\/codoid.com\/wp-content\/uploads\/2021\/04\/Launching-BrowserStack-local.png\" alt=\"Launching BrowserStack local\"><\/p>\n<p>To resolve all requests to local URLs via your machine, click on the Local Testing icon and check the \u2018Resolve all URLs through my network\u2019 option.<\/p>\n<p><img decoding=\"async\" title=\"Resolve all URLs option\" src=\"https:\/\/codoid.com\/wp-content\/uploads\/2021\/04\/Resolve-all-URLs-option.png\" alt=\"Resolve all URLs option\" \/><\/p>\n<h5>6. Local Testing Automate<\/h5>\n<p>We wanted to leave no stone unturned in this BrowserStack Tutorial and so we have listed the numerous Frameworks and languages that are supported in BrowserStack in the image below.<\/p>\n<p><img decoding=\"async\" title=\" Languages and Frameworks supported in BrowserStack\" src=\"https:\/\/codoid.com\/wp-content\/uploads\/2021\/04\/Languages-and-Frameworks-supported-in-BrowserStack.png\" alt=\" Languages and Frameworks supported in BrowserStack\" \/><\/p>\n<p>We can enable and disable local testing automatically using the code snippet in our test scripts. In this example, we have used Java language, and so it displays the Java BrowserStack local dependency. We need to add this dependency in pom.xml<\/p>\n<div class=\"editor editor-dark\">\n<div class=\"editor-top\">\n<ul class=\"editor-controls\">\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<\/ul>\n<\/div>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\n&lt;dependency&gt;\r\n    &lt;groupId&gt;com.browserstack&lt;\/groupId&gt;\r\n    &lt;artifactId&gt;browserstack-local-java&lt;\/artifactId&gt;\r\n    &lt;version&gt;1.0.3&lt;\/version&gt;\r\n&lt;\/dependency&gt;\r\n<\/pre>\n<\/div>\n<p>This code snippet starts and stops BrowserStack local while running our test scripts.<\/p>\n<div class=\"editor editor-dark\">\n<div class=\"editor-top\">\n<ul class=\"editor-controls\">\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<\/ul>\n<\/div>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\nimport com.browserstack.local.Local;\r\n\r\n# creates an instance of Local\r\nLocal bsLocal = new Local();\r\n\r\n# replace &lt;browserstack-accesskey&gt; with your key. You can also set an environment variable - &quot;BROWSERSTACK_ACCESS_KEY&quot;.\r\nHashMap&lt;String, String&gt; bsLocalArgs = new HashMap&lt;String, String&gt;();\r\nbsLocalArgs.put(&quot;key&quot;, &quot;&lt;browserstack-accesskey&gt;&quot;);\r\n\r\n# starts the Local instance with the required arguments\r\nbsLocal.start(bsLocalArgs);\r\n\r\n# check if BrowserStack local instance is running\r\nSystem.out.println(bsLocal.isRunning());\r\n\r\n#stop the Local instance\r\nbsLocal.stop();\r\n<\/pre>\n<\/div>\n<p>Steps involved in enabling BrowserStack local automate via command line:<\/p>\n<p>1. Download the appropriate binary for your system:<\/p>\n<ul>\n<li>OS X (10.7 and above)<\/li>\n<li>Linux 32-bit<\/li>\n<li>Linux 64-bit<\/li>\n<li>Windows (XP and above)<\/li>\n<\/ul>\n<p>2. Unzip the binary to a folder\/directory on your machine.<\/p>\n<p>3. Open your command-line interface and navigate to the folder containing the Local binary.<\/p>\n<p>4. Run the binary using the following command:<\/p>\n<div class=\"editor editor-dark\">\n<div class=\"editor-top\">\n<ul class=\"editor-controls\">\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<\/ul>\n<\/div>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\nBrowserStackLocal.exe --key sdfsdfsdfsgfggffsgdfg\r\n<\/pre>\n<\/div>\n<p>After establishing the Local Testing connection, set the browserstack.local capability to true by adding the following snippet to your script:<\/p>\n<div class=\"editor editor-dark\">\n<div class=\"editor-top\">\n<ul class=\"editor-controls\">\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<\/ul>\n<\/div>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\ncaps.setCapability(&quot;browserstack.local&quot;, &quot;true&quot;);\r\n<\/pre>\n<\/div>\n<h3>BrowserStack Tutorial for using the Automate Feature:<\/h3>\n<p>With the help of the &#8216;Automate&#8217; feature we can use BrowserStack\u2019s real cloud devices <a href=\"https:\/\/codoid.com\/automation-testing-tools-we-use\">to automate our test scripts<\/a>. The same languages and frameworks that were supported in Local Testing Automate will also be supported for Automate. So we can choose any language and framework from the list that we saw earlier. In this BrowserStack Tutorial, we will be using java to explain the BrowserStack Automate feature.<\/p>\n<h5>a) Selecting the OS and device\/browser combination<\/h5>\n<p> You can easily select the OS and Device\/Browser combination you\u2019d like to test on, using the drop-down menus as shown below.<\/p>\n<p><img decoding=\"async\" title=\"BrowserStack Tutorial to select the OS\" src=\"https:\/\/codoid.com\/wp-content\/uploads\/2021\/04\/BrowserStack-Tutorial-to-select-the-OS.png\" alt=\"BrowserStack Tutorial to select the OS\" \/><\/p>\n<p><img decoding=\"async\" title=\"BrowserStack Tutorial to select the device\" src=\"https:\/\/codoid.com\/wp-content\/uploads\/2021\/04\/BrowserStack-Tutorial-to-select-the-device.png\" alt=\"BrowserStack Tutorial to select the device\" \/><\/p>\n<p>For the above-selected combination, the BrowserStack sample code will be automatically generated. Now we can set up the sample code in the framework to run our test scripts in BrowserStack. Write the variables for the user name and access key. Pass the user name and password in BrowserStack URL. Set the desired capabilities to see the logs. We are setting the desired capabilities to tell the web driver, to choose the mentioned operating system, browser, and browser version. Create the object for the web driver and get the URL to open the website.<\/p>\n<div class=\"editor editor-dark\">\n<div class=\"editor-top\">\n<ul class=\"editor-controls\">\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<\/ul>\n<\/div>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\nimport org.openqa.selenium.By;\r\nimport org.openqa.selenium.Platform;\r\nimport org.openqa.selenium.WebDriver;\r\nimport org.openqa.selenium.WebElement;\r\nimport org.openqa.selenium.remote.DesiredCapabilities;\r\nimport org.openqa.selenium.remote.RemoteWebDriver;\r\nimport org.openqa.selenium.JavascriptExecutor;\r\nimport java.net.URL;\r\nimport org.openqa.selenium.support.ui.ExpectedConditions;\r\nimport org.openqa.selenium.support.ui.WebDriverWait;\r\npublic class JavaSample {\r\n  public static final String AUTOMATE_USERNAME = &quot;&lt;USERNAME&gt;&quot;;\r\n  public static final String AUTOMATE_ACCESS_KEY = &quot;&lt;ACCESSKEY&gt;&quot;;\r\n  public static final String URL = &quot;https:\/\/&quot; + AUTOMATE_USERNAME + &quot;:&quot; + AUTOMATE_ACCESS_KEY + &quot;@hub-cloud.browserstack.com\/wd\/hub&quot;;\r\n  public static void main(String[] args) throws Exception {\r\n    DesiredCapabilities caps = new DesiredCapabilities();\r\n    caps.setCapability(&quot;browserName&quot;, &quot;iPhone&quot;);\r\n    caps.setCapability(&quot;device&quot;, &quot;iPhone 11&quot;);\r\n    caps.setCapability(&quot;realMobile&quot;, &quot;true&quot;);\r\n    caps.setCapability(&quot;os_version&quot;, &quot;14.0&quot;);\r\n    caps.setCapability(&quot;name&quot;, &quot;BStack-[Java] Sample Test&quot;); \/\/ test name\r\n    caps.setCapability(&quot;build&quot;, &quot;BStack Build Number 1&quot;); \/\/ CI\/CD job or build name\r\n    WebDriver driver = new RemoteWebDriver(new URL(URL), caps);\r\n    driver.get(&quot;https:\/\/www.google.com&quot;);\r\n    WebElement element = driver.findElement(By.name(&quot;q&quot;));\r\n    element.sendKeys(&quot;BrowserStack&quot;);\r\n    element.submit();\r\n    \/\/ Setting the status of test as 'passed' or 'failed' based on the condition; if title of the web page contains 'BrowserStack'\r\n    WebDriverWait wait = new WebDriverWait(driver, 5);\r\n    try {\r\n    \twait.until(ExpectedConditions.titleContains(&quot;BrowserStack&quot;));\r\n    \tmarkTestStatus(&quot;passed&quot;,&quot;Yaay title contains 'BrowserStack'!&quot;,driver);\r\n    }\r\n    catch(Exception e) {\r\n    \tmarkTestStatus(&quot;failed&quot;,&quot;Naay title does not contain 'BrowserStack'!&quot;,driver);\r\n    }\r\n    System.out.println(driver.getTitle());\r\n    driver.quit();\r\n  }\r\n  \/\/ This method accepts the status, reason and WebDriver instance and marks the test on BrowserStack\r\n  public static void markTestStatus(String status, String reason, WebDriver driver) {\r\n\tJavascriptExecutor jse = (JavascriptExecutor)driver;\r\n\tjse.executeScript(&quot;browserstack_executor: {\\&quot;action\\&quot;: \\&quot;setSessionStatus\\&quot;, \\&quot;arguments\\&quot;: {\\&quot;status\\&quot;: \\&quot;&quot;+status+&quot;\\&quot;, \\&quot;reason\\&quot;: \\&quot;&quot;+reason+&quot;\\&quot;}}&quot;);\r\n  }\r\n} \r\n<\/pre>\n<\/div>\n<h5>b) Execution process:<\/h5>\n<ul>\n<li>Once the script starts its execution, it will trigger the BrowserStack to run the script.<\/li>\n<li>Every script execution will be maintained as a session with a unique session ID.<\/li>\n<li>Under \u2018All projects\u2019, the scripts that are running and the ones that have been executed will be displayed.<\/li>\n<li>Once the Script has started execution, all the logs will start getting recorded.<\/li>\n<li>We can see a live video about what\u2019s happening during the execution in BrowserStack.<\/li>\n<li>Once the execution has been completed successfully, the Status will be changed from \u2018Running\u2019 to \u2018Completed\u2019. It will be denoted using a Green\u202fcolor\u202fdot.<\/li>\n<li>If the execution has failed because of any error, then the Status will be \u2018Errors\u2019.<\/li>\n<li>If the session had timed out, then the Status will be mentioned as \u201cTimeout\u201d, and the status will be denoted using a Yellow\u202fcolor\u202fdot.<\/li>\n<\/ul>\n<p>Observe the automate tab. We can see the test name on the left side of the tab, where BrowserStack enables us to debug the code with the help of Text Logs, Visual Logs, and Video of the session<\/p>\n<ul>\n<li>Text Logs: They provide all the Information with the details of actions and timing.<\/li>\n<li>Visual Logs: They provide the details with screenshots.<\/li>\n<\/ul>\n<p><img decoding=\"async\" title=\"BrowserStack Tutorial to use Text log\" src=\"https:\/\/codoid.com\/wp-content\/uploads\/2021\/04\/BrowserStack-Tutorial-to-use-Text-log.png\" alt=\"BrowserStack Tutorial to use Text log\" \/><\/p>\n<ul>\n<li>Video: It records all the actions done through the automated script. It helps to identify the exact root cause of any error during execution.<\/li>\n<\/ul>\n<p>It also has the option to play or download the video, using which we can watch the video in the dashboard or download it and use it to debug the error.<\/p>\n<p><img decoding=\"async\" title=\"BrowserStack Tutorial to use Visual log\" src=\"https:\/\/codoid.com\/wp-content\/uploads\/2021\/04\/BrowserStack-Tutorial-to-use-Visual-log.png\" alt=\"BrowserStack Tutorial to use Visual log\" \/><\/p>\n<h5>c) Run Tests in Parallel<\/h5>\n<p>On BrowserStack, we can run multiple Selenium WebDriver tests at the same time across various browser, device, and OS combinations. This is called Parallel Testing. Parallel Testing gives us the same benefits as running a multi-threaded application. We wanted to make sure that our BrowserStack Tutorial does more than just introduce you to the tool. We wanted everyone reading this blog to make use of BrowserStack&#8217;s full potential.<\/p>\n<p>With Parallel Testing, we can run the same test on different browser\/device combinations i.e. cross-browser testing, or run different tests on the same or different browser\/device combinations as explained above. Parallel Testing will help us drastically reduce the run time of our test suite, resulting in faster build times and faster releases.<\/p>\n<p>We can start testing in parallel using any of the popular test frameworks, and some of the popular frameworks are mentioned below:<\/p>\n<ul>\n<li>TestNG<\/li>\n<li>Gauge<\/li>\n<li>JBehave<\/li>\n<li>JUnit<\/li>\n<li>Selenide<\/li>\n<li>Serenity<\/li>\n<\/ul>\n<p>Here, we are going to use the TestNG framework to explain Parallel Testing in detail.<\/p>\n<p>To run the tests on multiple browsers in parallel with TestNG on BrowserStack Automate, follow the below steps:<\/p>\n<p>1. Clone the testng-browserstack repo on GitHub (if not already done):<\/p>\n<p>2. git clone https:\/\/github.com\/browserstack\/testng-browserstack.git<\/p>\n<p>3. cd testng-browserstack<\/p>\n<p>4. Install the dependencies using the following command:<\/p>\n<p>5. mvn compile<\/p>\n<p>6. Update parallel.conf.json files within the testng-browserstack\/src\/test\/resources\/conf directory with your BrowserStack credentials as shown below:<br \/>\n<b>parallel.conf.json <\/b><\/p>\n<div class=\"editor editor-dark\">\n<div class=\"editor-top\">\n<ul class=\"editor-controls\">\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<\/ul>\n<\/div>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\n {\r\n   &quot;server&quot;: &quot;hub-cloud.browserstack.com&quot;,\r\n   &quot;user&quot;: &quot;USERNAME&quot;,\r\n   &quot;key&quot;: &quot;ACCESSKEY&quot;,\r\n   &quot;capabilities&quot;: {\r\n     &quot;build&quot;: &quot;testng-browserstack&quot;,\r\n     &quot;name&quot;: &quot;Bstack-[TestNG] Parallel Test&quot;,\r\n     &quot;browserstack.debug&quot;: true\r\n   },\r\n   &quot;environments&quot;: {\r\n     &quot;chrome&quot;: {\r\n       &quot;browser&quot;: &quot;chrome&quot;\r\n     },\r\n     &quot;firefox&quot;: {\r\n       &quot;browser&quot;: &quot;firefox&quot;\r\n     },\r\n     &quot;safari&quot;: {\r\n       &quot;os&quot;: &quot;OS X&quot;,\r\n       &quot;browser&quot;: &quot;safari&quot;\r\n     },\r\n     &quot;ie&quot;: {\r\n       &quot;browser&quot;: &quot;internet explorer&quot;\r\n     }\r\n   }\r\n }\r\n<\/pre>\n<\/div>\n<p>7. You can now run your tests in parallel on BrowserStack using the following command<\/p>\n<div class=\"editor editor-dark\">\n<div class=\"editor-top\">\n<ul class=\"editor-controls\">\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<\/ul>\n<\/div>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\n mvn test -P parallel\r\n<\/pre>\n<\/div>\n<h5>d) How to Run tests in parallel without a framework<\/h5>\n<p> We have also demonstrated how to run tests in parallel without a framework using a sample script that shows a multi-threaded Java program in this BrowserStack Tutorial. Before we head on to the script, let\u2019s take a look at its salient points.<\/p>\n<ul>\n<li>The same script is run across 3 different browser\/device combinations viz. iPhone 12 Pro, Samsung Galaxy S20, and Safari on Big Sur.<\/li>\n<li>The capabilities are being populated in a HashTable, and that is being passed on to the test function.<\/li>\n<li>The test function has been written as a separate method, and it takes care of the starting of the test for each of the browsers after iterating on the HashTable that is passed on to it.<\/li>\n<li>Multi-threading has been implemented by defining multiple classes, all of which implement the Runnable Java class.<\/li>\n<li>The main class contains the main() method, and all the 3 threads are invoked from the main class<\/li>\n<\/ul>\n<div class=\"editor editor-dark\">\n<div class=\"editor-top\">\n<ul class=\"editor-controls\">\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<\/ul>\n<\/div>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\n import java.net.MalformedURLException;\r\nimport java.net.URL;\r\nimport java.util.Hashtable;\r\nimport java.util.Iterator;\r\nimport java.util.Set;\r\nimport java.util.concurrent.TimeUnit;\r\nimport org.openqa.selenium.By;\r\nimport org.openqa.selenium.JavascriptExecutor;\r\nimport org.openqa.selenium.WebDriver;\r\nimport org.openqa.selenium.WebElement;\r\nimport org.openqa.selenium.remote.DesiredCapabilities;\r\nimport org.openqa.selenium.remote.RemoteWebDriver;\r\nimport org.openqa.selenium.support.ui.ExpectedConditions;\r\nimport org.openqa.selenium.support.ui.WebDriverWait;\r\nclass TestClass1 implements Runnable {\r\n\tpublic void run() {\r\n\t\tHashtable&lt;String, String&gt; capsHashtable = new Hashtable&lt;String, String&gt;();\r\n\t\tcapsHashtable.put(&quot;device&quot;, &quot;iPhone 12 Pro&quot;);\r\n\t\tcapsHashtable.put(&quot;real_mobile&quot;, &quot;true&quot;);\r\n\t\tcapsHashtable.put(&quot;os_version&quot;, &quot;14&quot;);\r\n    capsHashtable.put(&quot;build&quot;, &quot;BStack-[Java] Sample Build&quot;);\r\n\t\tcapsHashtable.put(&quot;name&quot;, &quot;Thread 1&quot;);\r\n\t\tmainTestClass r1 = new mainTestClass();\r\n\t\tr1.executeTest(capsHashtable);\r\n  }\r\n}\r\nclass TestClass2 implements Runnable {\r\n  public void run() {\r\n\t\tHashtable&lt;String, String&gt; capsHashtable = new Hashtable&lt;String, String&gt;();\r\n\t\tcapsHashtable.put(&quot;device&quot;, &quot;Samsung Galaxy S20&quot;);\r\n\t\tcapsHashtable.put(&quot;real_mobile&quot;, &quot;true&quot;);\r\n\t\tcapsHashtable.put(&quot;os_version&quot;, &quot;11.0&quot;);\r\n\t\tcapsHashtable.put(&quot;build&quot;, &quot;BStack-[Java] Sample Build&quot;);\r\n\t\tcapsHashtable.put(&quot;name&quot;, &quot;Thread 2&quot;);\r\n\t\tmainTestClass r1 = new mainTestClass();\r\n    r1.executeTest(capsHashtable);\r\n  }\r\n}\r\nclass TestClass3 implements Runnable {\r\n\tpublic void run() {\r\n\t\tHashtable&lt;String, String&gt; capsHashtable = new Hashtable&lt;String, String&gt;();\r\n\t\tcapsHashtable.put(&quot;browser&quot;, &quot;safari&quot;);\r\n\t\tcapsHashtable.put(&quot;browser_version&quot;, &quot;14&quot;);\r\n\t\tcapsHashtable.put(&quot;os&quot;, &quot;OS X&quot;);\r\n\t\tcapsHashtable.put(&quot;os_version&quot;, &quot;Big Sur&quot;);\r\n\t\tcapsHashtable.put(&quot;build&quot;, &quot;BStack-[Java] Sample Build&quot;);\r\n\t\tcapsHashtable.put(&quot;name&quot;, &quot;Thread 3&quot;);\r\n\t\tmainTestClass r1 = new mainTestClass();\r\n    r1.executeTest(capsHashtable);\r\n  }\r\n}\r\npublic class mainTestClass {\r\n  public static final String USERNAME = &quot;USERNAME&quot;;\r\n  public static final String AUTOMATE_KEY = &quot;ACCESSKEY&quot;;\r\n  public static final String URL = &quot;https:\/\/&quot; + USERNAME + &quot;:&quot; + AUTOMATE_KEY + &quot;@hub-cloud.browserstack.com\/wd\/hub&quot;;\r\n  public static void main(String[] args) throws Exception {\r\n\t  Thread object1 = new Thread(new TestClass1());\r\n    object1.start();\r\n    Thread object2 = new Thread(new TestClass2());\r\n    object2.start();\r\n    Thread object3 = new Thread(new TestClass3());\r\n    object3.start();\r\n  }\r\n\tpublic void executeTest(Hashtable&lt;String, String&gt; capsHashtable) {\r\n\t\tString key;\r\n\t  DesiredCapabilities caps = new DesiredCapabilities();\r\n\t\t\/\/ Iterate over the hashtable and set the capabilities\r\n\t\tSet&lt;String&gt; keys = capsHashtable.keySet();\r\n    Iterator&lt;String&gt; itr = keys.iterator();\r\n    while (itr.hasNext()) {\r\n       key = itr.next();\r\n       caps.setCapability(key, capsHashtable.get(key));\r\n    }\r\n    WebDriver driver;\r\n\t\ttry {\r\n\t\t\tdriver = new RemoteWebDriver(new URL(URL), caps);\r\n\t    JavascriptExecutor jse = (JavascriptExecutor)driver;\r\n\t    \/\/ Searching for 'BrowserStack' on google.com\r\n\t    driver.get(&quot;https:\/\/www.google.com&quot;);\r\n\t    WebElement element = driver.findElement(By.name(&quot;q&quot;));\r\n\t    element.sendKeys(&quot;BrowserStack&quot;);\r\n\t    element.submit();\r\n\t\t\t\/\/ Setting the status of test as 'passed' or 'failed' based on the condition; if title of the web page contains 'BrowserStack'\r\n\t\t\tWebDriverWait wait = new WebDriverWait(driver, 5);\r\n\t    try {\r\n\t    \twait.until(ExpectedConditions.titleContains(&quot;BrowserStack&quot;));\r\n\t    \tjse.executeScript(&quot;browserstack_executor: {\\&quot;action\\&quot;: \\&quot;setSessionStatus\\&quot;, \\&quot;arguments\\&quot;: {\\&quot;status\\&quot;: \\&quot;passed\\&quot;, \\&quot;reason\\&quot;: \\&quot;Title matched!\\&quot;}}&quot;);\r\n\t    }\r\n\t    catch(Exception e) {\r\n\t    \tjse.executeScript(&quot;browserstack_executor: {\\&quot;action\\&quot;: \\&quot;setSessionStatus\\&quot;, \\&quot;arguments\\&quot;: {\\&quot;status\\&quot;:\\&quot;failed\\&quot;, \\&quot;reason\\&quot;: \\&quot;Title not matched\\&quot;}}&quot;);\r\n\t    }\r\n\t    System.out.println(driver.getTitle());\r\n\t    driver.quit();\r\n\t\t} catch (MalformedURLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}\r\n}\r\n<\/pre>\n<\/div>\n<h3>BrowserStack Tutorial for using the APP LIVE Feature<\/h3>\n<p>So the last feature that we will be seeing in this BrowserStack Tutorial is the App Live function that helps us to do native app testing in a list of real cloud devices. To use the native app in the BrowserStack devices, we can use the Upload or URL option.<\/p>\n<h5>a) Uploading\/Testing the App<\/h5>\n<p>Click on the upload app button, and a system dialog window will open.<\/p>\n<p>Go to the app folder, choose the App which you want to test, and the app will be loaded successfully. We will be able to see the app under the uploaded apps section.<\/p>\n<p>This is not the only way to get this done, and you can upload the app in other ways as well. For example, you can click on \u2018View all sources\u2019 and select any type of source through which you are going to upload the app.<\/p>\n<p><img decoding=\"async\" title=\"BrowserStack Tutorial to upload the app\" src=\"https:\/\/codoid.com\/wp-content\/uploads\/2021\/04\/BrowserStack-Tutorial-to-upload-the-app.png\" alt=\"BrowserStack Tutorial to upload the app\" \/><\/p>\n<p>After Uploading the App, select any device from the list of real Android or iOS devices. The device of your choice will be selected, and the app will be installed in it. Now you are all set to perform testing like how you would do using a real device. <\/p>\n<p><img decoding=\"async\" title=\"Testing preview\" src=\"https:\/\/codoid.com\/wp-content\/uploads\/2021\/04\/Testing-preview.png\" alt=\"Testing preview\" \/><\/p>\n<h5>b) Key Functions of App Live <\/h5>\n<p><b>1) Switch Device Function<\/b><\/p>\n<p>Just like how you can shift from one browser to another, you can migrate from one device to another to perform your testing as well. Click on the \u2018Switch device\u2019 option, if you wish to switch the device at any given time. Once you are done with testing in a particular device, click on the Stop session option and it will navigate you to the dashboard page. Click on settings to choose the session time out and monitor size.<br \/>\nWe can report the bug by clicking on the Report a bug option, just like how we discussed in the above Live Testing Section. Now let\u2019s take a look at the web tool kit menu, which has some more options to operate the device feasibly and test the application.<\/p>\n<p>Click on the \u2018Rotate Device\u2019 option to rotate the device horizontally or vertically. You can click on the &#8216;Install App&#8217; option to install the new application. If you want to just close the app and not the device, then click on the \u2018Kill app\u2019 option. Click on \u2018Change language\u2019 to change the language for testing. If you are looking to check the complete device information, click on the \u2018Device info&#8217; icon.<\/p>\n<p><b>2) Deleting the App<\/b><\/p>\n<p>Click on the delete icon, and you will see the checkbox at each app. Select the checkbox, and click on the delete link and it is also important to keep in mind that it will delete the uploaded app automatically after the completion of 60 days from the date of upload.<\/p>\n<h3>BrowserStack Tutorial for using APP AUTOMATE Feature<\/h3>\n<p>BrowserStack App Automate enables you to test native and hybrid mobile applications using a testing framework.<\/p>\n<p><img decoding=\"async\" title=\"Supported Frameworks\" src=\"https:\/\/codoid.com\/wp-content\/uploads\/2021\/04\/Supported-Frameworks.png\" alt=\"Supported Frameworks\" \/><\/p>\n<p>Here, we are going to use Appium to explain about App Automate. It\u2019s easy to run your Appium tests written in Java on real Android and iOS devices on BrowserStack. This guide will help you get started with your first test.<\/p>\n<h5>1. Setup <\/h5>\n<ul>\n<li>You will need a BrowserStack username and access key<\/li>\n<\/ul>\n<h5>2. Upload your app <\/h5>\n<p>Upload your Android app (.apk or .aab file) or iOS app (.ipa file) to BrowserStack servers using our REST API. Here is an example cURL request to upload the app :<\/p>\n<div class=\"editor editor-dark\">\n<div class=\"editor-top\">\n<ul class=\"editor-controls\">\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<\/ul>\n<\/div>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\ncurl -u &quot;USERNAME:ACESSKEY&quot; \\\r\n-X POST &quot;https:\/\/api-cloud.browserstack.com\/app-automate\/upload&quot; \\\r\n-F file=@\/path\/to\/app\/file\/Application-debug.apk\r\n<\/pre>\n<\/div>\n<p>A sample response for the above request is shown below:<\/p>\n<div class=\"editor editor-dark\">\n<div class=\"editor-top\">\n<ul class=\"editor-controls\">\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<\/ul>\n<\/div>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\n{\r\n    &quot;app_url&quot;:&quot;bs:\/\/j3c874f21852ba57957a3fdc33f47514288c4ba4&quot;\r\n}\r\n<\/pre>\n<\/div>\n<h5>3. Setup and run your test<\/h5>\n<ul>\n<li>Specify the application under test using the app capability. Use the app_url value returned at the time of app upload (Step 2) to set this capability.<\/li>\n<li>Specify the real Android or iOS device you want to test on, using the device capability.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<div class=\"editor editor-dark\">\n<div class=\"editor-top\">\n<ul class=\"editor-controls\">\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<\/ul>\n<\/div>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\nimport java.net.URL;\r\nimport java.util.List;\r\nimport java.net.MalformedURLException;\r\n\r\nimport io.appium.java_client.MobileBy;\r\nimport io.appium.java_client.android.AndroidDriver;\r\nimport io.appium.java_client.android.AndroidElement;\r\n\r\nimport org.openqa.selenium.support.ui.ExpectedConditions;\r\nimport org.openqa.selenium.support.ui.WebDriverWait;\r\nimport org.openqa.selenium.remote.DesiredCapabilities;\r\n\r\npublic class BrowserStackAndroid {\r\n\r\n  public static String userName = &quot;USERNAME&quot;;\r\n  public static String accessKey = &quot;ACCESSKEY&quot;;\r\n\r\n  public static void main(String args[]) throws MalformedURLException, InterruptedException {\r\n    DesiredCapabilities caps = new DesiredCapabilities();\r\n\r\n    caps.setCapability(&quot;device&quot;, &quot;Samsung Galaxy S8 Plus&quot;);\r\n    caps.setCapability(&quot;os_version&quot;, &quot;7.0&quot;);\r\n    caps.setCapability(&quot;project&quot;, &quot;My First Project&quot;);\r\n    caps.setCapability(&quot;build&quot;, &quot;My First Build&quot;);\r\n    caps.setCapability(&quot;name&quot;, &quot;Bstack-[Java] Sample Test&quot;);\r\n    caps.setCapability(&quot;app&quot;, &quot;&lt;app_url&gt;&quot;);\r\n\r\n    AndroidDriver&lt;AndroidElement&gt; driver = new AndroidDriver&lt;AndroidElement&gt;(new URL(&quot;https:\/\/&quot;+userName+&quot;:&quot;+accessKey+&quot;@hub-cloud.browserstack.com\/wd\/hub&quot;), caps);\r\n\r\n    AndroidElement searchElement = (AndroidElement) new WebDriverWait(driver, 30).until(\r\n        ExpectedConditions.elementToBeClickable(MobileBy.AccessibilityId(&quot;Search Wikipedia&quot;)));\r\n    searchElement.click();\r\n    AndroidElement insertTextElement = (AndroidElement) new WebDriverWait(driver, 30).until(\r\n        ExpectedConditions.elementToBeClickable(MobileBy.id(&quot;org.wikipedia.alpha:id\/search_src_text&quot;)));\r\n    insertTextElement.sendKeys(&quot;BrowserStack&quot;);\r\n    Thread.sleep(5000);\r\n\r\n    List&lt;AndroidElement&gt; allProductsName = driver.findElementsByClassName(&quot;android.widget.TextView&quot;);\r\n    assert(allProductsName.size() &gt; 0);\r\n\r\n    \/\/ The driver.quit statement is required, otherwise the test continues to execute, leading to a timeout.\r\n    driver.quit();\r\n  }\r\n}\r\n\r\n<\/pre>\n<\/div>\n<h5>4. Viewing test results <\/h5>\n<p>You can access the results of your test sessions on the App Automate dashboard as well as using our REST API. You can drill down into the details of a specific test session to view its execution details and debugging information such as video recording, network logs, and device logs.<\/p>\n<h3>Conclusion<\/h3>\n<p>We hope this BrowserStack Tutorial has been a good read for you, and that it was worth your time. Stating that BrowserStack is a highly resourceful tool is an understatement, as it has been instrumental in helping us provide the best Automation Testing Services. BrowserStack is one tool you should add to your arsenal as the benefits it brings to the table are of high value. Though there are alternatives available for this very same purpose, as <a href=\"https:\/\/codoid.com\/\">a leading QA company<\/a>, we at Codoid have always used BrowserStack for all our projects and that is why we have written this BrowserStack Tutorial as well. They are the pioneers in their domain, making them the best choice if you don\u2019t want to take a chance with your testing just like us.<\/p>\n<h3 class=\"text-center\"> Frequently Asked Questions<\/h3>\n<div class=\"faq-section\">\n\r\n            \r\n              <ul class=\"accordion\"><li>\r\n                  <span class=\"toggle\">What is the BrowserStack tool?<\/span>\r\n                  <div class=\"inner \" style=\"\" >\r\n                    <p>BrowserStack is a cloud-based testing tool where developers and testers can test their websites and mobile applications across browsers, operating systems, and real-time mobile devices.<\/p>\r\n                  <\/div>\r\n                <\/li><li>\r\n                  <span class=\"toggle\">Is BrowserStack a testing tool?<\/span>\r\n                  <div class=\"inner \" style=\"\" >\r\n                    <p>Yes, BrowserStack is a testing platform that enables easy testing of mobile applications and websites across Browsers and devices.<\/p>\r\n                  <\/div>\r\n                <\/li><li>\r\n                  <span class=\"toggle\">Is BrowserStack free to use?<\/span>\r\n                  <div class=\"inner \" style=\"\" >\r\n                    <p>Though it is not free to use, BrowserStack does have a free trial account that includes 30 minutes of live testing, 100 minutes of automated testing, 100 screenshots plus responsive, 30 minutes of app live testing, and 100 minutes of app automated testing.<\/p>\r\n                  <\/div>\r\n                <\/li><li>\r\n                  <span class=\"toggle\">Why is BrowserStack used?<\/span>\r\n                  <div class=\"inner \" style=\"\" >\r\n                    <p>It is challenging to test an application in real-time across a variety of browsers and mobile combinations, operating systems, and version ranges. By using BrowserStack, you may eliminate the hassle of switching between operating systems, browsers, and versions. It also allows users to test the latest version of mobile\/tablet devices without purchasing it. <\/p>\r\n                  <\/div>\r\n                <\/li><li>\r\n                  <span class=\"toggle\">Who uses BrowserStack?<\/span>\r\n                  <div class=\"inner \" style=\"\" >\r\n                    <p>Both developers and testers use BrowserStack to do cross-browser testing for website applications and various mobile applications.  <\/p>\r\n                  <\/div>\r\n                <\/li><\/ul>\r\n            \n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Are you someone who wants to run their test cases on multiple browsers or machines? Then this BrowserStack Tutorial is a must-read for you as without it, you could be spending a lot of time, money, and effort to set up the multiple browsers or machines needed to perform the offline tests using real devices. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":7127,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"categories":[181,20],"tags":[],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v20.3 (Yoast SEO v20.3) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>An End-to-End BrowserStack Tutorial for Beginners - Codoid<\/title>\n<meta name=\"description\" content=\"Are you looking to run your test cases on multiple devices without having to purchase real devices? This BrowserStack Tutorial is for you.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"An End-to-End BrowserStack Tutorial for Beginners\" \/>\n<meta property=\"og:description\" content=\"Are you looking to run your test cases on multiple devices without having to purchase real devices? This BrowserStack Tutorial is for you.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/codoid.com\/learn\/software-testing\/browserstack-tutorial\/\" \/>\n<meta property=\"og:site_name\" content=\"Codoid\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/codoid.softwaretestingcompany\" \/>\n<meta property=\"article:published_time\" content=\"2021-04-27T18:12:41+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-11-07T13:51:36+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/codoid.com\/wp-content\/uploads\/2021\/04\/BrowserStack-Tutorial-for-Beginners-Codoid-Blog.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"800\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@codoid\" \/>\n<meta name=\"twitter:site\" content=\"@codoid\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"19 minutes\" \/>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"An End-to-End BrowserStack Tutorial for Beginners - Codoid","description":"Are you looking to run your test cases on multiple devices without having to purchase real devices? This BrowserStack Tutorial is for you.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"og_locale":"en_US","og_type":"article","og_title":"An End-to-End BrowserStack Tutorial for Beginners","og_description":"Are you looking to run your test cases on multiple devices without having to purchase real devices? This BrowserStack Tutorial is for you.","og_url":"https:\/\/codoid.com\/learn\/software-testing\/browserstack-tutorial\/","og_site_name":"Codoid","article_publisher":"https:\/\/www.facebook.com\/codoid.softwaretestingcompany","article_published_time":"2021-04-27T18:12:41+00:00","article_modified_time":"2023-11-07T13:51:36+00:00","og_image":[{"width":1200,"height":800,"url":"https:\/\/codoid.com\/wp-content\/uploads\/2021\/04\/BrowserStack-Tutorial-for-Beginners-Codoid-Blog.jpg","type":"image\/jpeg"}],"author":"admin","twitter_card":"summary_large_image","twitter_creator":"@codoid","twitter_site":"@codoid","twitter_misc":{"Written by":"admin","Est. reading time":"19 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/codoid.com\/learn\/software-testing\/browserstack-tutorial\/#article","isPartOf":{"@id":"https:\/\/codoid.com\/learn\/software-testing\/browserstack-tutorial\/"},"author":{"name":"admin","@id":"https:\/\/codoid.com\/#\/schema\/person\/360ee1d38151acb7c746787fbfa8e586"},"headline":"An End-to-End BrowserStack Tutorial for Beginners","datePublished":"2021-04-27T18:12:41+00:00","dateModified":"2023-11-07T13:51:36+00:00","mainEntityOfPage":{"@id":"https:\/\/codoid.com\/learn\/software-testing\/browserstack-tutorial\/"},"wordCount":4196,"commentCount":0,"publisher":{"@id":"https:\/\/codoid.com\/#organization"},"articleSection":["Software Testing","Blog"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/codoid.com\/learn\/software-testing\/browserstack-tutorial\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/codoid.com\/learn\/software-testing\/browserstack-tutorial\/","url":"https:\/\/codoid.com\/learn\/software-testing\/browserstack-tutorial\/","name":"An End-to-End BrowserStack Tutorial for Beginners - Codoid","isPartOf":{"@id":"https:\/\/codoid.com\/#website"},"datePublished":"2021-04-27T18:12:41+00:00","dateModified":"2023-11-07T13:51:36+00:00","description":"Are you looking to run your test cases on multiple devices without having to purchase real devices? This BrowserStack Tutorial is for you.","breadcrumb":{"@id":"https:\/\/codoid.com\/learn\/software-testing\/browserstack-tutorial\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/codoid.com\/learn\/software-testing\/browserstack-tutorial\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/codoid.com\/learn\/software-testing\/browserstack-tutorial\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/codoid.com\/"},{"@type":"ListItem","position":2,"name":"An End-to-End BrowserStack Tutorial for Beginners"}]},{"@type":"WebSite","@id":"https:\/\/codoid.com\/#website","url":"https:\/\/codoid.com\/","name":"Codoid","description":"","publisher":{"@id":"https:\/\/codoid.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/codoid.com\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/codoid.com\/#organization","name":"Codoid - Software Testing Company","url":"https:\/\/codoid.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/codoid.com\/#\/schema\/logo\/image\/","url":"https:\/\/codoid.com\/wp-content\/uploads\/2020\/09\/Codoid_Software_Testing_Company_Logo.png","contentUrl":"https:\/\/codoid.com\/wp-content\/uploads\/2020\/09\/Codoid_Software_Testing_Company_Logo.png","width":500,"height":500,"caption":"Codoid - Software Testing Company"},"image":{"@id":"https:\/\/codoid.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/codoid.softwaretestingcompany","https:\/\/twitter.com\/codoid","https:\/\/www.instagram.com\/codoid.softwaretestingcompany\/","https:\/\/www.linkedin.com\/company\/codoid-qacompany","https:\/\/www.pinterest.com\/codoid9282\/codoid-software-testing-company\/","https:\/\/www.youtube.com\/channel\/UCCmOTDQgcf4W8oo22mBMUYA"]},{"@type":"Person","@id":"https:\/\/codoid.com\/#\/schema\/person\/360ee1d38151acb7c746787fbfa8e586","name":"admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/codoid.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/4d33f9036c9d60684b9478f738779823?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4d33f9036c9d60684b9478f738779823?s=96&d=mm&r=g","caption":"admin"},"sameAs":["https:\/\/codoid.com"]}]}},"_links":{"self":[{"href":"https:\/\/codoid.com\/wp-json\/wp\/v2\/posts\/7023"}],"collection":[{"href":"https:\/\/codoid.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codoid.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codoid.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/codoid.com\/wp-json\/wp\/v2\/comments?post=7023"}],"version-history":[{"count":52,"href":"https:\/\/codoid.com\/wp-json\/wp\/v2\/posts\/7023\/revisions"}],"predecessor-version":[{"id":30769,"href":"https:\/\/codoid.com\/wp-json\/wp\/v2\/posts\/7023\/revisions\/30769"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/codoid.com\/wp-json\/wp\/v2\/media\/7127"}],"wp:attachment":[{"href":"https:\/\/codoid.com\/wp-json\/wp\/v2\/media?parent=7023"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codoid.com\/wp-json\/wp\/v2\/categories?post=7023"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codoid.com\/wp-json\/wp\/v2\/tags?post=7023"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}