{"id":2106,"date":"2013-08-07T22:13:58","date_gmt":"2013-08-07T16:43:58","guid":{"rendered":"http:\/\/www.automationrepository.com\/?p=2106"},"modified":"2013-08-07T22:15:46","modified_gmt":"2013-08-07T16:45:46","slug":"designing-hybrid-framework-in-qtp-part-3","status":"publish","type":"post","link":"https:\/\/www.automationrepository.com\/wordpress\/2013\/08\/designing-hybrid-framework-in-qtp-part-3\/","title":{"rendered":"Designing Hybrid Framework in QTP &#8211; Part 3"},"content":{"rendered":"<p>In the previous article on <a title=\"Designing Hybrid Framework in QTP \u2013 Part 2\" href=\"http:\/\/www.automationrepository.com\/2013\/08\/designing-hybrid-framework-in-qtp-part-2\/\" target=\"_blank\">Hybrid Framework in QTP<\/a>, we started writing the code to create the Hybrid Framework. We created one test script (in linear fashion) and then implemented the features of QTP modular framework into it. In this article, we will take up the same framework and extend it further<!--more--> by adding more features to it. We will start by adding the capability to fetch the data from excel data sheets and then will implement the batch execution functionality to the framework.<\/p>\n<p><span><br \/>\n<\/span><\/p>\n<h3>Topics covered in this article<\/h3>\n<p>Following are the topics that we will cover in this article &#8211;<\/p>\n<p><strong>a)<\/strong> Approach used to fetch data from excel sheets<\/p>\n<p><strong>b)<\/strong> Structure of the excel sheet and the actual code to fetch the data<\/p>\n<p><strong>c)<\/strong> Different ways to achieve batch execution with QTP<\/p>\n<p><strong>d)<\/strong> Preparing the batch excel sheet<\/p>\n<p><strong>e)<\/strong> Implementing the VBScript code to execute the test scripts from the batch sheet<\/p>\n<p><span><br \/>\n<\/span><\/p>\n<h3>How would data be fetched from excel sheets<\/h3>\n<p>Right now, the hybrid framework that you have with you doesn&#8217;t have the capability to fetch data from excel sheets. You have created custom functions (application independent functions) for all the QTP operations. And many of these custom functions have a parameter where you directly pass the data which you want to enter in the application. For example, the function fnSetValueInTextField takes whatever value you provide as an argument and then enters that value in the application. This is how it currently works &#8211;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" alt=\"Hybrid Framework in QTP - Entering test data directly in application\" src=\"https:\/\/www.automationrepository.com\/wordpress\/wp-content\/uploads\/ar\/hybrid-framework-enter-test-data-in-application.png\" width=\"537\" height=\"334\" \/><\/p>\n<p><em> <\/em><br \/>\nBut we don&#8217;t want our framework to work this way. What we want is that our data should be stored in excel sheets and the custom function should fetch the data from the excel sheet itself. So, our approach to fetch the data would be like this &#8211;<\/p>\n<p><strong>1)<\/strong> The data will be stored in the excel sheet(s).<\/p>\n<p><strong>2)<\/strong> Instead of passing the actual data in the custom function, we will pass the excel column header.<\/p>\n<p><strong>3)<\/strong> The custom function will open the excel sheet and find out the test data with the help of the column header.<\/p>\n<p><strong>4)<\/strong> The function will then set this data (obtained from the excel sheet) in the application.<\/p>\n<p>The below image shows how this new concept would work &#8211;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" alt=\"Hybrid Framework in QTP - Approach to fetch data from the excel sheets\" src=\"https:\/\/www.automationrepository.com\/wordpress\/wp-content\/uploads\/ar\/hybrid-framework-approach-to-fetch-data-from-excel-sheet.png\" width=\"561\" height=\"418\" \/><\/p>\n<p><em> <\/em><br \/>\nNow, there are various ways in which you can fetch data from excel sheets. And the method that we would use in this framework is this- <strong>we will not fetch the data directly from excel sheet. Our custom function will first import the data from excel sheet into QTP data table and then will fetch the actual test data from the data table.<\/strong> This is how it will look like &#8211;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" alt=\"QTP Hybrid Framework - Different approaches to fetch data from excel sheet\" src=\"https:\/\/www.automationrepository.com\/wordpress\/wp-content\/uploads\/ar\/hybrid-framework-different-approaches-to-fetch-excel-data.png\" width=\"647\" height=\"485\" \/><\/p>\n<p><em> <\/em><br \/>\nFor more details on the different ways to fetch data from the excel sheets, you can refer the articles on <a title=\"Data Driven Framework in QTP : The Complete Guide \u2013 Part 1\" href=\"http:\/\/www.automationrepository.com\/2012\/05\/qtp-data-driven-framework-design-with-examples\/\" target=\"_blank\">QTP data driven framework<\/a>.<\/p>\n<p><span><br \/>\n<\/span><\/p>\n<h3>Structure of the excel data sheets<\/h3>\n<p>The structure of your data sheet plays a very important part in the overall flow of your framework. And this data sheet structure becomes much more important when you are dealing with a lot of test cases (say more than 50 test cases). Also, there would be many other situations (like test cases being data intensive) that decide the structure of your data sheets.<\/p>\n<p><em> <\/em><br \/>\nYou would have to factor in all these criteria and select the data sheet format that best suites your project and your requirements. We have provided ample examples of different data sheet formats and how they are integrated with the code in data driven and keyword driven frameworks. You can refer those articles to get a better understanding of all those concepts in detail.<\/p>\n<p><em> <\/em><br \/>\nHowever, in this article, we will try to keep things as simple as possible. And since we are working with only 3 test cases in this framework, we will create the most basic data sheet format. So, the data sheet format\/structure that we will be using is as follows &#8211;<\/p>\n<p><strong>a)<\/strong> The framework will have 1 excel workbook as the data sheet.<\/p>\n<p><strong>b)<\/strong> Each test case will have its own separate excel sheet within that workbook.<\/p>\n<p><strong>c)<\/strong> So, this framework will use <strong>one excel workbook having three excel sheets<\/strong> (one sheet for each test case)<\/p>\n<p><strong>d)<\/strong> The name of each sheet will be same as the test case name. Doing this is important because if you keep the same names for the test case and the data sheet, it will become easier for the automation framework to identify the correct data sheet based upon the test case name.<\/p>\n<p>The below image shows how the data sheet would actually look like.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" alt=\"QTP Hybrid Framework - Structure of excel data sheets\" src=\"https:\/\/www.automationrepository.com\/wordpress\/wp-content\/uploads\/ar\/qtp-hybrid-framework-structure-of-data-sheets.png\" width=\"613\" height=\"305\" \/><\/p>\n<p>It is now time start working on the actual code that will fetch the data from the excel workbook.<\/p>\n<p><span><br \/>\n<\/span><\/p>\n<h3>Actual code to fetch the data from the excel sheets<\/h3>\n<p>Let us first see the approach that will be used to fetch the data from the excel sheet.<\/p>\n<p><strong>1)<\/strong> You will create a separate function called <strong>fnFetchDataFromExcelSheet().\u00a0<\/strong>This is the function that will actually fetch the test data.<\/p>\n<p><strong>2)<\/strong> This function will take an argument which will be the column header of the excel sheet.<\/p>\n<p><strong>3)<\/strong> This function will be added inside other functions that actually set some value in the application. For example, you use <strong>fnSetValueInTextField()<\/strong> to enter some value in the application. So our function to fetch the data will be added inside fnSetValueInTextField() function.<\/p>\n<p><strong>4)<\/strong> When you execute your test case, this function will get called. This function will first open the excel workbook and identify the sheet from which the data is to be fetched (the sheet will be identified from the test case name).<\/p>\n<p><strong>5)<\/strong> It will then copy the entire data from the sheet and will load it into QTP data table.<\/p>\n<p><strong>6)<\/strong> Once all the data is loaded into the QTP data table, this function will fetch the actual value by using the column header.<\/p>\n<p><strong>7)<\/strong> Once the value is fetched, it will pass this data to the calling function (like fnSetValueInTextField) which will actually set the data in the application.<br \/>\n<span><br \/>\n<\/span><br \/>\nTo implement this code you have to follow the steps given below &#8211;<\/p>\n<p><strong>1) <\/strong>Add the function that will fetch the data from the excel sheet in your function library. If you would have observed, this function is not application specific. It just fetches the data from the excel sheet. And hence, it has got nothing to do with your application. So, you have to save this function in the <strong>Generic_FunctionLibrary<\/strong> folder. The code for the function is given below &#8211;<\/p>\n<pre class=\"brush: vb; title: ; notranslate\" title=\"\">\r\n'================================================================================\r\n'Function name - fnFetchDataFromExcelSheet\r\n'Description - This function retrieves the data from the excel sheet based upon the column name\r\n'================================================================================\r\nFunction fnFetchDataFromExcelSheet(strColumnName)\r\n\r\n\tDim sColValue\r\n\r\n\t'Initialize the return the value to &quot;empty&quot; string\r\n\tfnFetchDataFromExcelSheet = &quot;empty&quot;\r\n\r\n\t'Add a new blank sheet into the QTP data table\r\n\t'Excel data will be copied into this blank sheet\r\n\tDataTable.AddSheet(&quot;dtDataSheet&quot;)\r\n\r\n\t'Import the data from the excel sheet into the QTP data table\r\n\tDataTable.ImportSheet sExcelWorkbookPath, sSheetName, &quot;dtDataSheet&quot;\r\n\r\n\t'Find the value from the data table\r\n\tsColValue = DataTable.Value(strColumnName, &quot;dtDataSheet&quot;)\r\n\r\n\t'Return the value back to the calling function\r\n\tfnFetchDataFromExcelSheet = sColValue\r\n\r\n\t'Remove Reference\r\n\tDataTable.DeleteSheet(&quot;dtDataSheet&quot;)\r\n\r\nEnd Function\r\n'================================== End Function ==================================\r\n<\/pre>\n<p><em> <\/em><br \/>\n<strong>2) <\/strong>This function uses 2 variables. <strong>sExcelWorkbookPath<\/strong> and <strong>sSheetName<\/strong>. These variables have to be defined somewhere. To do that, add the following code at the beginning generic function library (the same function library where you added the above function).<\/p>\n<pre class=\"brush: vb; title: ; notranslate\" title=\"\">\r\nDim sExcelWorkbookPath, sSheetName\r\nsExcelWorkbookPath = &quot;C:\\QTP-Hybrid-Framework\\DataSheet\\TestData.xls&quot;\r\n<\/pre>\n<p><em> <\/em><br \/>\n<strong>3) <\/strong>For the above function to work, the test case name should be passed to the function. The code to retrieve the test case name should be added in the main test case. And after adding the code to the main test case, the modified test case will look like this &#8211;<\/p>\n<pre class=\"brush: vb; title: ; notranslate\" title=\"\">\r\n'Get the test case name into a variable\r\nsSheetName = Environment.Value(&quot;TestName&quot;)\r\n\r\nfnLogin()\r\nfnCreateOrder()\r\nfnCloseApplication()\r\n<\/pre>\n<p><em> <\/em><br \/>\n<strong>4) <\/strong>Now, your function to fetch the data has been implemented. So, the next step would be to add this function call in those functions that actually enter the data in the application. As an example, we have shown how function <strong>fnSetValueInTextField()<\/strong> will look like after you have added the code to it.<\/p>\n<pre class=\"brush: vb; title: ; notranslate\" title=\"\">\r\n'================================\r\n'Function name - fnSetValue\r\n'Description - Set value in a text field\r\n'================================\r\nFunction fnSetValue(objControl, strColumnName)\r\n\r\nOn Error Resume Next\r\nDim sReqdValue\r\n\r\n'Get vale from Excel Sheet\r\nsReqdValue = fnFetchValueFromExcelSheet(strColumnName)\r\n\r\n'Perform Action\r\nIf sReqdValue &lt;&gt; &quot;empty&quot; Then\r\nobjControl.Set sReqdValue\r\nElse\r\nReporter.ReportEvent micFail, &quot;Column - '&quot; &amp; strColumnName &amp; &quot;' Not Found in Data Sheet&quot;, &quot;Failed&quot;\r\nEnd If\r\n\r\n'Report out the result\r\nIf Err.Number = 0 Then\r\nReporter.ReportEvent micPass, &quot;Value - '&quot; &amp; sReqdValue &amp; &quot;' entered in Field - '&quot; &amp; objControl.ToString() &amp; &quot;'&quot;, &quot;Passed&quot;\r\nEnd If\r\n\r\nEnd Function\r\n'================================\r\n<\/pre>\n<p><em> <\/em><br \/>\n<strong>5)<\/strong> The function call for fetching the data from excel sheets has to be added in all the function that set value in the application. In the framework that we have created till now, there are couple of functions more that perform the set operation on the application. These functions are &#8211; <strong>fnTypeValueInActiveXField()<\/strong> and <strong>fnSelectDropDownValue()<\/strong>. So, you would have to modify these 2 functions in the same way you did for fnSetValueInTextField().<\/p>\n<p><em> <\/em><br \/>\n<strong>6)<\/strong> Once you have modified all the functions, run the test case once again to verify that it works fine. Try changing the data in the excel sheet and see that the function enters the changed data in the application when you execute the test case.<br \/>\n<span><br \/>\n<\/span><br \/>\n<span style=\"text-decoration: underline;\"><strong>Important Note:<\/strong><\/span> Till now, we have covered how you can implement excel data sheets in your hybrid framework. And to keep things simple, we have taken the simplest structure of excel data sheets &#8211; one excel workbook with multiple sheets. But in most of the hybrid frameworks that you will work on, the number of test cases will be quite big (say minimum 50 test cases). And in such a scenario, it is not advisable that you follow the data sheet structure that we have illustrated in this framework.<\/p>\n<p><em> <\/em><br \/>\nThe best option would be to go through the <a title=\"QTP Framework Tutorials \u2013 Framework Types, Examples &amp; Sample Code\" href=\"http:\/\/www.automationrepository.com\/2012\/03\/qtp-framework-types-an-introduction\/\" target=\"_blank\">data driven and keyword driven framework tutorials<\/a>. From there, you would need to select the format of data sheet that best suites your application and your requirement. The approach on how you fetch the data will remain the same (from excel sheet to QTP data table to application), but the actual code would change a bit.<\/p>\n<p><span><br \/>\n<\/span><\/p>\n<h3>Adding batch execution features to your framework<\/h3>\n<p>Batch execution is a very important feature and is a part of most of the good hybrid frameworks. In fact, if you have an automated test suite with a large number of test cases (be it any type of framework), having an efficient batch execution mechanism becomes a must. Before diving deeper into the details about how you can implement batch execution, let us first start with the basics and see what batch execution actually is.<br \/>\n<span><br \/>\n<\/span><br \/>\n<span style=\"text-decoration: underline;\"><strong>What is batch execution?<\/strong><\/span> Normally when you want to run a test script, you use the &#8220;Run&#8221; option provided by QTP. What it does is that, it will run the test script that is currently open in QTP. This &#8220;Run&#8221; option can execute only 1 test case at a time.<\/p>\n<p><em> <\/em><br \/>\nBut what if you want to run a large number of test cases? Well, one option is that you open each test case one by one and click the Run option for all these test cases. This option can be tried if you have very few test cases with you. But if you have a large number of test cases, then this method is not at all a good option.<\/p>\n<p><em> <\/em><br \/>\nWhile dealing with a large number of test cases, you need a mechanism that can run your test cases effectively with minimum effort. And this is exactly what batch execution does for you. <strong>Batch execution is a mechanism that allows you to execute multiple number of test cases (a batch or set of test case) in one go.<\/strong> That is, with one click of a button, you can execute multiple test cases. And this is the reason why batch execution is sometimes referred to as one-click execution.<\/p>\n<p><span><br \/>\n<\/span><\/p>\n<h3>Different ways to achieve batch execution with QTP<\/h3>\n<p>One good thing about QTP is that it provides multiple ways for you to implement the batch execution features in your framework. Depending upon how complex your framework is or whether you use HP Quality Center to maintain your automation framework, you can use any of the batch execution implementations that suites your requirements.<br \/>\n<span><br \/>\n<\/span><br \/>\nFurthermore, in all the batch execution methods that QTP supports, the basic premise (or approach) remains the same &#8211;<\/p>\n<p><strong>a)<\/strong> You have to somehow create a list of test cases. This test case list is called the batch or the test set.<\/p>\n<p><strong>b)<\/strong> From this list of test cases, you should be able to select the test cases that you want to execute. This selection can either be all the test cases or a subset of the test cases.<\/p>\n<p><strong>c)<\/strong> There should be some execute button which, if you click, will run all the test cases that you have selected from the list.<br \/>\n<span><br \/>\n<\/span><br \/>\nBelow, we have listed down the different batch execution methods supported by QTP together with a brief description about each one of them.<br \/>\n<span><br \/>\n<\/span><br \/>\n<strong>1) Using QTP&#8217;s Test Batch Runner tool:<\/strong> This is a feature\/tool provided by QTP and can be found at Start &gt;&gt; All Programs &gt;&gt; HP Quick Test Professional &gt;&gt; Tools menu. Here you can add all the test cases to the batch and then click on the run button to execute the batch.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" alt=\"QTP Test Batch Runner Tool\" src=\"https:\/\/www.automationrepository.com\/wordpress\/wp-content\/uploads\/ar\/qtp-test-batch-runner.png\" width=\"537\" height=\"302\" \/><br \/>\n<span><br \/>\n<\/span><br \/>\n<strong>2) Using QC&#8217;s test set feature:<\/strong> If you are using Quality Center to store your hybrid framework, then you can create a test set in QC&#8217;s test lab. QC provides a run button, which when clicked will execute all the test cases added to that particular test set. This method of batch execution is also very helpful when you use QTP&#8217;s BPT framework.<br \/>\n<span><br \/>\n<\/span><br \/>\n<strong> 3) Using QTP&#8217;s AOM capabilities:<\/strong> This is the most important method using which you can implement batch execution in your QTP framework. QTP AOM, also known as automation object model, is a feature using which QTP exposes its capabilities to the &#8220;outside world&#8221; in the form of properties and functions. Here, &#8220;outside world&#8221; refers to different programming\/scripting languages like C#, VBA, VBScript etc.<br \/>\n<span><br \/>\n<\/span><br \/>\nFor example, in QTP you have different menu options or shortcuts for doing different tasks, such as opening a test case, running a test case, associating function libraries etc. And normally you would use QTP&#8217;s GUI to perform all these actions. But what AOM will do is that it will provide you with different functions that can perform all these tasks programatically. For example, AOM provides a function called &#8220;Run&#8221; that you can use to execute a given test case. So you can write a program or code that will use this Run function to execute a test case in QTP.<br \/>\n<span><br \/>\n<\/span><br \/>\nAnother good part about AOM is that it can be used with a variety of programming languages. If you are using excel sheets, then you can use AOM in VBA. If you wish to create your own little web portal to drive QTP, you can use C# with AOM.<br \/>\n<span><br \/>\n<\/span><br \/>\n<strong>As part of this hybrid framework, we will be using the QTP AOM method to implement batch execution. <\/strong>The list of test cases to be executed will be maintained in an excel sheet and we will use excel macro (with VBScript + AOM) to execute the test cases in QTP.<\/p>\n<p><span><br \/>\n<\/span><\/p>\n<h3>Preparing the batch excel sheet<\/h3>\n<p>Implementing the batch execution in QTP using AOM is a two-step process. The <strong>first step<\/strong> is to create the list of test cases and the <strong>second step<\/strong> is to write code that will execute these test cases. In this section, we will focus on the first part, that is, creating the list of test cases in excel sheet. Follow the steps given below to create this test case list &#8211;<br \/>\n<span><br \/>\n<\/span><br \/>\n<strong>1)<\/strong> Open a new excel workbook.<br \/>\n<span><br \/>\n<\/span><br \/>\n<strong>2)<\/strong> Make sure that the developed tab is visible in the workbook.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" alt=\"Developer Tab in MS Excel\" src=\"https:\/\/www.automationrepository.com\/wordpress\/wp-content\/uploads\/ar\/microsoft-excel-developer-tab.png\" width=\"680\" height=\"119\" \/><\/p>\n<p><em> <\/em><br \/>\nIf the developer tab is not visible, then follow the below steps to enable the developer tab. The screenshots given below are from Microsoft Excel 2010. Based upon your version of MS Excel, you would need to figure out the steps accordingly.<\/p>\n<p><strong>2.1)<\/strong> Select File &gt;&gt; Options.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" alt=\"Enable Developer Tab in MS Excel\" src=\"https:\/\/www.automationrepository.com\/wordpress\/wp-content\/uploads\/ar\/developer-tab-file-options.png\" width=\"135\" height=\"454\" \/><\/p>\n<p><strong>2.2)<\/strong> Click on Customize Ribbon from the left hand side pane.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" alt=\"Enable Developer Tab in MS Excel\" src=\"https:\/\/www.automationrepository.com\/wordpress\/wp-content\/uploads\/ar\/developer-tab-customize-ribbon.png\" width=\"339\" height=\"251\" \/><\/p>\n<p><strong>2.3)<\/strong> Select the Developer check box from the right-most pane.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" alt=\"Enable Developer Tab in MS Excel\" src=\"https:\/\/www.automationrepository.com\/wordpress\/wp-content\/uploads\/ar\/developer-tab-developer-option.png\" width=\"245\" height=\"287\" \/><\/p>\n<p><strong>2.4)<\/strong> Click OK. Developer tab should now be available in your excel sheet.<br \/>\n<span><br \/>\n<\/span><br \/>\n<strong>3)<\/strong> In the excel sheet, leave the first row blank. We will add the Execute button in the first row.<br \/>\n<span><br \/>\n<\/span><br \/>\n<strong>4)<\/strong> Starting with the second row, set the column headers and data as shown in the below image.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" alt=\"QTP Hybrid Framework - Batch excel sheet structure\" src=\"https:\/\/www.automationrepository.com\/wordpress\/wp-content\/uploads\/ar\/batch-excel-sheet-without-execute-button.png\" width=\"458\" height=\"195\" \/><br \/>\n<span><br \/>\n<\/span><br \/>\n<strong>5)<\/strong> Since you currently have only 1 test case in your framework, set Execute as &#8216;Yes&#8217; for the first test case. For second and third test cases, set the value as &#8216;No&#8217;.<br \/>\n<span><br \/>\n<\/span><br \/>\n<strong>6)<\/strong> Save this file as &#8216;Batch.xls&#8217; in the Batch folder.<br \/>\n<span><br \/>\n<\/span><br \/>\n<strong>7)<\/strong> Select Developer tab.<br \/>\n<span><br \/>\n<\/span><br \/>\n<strong>8)<\/strong> Click on Insert option in Developer tab and then select the button icon under &#8216;Form Controls&#8217; section.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" alt=\"Insert button in batch excel sheet\" src=\"https:\/\/www.automationrepository.com\/wordpress\/wp-content\/uploads\/ar\/developer-tab-insert-option.png\" width=\"344\" height=\"225\" \/><br \/>\n<span><br \/>\n<\/span><br \/>\n<strong>9)<\/strong> Drag the mouse to create a button in the first column of the excel sheet.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" alt=\"Insert button in batch excel sheet - 2\" src=\"https:\/\/www.automationrepository.com\/wordpress\/wp-content\/uploads\/ar\/batch-excel-sheet-insert-button.png\" width=\"461\" height=\"179\" \/><br \/>\n<span><br \/>\n<\/span><br \/>\n<strong>10)<\/strong> In the dialog box that opens up, give a proper name to the macro and click on OK button.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" alt=\"QTP Hybrid Framework - Set macro name\" src=\"https:\/\/www.automationrepository.com\/wordpress\/wp-content\/uploads\/ar\/set-macro-name.png\" width=\"377\" height=\"361\" \/><br \/>\n<span><br \/>\n<\/span><br \/>\n<strong>11)<\/strong> The button would now be displayed in the first row. Right click on the button and change its text to &#8216;Execute&#8217;. Change other properties as required.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" alt=\"Edit the properties of Execute button\" src=\"https:\/\/www.automationrepository.com\/wordpress\/wp-content\/uploads\/ar\/execute-button-change-properties.png\" width=\"501\" height=\"241\" \/><br \/>\n<span><br \/>\n<\/span><br \/>\n<strong>12)<\/strong> Again right click on the button and select &#8216;Assign Macro&#8217; option.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" alt=\"Assign macro to execute button\" src=\"https:\/\/www.automationrepository.com\/wordpress\/wp-content\/uploads\/ar\/assign-macro-to-execute-button.png\" width=\"446\" height=\"243\" \/><br \/>\n<span><br \/>\n<\/span><br \/>\n<strong>13)<\/strong> Assign Macro dialog box should be displayed as shown below.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" alt=\"Assign new macro to execute button - QTP Hybrid Framework\" src=\"https:\/\/www.automationrepository.com\/wordpress\/wp-content\/uploads\/ar\/assign-new-macro-to-excel-button.png\" width=\"376\" height=\"361\" \/><br \/>\n<span><br \/>\n<\/span><br \/>\n<strong>14)<\/strong> Click on &#8216;New&#8217; button. Upon clicking the New button, a new window will be displayed as given below.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" alt=\"QTP Hybrid Framework - Empty macro function\" src=\"https:\/\/www.automationrepository.com\/wordpress\/wp-content\/uploads\/ar\/execute-macro-empty-function.png\" width=\"528\" height=\"236\" \/><br \/>\n<span><br \/>\n<\/span><br \/>\n<strong>15)<\/strong> Enter the following command inside the Sub function.<\/p>\n<pre class=\"brush: vb; title: ; notranslate\" title=\"\">\r\nShell &quot;WScript &quot; &amp; &quot;&quot;&quot;D:\\QTP-Hybrid-Framework\\Batch\\DriverScript.vbs&quot;&quot;&quot;\r\n<\/pre>\n<p><em> <\/em><br \/>\nThe code in the sub function should now look like this &#8211;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" alt=\"QTP Hybrid Framework - Excel macro with VBScript file call\" src=\"https:\/\/www.automationrepository.com\/wordpress\/wp-content\/uploads\/ar\/execute-macro-function-with-code.png\" width=\"646\" height=\"236\" \/><\/p>\n<p><em> <\/em><br \/>\nWhat this means is that when you click on the &#8216;Execute&#8217; button in the excel sheet, it will pass the control to this sub function. This sub function will in turn execute all the code that is there in <strong>DriverScript.vbs<\/strong> file. This DriverScript.vbs file would be the file where you will write the code to execute the test scripts. This coding part is described in the next section.<\/p>\n<p><span><br \/>\n<\/span><\/p>\n<h3>Adding the code for batch execution<\/h3>\n<p>When you use Microsoft Excel as your batch sheet, then you have two ways in which you can implement the coding part. These two ways are &#8211;<br \/>\n<span><br \/>\n<\/span><br \/>\n<strong>a.) Writing the code in the macro itself:<\/strong> With this method, you write the code in the excel macro itself. And this code will be written in VBA. Also, since the macro code is a part of MS Excel, you don&#8217;t need to create a separate file to write the code.<br \/>\n<span><br \/>\n<\/span><br \/>\n<strong>b.) Writing the code in VBS file:<\/strong> Here, you will create a separate .vbs file and write all the code in it. The excel macro will just be used to call this .vbs file. In this case, coding will be done using VBScript.<br \/>\n<span><br \/>\n<\/span><br \/>\nTowards the end of the last section (point #15), you would have seen that we have created a separate <strong>DriverScript.vbs<\/strong> file. Also in the macro function, we have included a single line of code that just calls this vbs file. What this means is that we are using method b.) to write the AOM code.<br \/>\n<span><br \/>\n<\/span><br \/>\n<span style=\"text-decoration: underline;\"><strong>Important Note:<\/strong><\/span> Even though we have used method b. (using .vbs file) to write the code, you are free to use any of the method that suites you. The only reason we used it this way is that using .vbs file allows us to work with VBScript. And since QTP uses VBScript, we feel more comfortable with VBScript rather than with VBA.<br \/>\n<span><br \/>\n<\/span><br \/>\n<strong>Steps to add the batch execution code:<\/strong> Follow the steps mentioned below to add the batch execution code to your framework.<br \/>\n<span><br \/>\n<\/span><br \/>\n<strong>1)<\/strong> Open a new text file using notepad or any other text editor of your choice<br \/>\n<span><br \/>\n<\/span><br \/>\n<strong>2)<\/strong> Add the following code in this text file. The explanation about the code is added with the code itself in the form of comments<\/p>\n<pre class=\"brush: vb; title: ; notranslate\" title=\"\">\r\n'========== Declare and initialize the variables ==========\r\nDim sTestCaseFolder, strScriptPath, sQTPResultsPath, sQTPResultsPathOrig\r\n\r\nsBatchSheetPath = &quot;D:\\QTP-Hybrid-Framework\\Batch\\Batch.xls&quot;\r\nsTestCaseFolder = &quot;D:\\QTP-Hybrid-Framework\\TestCases\\&quot;\r\nsQTPResultsPathOrig = &quot;D:\\QTP-Hybrid-Framework\\Results\\DetailedQTPResults\\&quot;\r\n\r\n'========== Create an object to access QTP's objects, methods and properties ==========\r\nSet qtpApp = CreateObject(&quot;QuickTest.Application&quot;)\r\n\r\n'Open QTP if it is already not open\r\nIf qtpApp.launched &lt;&gt; True Then\r\n qtpApp.Launch\r\nEnd If\r\n\r\nqtpApp.Visible = True\r\n\r\n'========== Set the run options for QTP ==========\r\nqtpApp.Options.Run.ImageCaptureForTestResults = &quot;OnError&quot;\r\nqtpApp.Options.Run.RunMode = &quot;Fast&quot;\r\n\r\n'Set ViewResults property to false. This is because if you run many test cases in batch, you would not want QTP to open a separate result window for each of them\r\nqtpApp.Options.Run.ViewResults = False\r\n\r\n' ========== Read test cases from batch excel sheet ==========\r\nSet xl_Batch = CreateObject(&quot;Excel.Application&quot;)\r\nSet wb_Batch = xl_Batch.WorkBooks.Open(sBatchSheetPath)\r\n\r\n'Loop through all the Rows\r\n'1st row contains Execute button, 2nd row is header and the test case list starts from 3rd row. So, For loop is started from 3rd row\r\nFor iR = 3 to 1000\r\n\r\n 'Get the value from the Execute column\r\n If xl_Batch.Cells(iR, 1).Value = &quot;Yes&quot; Then\r\n\r\n 'Get Test Case Name\r\n sTestCaseName = xl_Batch.Cells(iR, 2).Value\r\n\r\n 'Get the location where the test case is stored\r\n strScriptPath = sTestCaseFolder &amp; sTestCaseName\r\n\r\n 'Open the Test Case in Read-Only mode\r\n qtpApp.Open strScriptPath, True\r\n WScript.Sleep 2000\r\n\r\n 'Create an object of type QTP Test\r\n Set qtpTest = qtpApp.Test\r\n\r\n 'Instruct QTP to perform next step when error occurs\r\n qtpTest.Settings.Run.OnError = &quot;NextStep&quot;\r\n\r\n 'Create the Run Results Options object\r\n Set qtpResult = CreateObject(&quot;QuickTest.RunResultsOptions&quot;)\r\n\r\n 'Set the results location. This result refers to the QTP result\r\n sQTPResultsPath = sQTPResultsPathOrig\r\n sQTPResultsPath = sQTPResultsPath &amp; sTestCaseName\r\n qtpResult.ResultsLocation = sQTPResultsPath\r\n\r\n 'Run the test. The result will automatically be stored in the location set by you\r\n WScript.Sleep 2000\r\n qtpTest.Run qtpResult\r\n\r\n ElseIf xl_Batch.Cells(iR, 1).Value = &quot;No&quot; Then\r\n 'Do nothing. You don't have to execute the test cases marked as No\r\n\r\n ElseIf xl_Batch.Cells(iR, 1).Value = &quot;&quot; Then\r\n 'Blank value means that the list of test cases has finished\r\n 'So you can exit the for loop\r\n Exit For\r\n\r\n End If\r\n\r\nNext\r\n<\/pre>\n<p><span><br \/>\n<\/span><br \/>\n<strong>3)<\/strong> Save this text file as <strong>DriverScript.vbs<\/strong>. Make sure that the file is saved with .vbs extension only and not as DriverScript.vbs.txt. Also make sure that the path mentioned in the excel macro function (point #15 in the previous section) is the same place where you save this vbs file.<br \/>\n<span><br \/>\n<\/span><br \/>\n<strong>4)<\/strong> Open the batch excel sheet. Make sure that the first test case is selected as &#8216;Yes&#8217;. And the remaining two test cases are marked as &#8216;No&#8217;. Also, go to Developer tab and check that the &#8216;Design Mode&#8217; option is unselected.<br \/>\n<span><br \/>\n<\/span><br \/>\n<strong>5)<\/strong> Now, its time to verify if batch execution feature has been properly implemented or not. To do this, click on the Execute button. If everything is working fine, the driver script will load the first test case in QTP and will execute the test case.<br \/>\n<span><br \/>\n<\/span><br \/>\nNow, you will have a hybrid framework that can execute a single test case in batch mode. Also, your hybrid framework has the features of modular and data driven frameworks implemented in it. <strong>So, at this stage, you can say that you have set up a hybrid framework with most of the important features in it. :&#8211;)<\/strong><\/p>\n<p><span><br \/>\n<\/span><\/p>\n<h3>Final article on QTP Hybrid Framework<\/h3>\n<p>The next article would be the final one on QTP hybrid framework series. That article would cover the remaining topics about implementing the reporting and auto-email features. Moreover, we will publish the entire framework code (with all the 3 test cases) in the next article.<br \/>\n<span><br \/>\n<\/span><br \/>\nTill then, if you have any comments about this article, you can let us know about it using the comments section.<\/p>\n<p><span><br \/>\n<\/span><\/p>\n<div style=\"font-family: Verdana,sans-serif; border: 1px solid #C8B560; padding: 3mm; background: #FFF8C6; text-align: center;\">\n<p><strong>If you enjoyed this article, you can join our blog to get new articles delivered directly in your inbox.<\/strong><\/p>\n<form style=\"text-align: center;\" action=\"http:\/\/feedburner.google.com\/fb\/a\/mailverify\" method=\"post\" target=\"popupwindow\" onsubmit=\"window.open('http:\/\/feedburner.google.com\/fb\/a\/mailverify?uri=automationrepository\/feeds', 'popupwindow', 'scrollbars=yes,width=550,height=520');return true\"><input style=\"width: 160px; height: 20px;\" type=\"text\" value=\"Enter Your Email Address\" onfocus=\"if (this.value == 'Enter Your Email Address') {this.value = '';}\" onblur=\"if (this.value == '') {this.value = 'Enter Your Email Address';}\" \/> <input type=\"hidden\" name=\"uri\" value=\"automationrepository\/feeds\" \/> <input type=\"hidden\" name=\"loc\" value=\"en_US\" \/> <input type=\"submit\" value=\"Join Us\" \/><\/p>\n<p style=\"text-align: justify;\">\n<\/form>\n<\/div>\n<p style=\"border: 1px solid #C38EC7; padding: 3mm; background: #EBDDE2;\"><strong>Visit <a title=\"QTP Frameworks \u2013 An Introduction\" href=\"http:\/\/www.automationrepository.com\/2012\/03\/qtp-framework-types-an-introduction\/\">QTP Frameworks<\/a> Main Page for more articles on QTP Frameworks<\/strong>. You can also visit our <a title=\"QTP Tutorials\" href=\"http:\/\/www.automationrepository.com\/tutorials-for-qtp-beginners\/\" target=\"_blank\">QTP Tutorials<\/a> page for detailed QTP Tutorials.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the previous article on Hybrid Framework in QTP, we started writing the code to create the Hybrid Framework. We created one test script (in linear fashion) and then implemented the features of QTP modular framework into it. In this article, we will take up the same framework and extend it further<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,97],"tags":[102],"class_list":["post-2106","post","type-post","status-publish","format-standard","hentry","category-advanced-concepts","category-qtp-framework","tag-qtp-hybrid-framework"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Designing Hybrid Framework in QTP - Part 3 - XX<\/title>\n<meta name=\"description\" content=\"This article on Hybrid Framework in QTP covers the ways in which you can implement excel data sheets and batch execution in your hybrid framework\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.automationrepository.com\/wordpress\/2013\/08\/designing-hybrid-framework-in-qtp-part-3\/\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Anish Pillai\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"20 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.automationrepository.com\/wordpress\/2013\/08\/designing-hybrid-framework-in-qtp-part-3\/\",\"url\":\"https:\/\/www.automationrepository.com\/wordpress\/2013\/08\/designing-hybrid-framework-in-qtp-part-3\/\",\"name\":\"Designing Hybrid Framework in QTP - Part 3 - XX\",\"isPartOf\":{\"@id\":\"https:\/\/www.automationrepository.com\/wordpress\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.automationrepository.com\/wordpress\/2013\/08\/designing-hybrid-framework-in-qtp-part-3\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.automationrepository.com\/wordpress\/2013\/08\/designing-hybrid-framework-in-qtp-part-3\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.automationrepository.com\/wordpress\/wp-content\/uploads\/ar\/hybrid-framework-enter-test-data-in-application.png\",\"datePublished\":\"2013-08-07T16:43:58+00:00\",\"dateModified\":\"2013-08-07T16:45:46+00:00\",\"author\":{\"@id\":\"https:\/\/www.automationrepository.com\/wordpress\/#\/schema\/person\/7a35710e1ce89e5fb481be88fcd6cd20\"},\"description\":\"This article on Hybrid Framework in QTP covers the ways in which you can implement excel data sheets and batch execution in your hybrid framework\",\"breadcrumb\":{\"@id\":\"https:\/\/www.automationrepository.com\/wordpress\/2013\/08\/designing-hybrid-framework-in-qtp-part-3\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.automationrepository.com\/wordpress\/2013\/08\/designing-hybrid-framework-in-qtp-part-3\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.automationrepository.com\/wordpress\/2013\/08\/designing-hybrid-framework-in-qtp-part-3\/#primaryimage\",\"url\":\"https:\/\/www.automationrepository.com\/wordpress\/wp-content\/uploads\/ar\/hybrid-framework-enter-test-data-in-application.png\",\"contentUrl\":\"https:\/\/www.automationrepository.com\/wordpress\/wp-content\/uploads\/ar\/hybrid-framework-enter-test-data-in-application.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.automationrepository.com\/wordpress\/2013\/08\/designing-hybrid-framework-in-qtp-part-3\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.automationrepository.com\/wordpress\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Designing Hybrid Framework in QTP &#8211; Part 3\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.automationrepository.com\/wordpress\/#website\",\"url\":\"https:\/\/www.automationrepository.com\/wordpress\/\",\"name\":\"XX\",\"description\":\"\\r\\nasas\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.automationrepository.com\/wordpress\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.automationrepository.com\/wordpress\/#\/schema\/person\/7a35710e1ce89e5fb481be88fcd6cd20\",\"name\":\"Anish Pillai\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.automationrepository.com\/wordpress\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/8aa984de2295c3c4078fa48f6ba5d91e7c849b1a27a11dca24c6f11dd673ba14?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/8aa984de2295c3c4078fa48f6ba5d91e7c849b1a27a11dca24c6f11dd673ba14?s=96&d=mm&r=g\",\"caption\":\"Anish Pillai\"},\"description\":\"Find more about Anish Pillai on Google+\",\"sameAs\":[\"http:\/\/www.automationrepository.com\"],\"url\":\"https:\/\/www.automationrepository.com\/wordpress\/author\/anish\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Designing Hybrid Framework in QTP - Part 3 - XX","description":"This article on Hybrid Framework in QTP covers the ways in which you can implement excel data sheets and batch execution in your hybrid framework","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.automationrepository.com\/wordpress\/2013\/08\/designing-hybrid-framework-in-qtp-part-3\/","twitter_misc":{"Written by":"Anish Pillai","Est. reading time":"20 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.automationrepository.com\/wordpress\/2013\/08\/designing-hybrid-framework-in-qtp-part-3\/","url":"https:\/\/www.automationrepository.com\/wordpress\/2013\/08\/designing-hybrid-framework-in-qtp-part-3\/","name":"Designing Hybrid Framework in QTP - Part 3 - XX","isPartOf":{"@id":"https:\/\/www.automationrepository.com\/wordpress\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.automationrepository.com\/wordpress\/2013\/08\/designing-hybrid-framework-in-qtp-part-3\/#primaryimage"},"image":{"@id":"https:\/\/www.automationrepository.com\/wordpress\/2013\/08\/designing-hybrid-framework-in-qtp-part-3\/#primaryimage"},"thumbnailUrl":"https:\/\/www.automationrepository.com\/wordpress\/wp-content\/uploads\/ar\/hybrid-framework-enter-test-data-in-application.png","datePublished":"2013-08-07T16:43:58+00:00","dateModified":"2013-08-07T16:45:46+00:00","author":{"@id":"https:\/\/www.automationrepository.com\/wordpress\/#\/schema\/person\/7a35710e1ce89e5fb481be88fcd6cd20"},"description":"This article on Hybrid Framework in QTP covers the ways in which you can implement excel data sheets and batch execution in your hybrid framework","breadcrumb":{"@id":"https:\/\/www.automationrepository.com\/wordpress\/2013\/08\/designing-hybrid-framework-in-qtp-part-3\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.automationrepository.com\/wordpress\/2013\/08\/designing-hybrid-framework-in-qtp-part-3\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.automationrepository.com\/wordpress\/2013\/08\/designing-hybrid-framework-in-qtp-part-3\/#primaryimage","url":"https:\/\/www.automationrepository.com\/wordpress\/wp-content\/uploads\/ar\/hybrid-framework-enter-test-data-in-application.png","contentUrl":"https:\/\/www.automationrepository.com\/wordpress\/wp-content\/uploads\/ar\/hybrid-framework-enter-test-data-in-application.png"},{"@type":"BreadcrumbList","@id":"https:\/\/www.automationrepository.com\/wordpress\/2013\/08\/designing-hybrid-framework-in-qtp-part-3\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.automationrepository.com\/wordpress\/"},{"@type":"ListItem","position":2,"name":"Designing Hybrid Framework in QTP &#8211; Part 3"}]},{"@type":"WebSite","@id":"https:\/\/www.automationrepository.com\/wordpress\/#website","url":"https:\/\/www.automationrepository.com\/wordpress\/","name":"XX","description":"\r\nasas","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.automationrepository.com\/wordpress\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.automationrepository.com\/wordpress\/#\/schema\/person\/7a35710e1ce89e5fb481be88fcd6cd20","name":"Anish Pillai","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.automationrepository.com\/wordpress\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/8aa984de2295c3c4078fa48f6ba5d91e7c849b1a27a11dca24c6f11dd673ba14?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/8aa984de2295c3c4078fa48f6ba5d91e7c849b1a27a11dca24c6f11dd673ba14?s=96&d=mm&r=g","caption":"Anish Pillai"},"description":"Find more about Anish Pillai on Google+","sameAs":["http:\/\/www.automationrepository.com"],"url":"https:\/\/www.automationrepository.com\/wordpress\/author\/anish\/"}]}},"_links":{"self":[{"href":"https:\/\/www.automationrepository.com\/wordpress\/wp-json\/wp\/v2\/posts\/2106","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.automationrepository.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.automationrepository.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.automationrepository.com\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.automationrepository.com\/wordpress\/wp-json\/wp\/v2\/comments?post=2106"}],"version-history":[{"count":18,"href":"https:\/\/www.automationrepository.com\/wordpress\/wp-json\/wp\/v2\/posts\/2106\/revisions"}],"predecessor-version":[{"id":2222,"href":"https:\/\/www.automationrepository.com\/wordpress\/wp-json\/wp\/v2\/posts\/2106\/revisions\/2222"}],"wp:attachment":[{"href":"https:\/\/www.automationrepository.com\/wordpress\/wp-json\/wp\/v2\/media?parent=2106"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.automationrepository.com\/wordpress\/wp-json\/wp\/v2\/categories?post=2106"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.automationrepository.com\/wordpress\/wp-json\/wp\/v2\/tags?post=2106"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}