Saturday, December 17, 2011

Descriptive Programming

Descriptive Programming

Entering / Providing objects information directly into the test script is called Descriptive Programming.

In this method of script creation, we no need to have Object Repositories.

Advantages:

a) Descriptive Programming based Test scripts are faster in execution than Repository based Test scripts.

b) Scripts are portable (we can run these scripts from any machine easily)

c) Maintenance is easy (less amount of resources)

d) We can start Test Execution process even though Application is not ready.

Descriptive programming is basically 2 types.

1. Static Programming
2. Dynamic Programming

Static Programming

  In this style of script generation, we provide objects information directly into the script.

Example:
1) Invokeapplication "C:\Program Files\HP\QuickTest Professional\samples\flight\app\flight4a.exe"
2) dialog("text:=Login").Activate
3) dialog("text:=Login").Winedit("attached text:=Agent Name:").Set "gcreddy"
4) dialog("text:=Login").Winedit("attached text:=Password:").Set "mercury"
5) dialog("text:=Login").Winbutton("text:=OK","width:=60").Click


Note:
1. Dialog, WinEdit and WinButton – Test Objects
2. text, attached text - Property names
3. Login, Agent Name:, Password:, OK - Property values or Logical Names of the Object
4. Activate, Set, Setsecure, Click - Methods

Note2:
If we feel one property information is not sufficient for recognizing the object uniquely, then we can provide more properties information by separating with commas.

Note 3:
If we want to get objects information (Test objects, properties and values), we can use object spy feature. This feature is available in Tools Menu, in local repository and in repository manager.

Example 2:
SystemUtil.Run "C:\Program Files\Internet Explorer\IEXPLORE.EXE","","C:\Program Files\Internet Explorer","open"
Browser("title:=Google").Page("title:=Google").Sync
Browser("title:=Google").Navigate "http://www.icicibank.com/"


-------------------------------------------------------------------
If we want maintain 'Objects information' in centralized location then we can use Constants.

Steps:

Creating Constants:

Const Login="text:=Login", Agent="attached text:=Agent Name:"

Const Pwd ="attached text:=Password:", Ok="text:=OK"

Note: we can declare no of Constants in a line by separating with Camas (,), if we take other line then we have to use Const Statement again.

Creating a Library file

Place Constants in Notepad and save as .vbs file

Associate the Library file to QTP (File->Settings->Resources-> Click add (+) icon-> Browse path of the Library file->Click Apply and click Ok buttons

Otherwise, we can load the library file during run-time

Syntax:

ExecuteFile "Path of the Library file(.vbs)"

After that create the Test Script using Constants

Creating the Test Script using Constants:

Invokeapplication "C:\Program Files\HP\QuickTest Professional\samples\flight\app\flight4a.exe"
Dialog(Login).Activate
Dialog(Login).Winedit(Agent).Set "asdf"
Dialog(Login).Winedit(Pwd").Set "mercury"
Dialog(Login).Winbutton(Ok).Click

Advantages:

If we maintain Object Information in the centralized location, then we can handle modifications easily.


Web Examples:

Gmail Login Operation: (www.gmail.com)
----------------------------
SystemUtil.Run "C:\Program Files\Internet Explorer\IEXPLORE.EXE", "www.gmail.com"
Browser("title:=Gmail: Email from Google").Page("title:=Gmail: Email from Google").WebEdit("name:=Email").Set "gcrindia@gmail.com"
Browser("title:=Gmail: Email from Google").Page("title:=Gmail: Email from Google").WebEdit("name:=Passwd").Set "Kurugonda7"
Browser("title:=Gmail: Email from Google").Page("title:=Gmail: Email from Google").WebButton("value:=Sign in").Click

---------------------------
'Code optimization
--------------------
SystemUtil.Run "C:\Program Files\Internet Explorer\IEXPLORE.EXE", "www.gmail.com"
Set myPage=Browser("title:=Gmail: Email from Google").Page("title:=Gmail: Email from Google")
myPage.WebEdit("name:=Email").Set "gcrindia@gmail.com"
myPage.WebEdit("name:=Passwd").Set "abcd1234"
myPage.WebButton("value:=Sign in").Click

Shopping Portal Registration Operation: (http://www.dealsdirect.com.au/)

SystemUtil.Run "C:\Program Files\Internet Explorer\IEXPLORE.EXE", "http://www.dealsdirect.com.au/"
Browser("title:=.*").Page("url:=http://www.dealsdirect.com.au").Link("text:=Register").Click
Browser("title:=.*").Page("title:=DealsDirect.com.au Secure Login Page").WebEdit("name:=cEmail2").Set "bhavani123@gmail.com"
Browser("title:=.*").Page("title:=DealsDirect.com.au Secure Login Page").WebEdit("name:=cEmail3").Set "bhavani123@gmail.com"
Browser("title:=.*").Page("title:=DealsDirect.com.au Secure Login Page").WebEdit("name:=cPass2").Set "abcd123"
Browser("title:=.*").Page("title:=DealsDirect.com.au Secure Login Page").Image("name:=Image","file name:=image-register-and-continue-button.jpg").Click

-------------------------------------------------------------------

Dynamic Programming

Creating Description Objects, Generating Statements using Description Objects is called Dynamic descriptive Programming

-------------------------------------------

Step1: Create Description Object

Syntax:

Set Variable = Description.Create

Example:

Set Login = Description.Create

----------------------------------

Step2: Enter Properties information into Description Object

Syntax:

Description Object("Property name").Value = "Property value"

Example

Login("text").Value = "Login"

Login("width").Value = 320

----------------------------------------------------------------
Step3: Generating Statements using Description Objects

Syntax:

Test Object(Description Object).Method / Operation

Example:

Dialog(Login).Activate
---------------------------------------------------------------------------------
In this style of script generation, first we create description objects, provide properties information and use description objects in the test script.

Creating Properties Collection Objects

Set oLogin=description.Create
Set oAgent=description.Create
Set oPassword=description.Create
Set oOk=description.Create

Entering Properties Information into Objects

oLogin("text").value="Login"
oLogin("width").value=320
oLogin("height").value=204
oAgent("attached text").value="Agent Name:"
oPassword("attached text").value="Password:"
oOk("text").value="OK"

Generating Tests using Properties collection Objects

Invokeapplication "C:\Program Files\HP\QuickTest Professional\samples\flight\app\flight4a.exe"

Dialog(oLogin).Activate
Dialog(oLogin).Winedit(oAgent).Set "gcreddy"
Dialog(oLogin).Winedit(oPassword).Set "mercury"
Dialog(oLogin).Winbutton(oOK).Click

Note1: Create Description objects and put into one library file, by associating that library file, we can generate tests.

Note2: Dynamic programming is some difficult in preparation than static programming but maintenance is very easy.

------------------------------------------------------
Examples:

Handling similar/Duplicate Objects using Index Property

SystemUtil.Run "C:\Program Files\Internet Explorer\IEXPLORE.EXE"

Browser("name:=Google").Page("title:=Google").Sync

Browser("name:=Google").Navigate http://www.jjperfumes.com/

Browser("name:=JJ Perfumes-Discount perfume cheap brand name perfumes, fragrance & cologne online").page("title:=JJ Perfumes-Discount perfume cheap brand name perfumes, fragrance & cologne online").Link("innertext:=Register","index:=0").Click

Saturday, November 19, 2011

Developing an Agile Top Management Team



Dear B.V.Hemanthkumar,

Jaap de Jonge has entered a comment on Strategic Agility with the following subject: Developing an Agile Top Management Team.

To read this comment, Visit the Forum of the Strategic Agility webpage.

With best regards,

12manage - The Executive Fast Track

Home Page  |  Dictionary A-Z  |  My Personal Page  |  Newsletter Settings  |  Toolbar
Does the forum link not work?

Friday, November 11, 2011

Software Testing JOB NEWS

JOB NEWS ON 11th November


1) Company     :      Wissen Infotech Pvt. Ltd.
    Experience:          3 - 6 Years
    Education   :       UG - B.Sc /B.Tech/B.E/BCA, PG - M.Sc /MCA
    Skills           :     Manual & Automation (QTP)
    Location     :      Banglore
    Email          :   careers@wisseninfotech.com



2) Company        :        Hov Services Limited
    Experience     :        2- 4 Years
    Education      :        UG - B.Sc /B.Tech/B.E/BCA, PG - M.Sc /MCA
    Skills              :         Manual &Automation(QTP)
    Location        :         Chennai
    Email             :       srivathsan@hovservices.in



3) Company       :         ADP Pvt. Ltd.
    Experience    :          2 - 5 Years
    Location        :         Hyderabad / Secunderabad
    Education      :        UG - B.Tech/B.E, PG - M.Sc /MCA/MTech
    Skills              :         Automation (QTP) strong on VB Script & SQL Server
    Email             :        indiahr@adp.com

4) Company       :       Tata Consultancy Services (TCS)
   Experience     :        3 - 7 Years
   Location         :       Chennai
   Education      :        UG - B.Sc /B.Tech/B.E/BCA, PG - M.Sc /MCA
   Skills              :        Automation(QTP) knowledge
   Email             :        naveen11.g@tcs.com

5) Company         :      Matrix
   Experience      :       3 - 5 Years
   Location          :      Banglore,Pune
   Education        :      UG - B.Sc /B.Tech/B.E/BCA, PG - M.Sc /MCA
   Skills               :       Manual & Automation(QTP)
   Email                :      career@matrixzeroonesystems.com



6) Company        :       Ad Astra Consultants
    Experience     :       2 - 5 Years
    Location         :       Bengaluru/Bangalore
    Education       :      UG - B.Sc /B.Tech/B.E/BCA, PG - M.Sc /MCA
    Skills               :      Manual & Automation(QTP)
    Email              :     sreedas.nair@adastraconsultants.com


7) Company           :   The Glove Consultants
   Experience         :    3 – 8 Years
   Location            :      Bengaluru/Bangalore, Hyderabad / Secunderabad
   Education          :    UG - B.Sc /B.Tech/B.E/BCA, PG - MCA
   Skills                  :     Manual & Automation (QTP) with Strong on VB Script
   Email                  :     itjobs@theglove.co.in


8) Company         :       Computer Generated Solutions India (P) Ltd.
   Experience       :       3- 8 Years
   Location           :       Banglore, Hyderabad / Secunderabad
   Education         :      UG - B.Sc /B.Tech/B.E/BCA, PG - MCA
   Skills                 :      QTP with Keyword Driven Framework& Expert on SQL
   Email                :       sbharthi@cgsincindia.com



9) Company           :     Skyeits India Pvt Ltd.
   Experience         :     3 - 5 Years
    Location            :    Chennai
    Education          :    UG - B.Sc /B.Tech/B.E/BCA, PG - M.Sc /MCA
    Skills                  :     Manual & Automation(QTP)
    Email                 :    careers@skyeits.com,jobs@skyeits.com



10) Company          :     GS Consultants
     Experience        :      2 - 4 Years
     Location            :      Banglore
     Education          :      UG - B.Sc /B.Tech/B.E/BCA, PG - M.Sc / M.Tech/MCA
     Skills                  :      Manual Testing
     Email                 :    roopa@gsconsulting.in


11) Company           :      Jyopa Connexions
      Experience        :       3 - 6 Years
      Location            :      Banglore
      Education          :      UG - B.Tech/B.E, PG - MCA
      Skills                  :      Manual Testing
      Email                 :     sharon@jyopa.com


12) Company          :       Colruyt IT Consultancy India Pvt. Ltd.
     Experience         :      2- 3 Years
     Location             :      Hyderabad / Secunderabad
     Education          :       UG - B.Sc /B.Tech/B.E/BCA, PG - M.Sc / M.Tech/MCA
     Skills                  :       Manual/Automation(QTP)
     Email                 :      mokshita.mehta@colruyt.in


13) Company          :       Luzdel Consultancy Services Private Limited
     Experience         :      3- 7 Years
     Location             :      Hyderabad / Secunderabad
     Education          :       UG - B.Sc /B.Tech/B.E/BCA, PG - M.Sc / M.Tech/MCA
     Skills                  :       Manual/Automation(QTP)
     Email                 :       zafar.sultan@luzdel.com



14) Company          :       Nexwave Talent Management Solutions (Pvt) Limited
     Experience         :      0 - 1  (Fresher) Years
     Location             :      Hyderabad / Secunderabad
     Education          :       UG - B.Tech/B.E, PG – MCA (2010 & 2011 passouts)
     Skills                  :       Manual/Automation (QTP)
     Email                 :     gnaneswar@nexwave.in,sai@nexwave.in




15) Company          :       Colruyt IT Consultancy India Pvt. Ltd.
     Experience         :      0 - 1  (Fresher) Years
     Location             :      Hyderabad / Secunderabad
     Education          :       UG - B.Sc /B.Tech/B.E/BCA, PG - M.Sc / MCA
     Skills                  :       Manual Testing
     Email                 :      mokshita.mehta@colruyt.in



16) Company          :       Polaris Software Lab Limited
     Experience         :      0 - 1  (Fresher) Years
     Location             :      Hyderabad / Secunderabad, Banglore,Chennai
     Education          :       UG - B.Sc /B.Tech/B.E/BCA, PG - M.Sc / MCA
     Skills                  :       Manual Testing
     Email                 :      www.polarisft.com

Saturday, September 10, 2011

Advanced Excel Scripting in QTP

Advanced Excel Scripting in QTP

Excel File / Work Book Operations
--------------------------------------------------
'Objects in Excel Object Model

a) Excel Application    - Excel Application Object

b) Excel Workbook / File     - Workbook Object

c) Excel Worksheet / sheet          - Worksheet Object

------------------------------------------------------
Note: Without creating Work Book Object and Work Sheet Object, we can perform all Excel Application Operations using Excel Application(Main) Object, but for user friendliness we use those objects.

'Creating Excel Application Object

Set Variable=CreateObject("Excel.Application")'Create Excel Application Object
Dim objExcel
Set objExcel=CreateObject("Excel.Application")

Important Operations on Excel files for Test Automation Using QuickTest Professional (QTP)

a) Create Excel Files

b)  Open Excel Files

c) Copy Excel Files

d) Delete Excel Files

e) Move Excel Files

f) Read Data

e) Read Data for Data driven Testing

f) Write Data

g) Write Test Result

h) Comparing data (One to one)

i) Comparing data (One to Many)

j) Comparing data (Many to one)

k) Comparing data (Many to Many Exact)

l) Comparing data (Many to Many Textual)

m) Searching for strings

Examples:
---------------------------------------------
1) 'Create Excel file /Work book
Dim objExcel
Set objExcel=CreateObject("Excel.Application")
objExcel.Visible=True 'To view the Operations
objExcel.Workbooks.Add 'Creatining Excel file / workbook
objExcel.ActiveWorkbook.SaveAs "C:\Documents and Settings\Administrator\Desktop\gcreddy.xls"

objExcel.Quit 'To Quit the Excel Application
Set objExcel=Nothing
------------------------------------------------------------
2) 'Check the existence of the File If exists then open the file and enter some data

'  If Not exists Create the Excel file /Work book and enter some data
Dim objExcel, objFso, FilePath
FilePath="C:\Documents and Settings\Administrator\Desktop\gcreddy.xls"
Set objFso=CreateObject("Scripting.FileSystemObject")
Set objExcel=CreateObject("Excel.Application")

If objFso.FileExists(FilePath) Then
        objExcel.Workbooks.Open (FilePath)
        objExcel.Worksheets("Sheet1").Cells(1,1)="VB Script"
        objExcel.ActiveWorkbook.Save
        Else
        objExcel.Workbooks.Add
        objExcel.ActiveSheet.Cells(2,2)="VB Script"
        objExcel.ActiveWorkbook.SaveAs (Filepath)
End If

objExcel.Quit 'To Quit the Excel Appliction
Set objExcel=Nothing
------------------------------------------------------

3) 'Fetch Test Data directly from an Excel file and perform Data driven testing for Login Operation

Dim objExcel, objWorkbook, objWorksheet
'Create Excel application Object that can be used to perform operations on Excel Appliction
Set objExcel=CreateObject("Excel.Application")
'Create WorkBook Object using Excel application Object that can be used to perform operations on Excel Work Books
Set objWorkbook=objExcel.Workbooks.Open ("C:\Documents and Settings\Administrator\Desktop\input.xls")
'Create Work sheet object Using Work Book Object, that can be used to perform operations on Excel Sheets
Set objWorksheet=objWorkbook.Worksheets("Sheet1")
Rows_Count=objWorksheet.usedrange.rows.count

For i= 2 to Rows_Count Step 1
SystemUtil.Run "C:\Program Files\HP\QuickTest Professional\samples\flight\app\flight4a.exe","","C:\Program Files\HP\QuickTest Professional\samples\flight\app\","open"
Dialog("Login").Activate
Dialog("Login").WinEdit("Agent Name:").Set objWorksheet.Cells(i,"A")
Dialog("Login").WinEdit("Password:").Set objWorksheet.Cells(i,"B")
Wait 1
Dialog("Login").WinButton("OK").Click
Window("Flight Reservation").Close

Next
objExcel.Quit
Set objWorksheet=Nothing
Set objWorkbook=Nothing
Set objExcel=Nothing
-------------------------------------------------------------------------
4) 'Fetch Test Data directly from an Excel file and perform Data driven testing for Login Operation

'Export Test Results to the same file
Dim objExcel, objWorkbook, objWorksheet
'Create Excel application Object that can be used to perform operations on Excel Appliction
Set objExcel=CreateObject("Excel.Application")
'Create WorkBook Object using Excel application Object that can be used to perform operations on Excel Work Books
Set objWorkbook=objExcel.Workbooks.Open ("C:\Documents and Settings\Administrator\Desktop\input.xls")
'Create Work sheet object Using Work Book Object , that can be used to perform operations on Excel Sheets
Set objWorksheet=objWorkbook.Worksheets("Sheet1")
objWorksheet.Cells(1,3)="Results"
Rows_Count=objWorksheet.usedrange.rows.count

For i= 2 to Rows_Count Step 1
SystemUtil.Run "C:\Program Files\HP\QuickTest Professional\samples\flight\app\flight4a.exe","","C:\Program Files\HP\QuickTest Professional\samples\flight\app\","open"
Dialog("Login").Activate
Dialog("Login").WinEdit("Agent Name:").Set objWorksheet.Cells(i,"A")
Dialog("Login").WinEdit("Password:").Set objWorksheet.Cells(i,"B")
Wait 1
Dialog("Login").WinButton("OK").Click

If Window("Flight Reservation").Exist(12) Then
        Window("Flight Reservation").Close
        objWorksheet.Cells(i,"C")="Login Successful"
        Else
SystemUtil.CloseDescendentProcesses
objWorksheet.Cells(i,"C")="Login Filed"
End If

Next
objWorkbook.Save
objExcel.Quit
Set objWorksheet=Nothing
Set objWorkbook=Nothing
Set objExcel=Nothing

5) 'Fetch Test Data directly from an Excel file and perform Data driven testing for Login Operation

'Export Test Results & Error Messgae to the same file
Dim objExcel, objWorkbook, objWorksheet, rows_Count

Set objExcel=CreateObject("Excel.Application")
Set objWorkbook=objExcel.Workbooks.Open ("C:\Documents and Settings\Administrator\Desktop\input.xls")
Set objWorksheet=objWorkbook.Worksheets(1)

objWorksheet.Cells(1,3)="Test Result"
objWorksheet.Cells(1,4)="Error Message"

rows_Count=objWorksheet.usedrange.rows.count

For i= 2 to rows_Count Step 1
        SystemUtil.Run "C:\Program Files\HP\QuickTest Professional\samples\flight\app\flight4a.exe","","C:\Program Files\HP\QuickTest Professional\samples\flight\app\","open"
        Dialog("Login").Activate
        Dialog("Login").WinEdit("Agent Name:").Set objWorksheet.Cells(i, 1)
        Dialog("Login").WinEdit("Password:").Set objWorksheet.Cells(i, "B")
        Dialog("Login").WinButton("OK").Click

If Window("Flight Reservation").Exist(12) Then
                Window("Flight Reservation").Close
objWorksheet.Cells(i, 3)="Login Successful"
Else
objWorksheet.Cells(i, 3)="Login Failed"
objWorksheet.Cells(i, 4)=Dialog("Login").Dialog("Flight Reservations").Static("Agent name must be at").GetROProperty ("text")
SystemUtil.CloseDescendentProcesses
End If
Next

objWorkbook.Save
objExcel.Quit
Set objWorksheet=Nothing
Set objWorkbook=Nothing
Set objExcel=Nothing
6)
Using While...Wend Loop
------------------------
Dim objExcel, objWorkbook, objWorksheet, rows_Count, i

Set objExcel=CreateObject("Excel.Application")
Set objWorkbook=objExcel.Workbooks.Open ("C:\Documents and Settings\Administrator\Desktop\input.xls")
Set objWorksheet=objWorkbook.Worksheets(1)

objWorksheet.Cells(1,3)="Test Result"
objWorksheet.Cells(1,4)="Error Message"

rows_Count=objWorksheet.usedrange.rows.count
 i= 2
While i<= rows_Count
        SystemUtil.Run "C:\Program Files\HP\QuickTest Professional\samples\flight\app\flight4a.exe","","C:\Program Files\HP\QuickTest Professional\samples\flight\app\","open"
        Dialog("Login").Activate
        Dialog("Login").WinEdit("Agent Name:").Set objWorksheet.Cells(i, 1)
        Dialog("Login").WinEdit("Password:").Set objWorksheet.Cells(i, "B")
        Dialog("Login").WinButton("OK").Click

If Window("Flight Reservation").Exist(12) Then
                Window("Flight Reservation").Close
objWorksheet.Cells(i, 3)="Login Successful"
Else
objWorksheet.Cells(i, 3)="Login Failed"
objWorksheet.Cells(i, 4)=Dialog("Login").Dialog("Flight Reservations").Static("Agent name must be at").GetROProperty ("text")
SystemUtil.CloseDescendentProcesses
End If
i=i+1
Wend

objWorkbook.Save
objExcel.Quit
Set objWorksheet=Nothing
Set objWorkbook=Nothing
Set objExcel=Nothing

7) 'Capture Link names from Google home page and export to Excel file 3rd sheet

Dim ObjExcel,ObjWorkbook,ObjWorksheet
Dim oLink,Links,myLink,i

Set ObjExcel=CreateObject("Excel.Application")

Set ObjWorkbook=ObjExcel.Workbooks.Open("C:\Documents and Settings\Administrator\Desktop\input.xls")

Set  ObjWorksheet=ObjWorkbook.Worksheets(3)
        ObjWorksheet.Cells(1,1)="Link Names"
Set oLink=Description.Create

oLink("micclass").value="Link"

Set Links=Browser("title:=Google").Page("title:=Google").ChildObjects(oLink)

For i=0 to Links.Count-1 step 1

        myLink=Links(i).GetRoProperty("text")
        ObjWorksheet.Cells(i+2,1)=myLink
Next

ObjWorkbook.Save

ObjExcel.Quit

Set ObjWorksheet=Nothing

Set ObjWorkbook=Nothing

Set ObjExcel=Nothing
----------------------------------------------------------------------------------
8) 'Capture Button names from Login Dialog (Flight Reservation Application) and export to Excel  file 3rd sheet

Dim ObjExcel,ObjWorkbook,ObjWorksheet
Dim oButton,Buttons,myButton,i

Set ObjExcel=CreateObject("Excel.Application")
Set ObjWorkbook=ObjExcel.Workbooks.Open("C:\Documents and Settings\Administrator\Desktop\input.xls")
Set  ObjWorksheet=ObjWorkbook.Worksheets(2)

        ObjWorksheet.Cells(1,1)="Button Names"

Set oButton=Description.Create
oButton("Class Name").value="WinButton"
Set Buttons=Dialog("text:=Login").ChildObjects(oButton)

For i=0 to Buttons.Count-1 step 1
        myButton=Buttons(i).GetRoProperty("text")
        ObjWorksheet.Cells(i+2,1)=myButton
Next

ObjWorkbook.Save
ObjExcel.Quit
Set ObjWorksheet=Nothing
Set ObjWorkbook=Nothing
Set ObjExcel=Nothing
-----------------------------------------------------------------------------------
9) ' Read/capture order numbers and customer names from 1 - 10 orders in Flight Reservation window

' and export to excel file 2nd sheet
Dim objExcel, objWorkBook, objWorkSheet, ord, C_Name
Set objExcel = createobject("Excel.Application")
Set objWorkBook = objExcel.Workbooks.Open("C:\Documents and Settings\gcr\Desktop\Sample.xls")
Set objWorkSheet = objWorkBook.Worksheets(2)
objWorkSheet.cells(1,1) = "Order No."
objWorkSheet.cells(1,2) = "C-Name"

For ord= 1 to 10 Step 1
        Window("Flight Reservation").Activate
        Window("Flight Reservation").WinButton("Button").Click
        Window("Flight Reservation").Dialog("Open Order").WinCheckBox("Order No.").Set "ON"
        Window("Flight Reservation").Dialog("Open Order").WinEdit("Edit").Set ord
        Window("Flight Reservation").Dialog("Open Order").WinButton("OK").Click
        Wait 1
        C_Name = Window("Flight Reservation").WinEdit("Name:").GetROProperty("text")
objWorkSheet.cells(ord+1,1) = ord
objWorkSheet.cells(ord+1,2) =C_Name
Next

objWorkBook.Save
objExcel.Quit
Set objWorkSheet=Nothing
Set objWorkBook=Nothing
Set objExcel=Nothing

10) One to One Comparison and Exact match
----------------------------------------
'Capture Button names from Login Dialog (Flight Reservation Application) and Perform One to One Comparison and Exact match

Dim ObjExcel,ObjWorkbook,ObjWorksheet
Dim oButton,Buttons,myButton,i

Set ObjExcel=CreateObject("Excel.Application")
Set ObjWorkbook=ObjExcel.Workbooks.Open("C:\Documents and Settings\Administrator\Desktop\input.xls")
Set  ObjWorksheet=ObjWorkbook.Worksheets(2)

        ObjWorksheet.Cells(1,2)="Buttons"

Set oButton=Description.Create
oButton("Class Name").value="WinButton"
Set Buttons=Dialog("text:=Login").ChildObjects(oButton)

For i=0 to Buttons.Count-1 step 1
        myButton=Buttons(i).GetRoProperty("text")
        ObjWorksheet.Cells(i+2, 2)=myButton
Next
rows_Count= ObjWorksheet.usedrange.rows.count
For j= 2 to rows_Count step 1
Expected=ObjWorksheet.Cells(j, 1)
Actual=ObjWorksheet.Cells(j, 2)

If  Expected=Actual Then
ObjWorksheet.Cells(j, 3)="Pass"
Else
ObjWorksheet.Cells(j, 3)="Fail"
End If
Next

ObjWorkbook.Save
ObjExcel.Quit
Set ObjWorksheet=Nothing
Set ObjWorkbook=Nothing
Set ObjExcel=Nothing

11) One to One Textual Comparison
------------------------------
'Capture Button names from Login Dialog (Flight Reservation Application) and Perform and Perform One to One Textual Comparison

Dim ObjExcel,ObjWorkbook,ObjWorksheet
Dim oButton,Buttons,myButton,i

Set ObjExcel=CreateObject("Excel.Application")
Set ObjWorkbook=ObjExcel.Workbooks.Open("C:\Documents and Settings\Administrator\Desktop\input.xls")
Set  ObjWorksheet=ObjWorkbook.Worksheets(2)

        ObjWorksheet.Cells(1,2)="Buttons"

Set oButton=Description.Create
oButton("Class Name").value="WinButton"
Set Buttons=Dialog("text:=Login").ChildObjects(oButton)

For i=0 to Buttons.Count-1 step 1
        myButton=Buttons(i).GetRoProperty("text")
        ObjWorksheet.Cells(i+2, 2)=myButton
Next
rows_Count= ObjWorksheet.usedrange.rows.count
For j= 2 to rows_Count step 1
Expected=ObjWorksheet.Cells(j, 1)
Actual=ObjWorksheet.Cells(j, 2)

If  StrComp (Expected,Actual,1)=0 Then
ObjWorksheet.Cells(j, 3)="Pass"
Else
ObjWorksheet.Cells(j, 3)="Fail"
End If
Next

ObjWorkbook.Save
ObjExcel.Quit
Set ObjWorksheet=Nothing
Set ObjWorkbook=Nothing
Set ObjExcel=Nothing
--------------------------------------------------------------------------
12) Many to Many Comparison
-----------------------------------
'Capture Button names from Login Dialog (Flight Reservation Application) and Perform and Perform Many to Many Comparison

Dim ObjExcel,ObjWorkbook,ObjWorksheet
Dim oButton,Buttons,myButton,i

Set ObjExcel=CreateObject("Excel.Application")
Set ObjWorkbook=ObjExcel.Workbooks.Open("C:\Documents and Settings\Administrator\Desktop\input.xls")
Set  ObjWorksheet=ObjWorkbook.Worksheets(2)

        ObjWorksheet.Cells(1,2)="Buttons"

Set oButton=Description.Create
oButton("Class Name").value="WinButton"
Set Buttons=Dialog("text:=Login").ChildObjects(oButton)

For i=0 to Buttons.Count-1 step 1
        myButton=Buttons(i).GetRoProperty("text")
        ObjWorksheet.Cells(i+2, 2)=myButton
Next
rows_Count= ObjWorksheet.usedrange.rows.count

For j= 2 to rows_Count step 1
Expected=ObjWorksheet.Cells(j, 1)

For k=2 to rows_Count step 1
        Actual=ObjWorksheet.Cells(k, 2)

  If  Expected=Actual Then
          Flag =1
          Exit  for
          else
          Flag= 0
  End If
next

If  Flag=1 Then
ObjWorksheet.Cells(j, 3)="Pass"
Else
ObjWorksheet.Cells(j, 3)="Fail"
End If
Next

ObjWorkbook.Save
ObjExcel.Quit
Set ObjWorksheet=Nothing
Set ObjWorkbook=Nothing
Set ObjExcel=Nothing

-------------------------------------------------------------------
13) Many to Many Textual Comparison

'Capture Button names from Login Dialog (Flight Reservation Application) and Perform and Perform Many to Many Textual Comparison

-----------------------------------
'Capture Button names from Google home page and export to Excel  file 3rd sheet

Dim ObjExcel,ObjWorkbook,ObjWorksheet
Dim oButton,Buttons,myButton,i

Set ObjExcel=CreateObject("Excel.Application")
Set ObjWorkbook=ObjExcel.Workbooks.Open("C:\Documents and Settings\Administrator\Desktop\input.xls")
Set  ObjWorksheet=ObjWorkbook.Worksheets(2)

        ObjWorksheet.Cells(1,2)="Buttons"

Set oButton=Description.Create
oButton("Class Name").value="WinButton"
Set Buttons=Dialog("text:=Login").ChildObjects(oButton)

For i=0 to Buttons.Count-1 step 1
        myButton=Buttons(i).GetRoProperty("text")
        ObjWorksheet.Cells(i+2, 2)=myButton
Next
rows_Count= ObjWorksheet.usedrange.rows.count

For j= 2 to rows_Count step 1
Expected=ObjWorksheet.Cells(j, 1)

For k=2 to rows_Count step 1
        Actual=ObjWorksheet.Cells(k, 2)

  If  StrComp (Expected,Actual,1)= 0 Then
          Flag =1
          Exit  for
          else
          Flag= 0
  End If
next

If  Flag=1 Then
ObjWorksheet.Cells(j, 3)="Pass"
Else
ObjWorksheet.Cells(j, 3)="Fail"
End If
Next

ObjWorkbook.Save
ObjExcel.Quit
Set ObjWorksheet=Nothing
Set ObjWorkbook=Nothing
Set ObjExcel=Nothing
---------------------------------------------------------------------------------------

14) 'Create Excel file and Rename 1st sheet as "Module", 2nd Sheet as "Test Case", 'and 3rd Sheet as "Test Step"
Dim objExcel
Set objExcel=CreateObject("Excel.Application")
objExcel.Visible=True
objExcel.Workbooks.Add
objExcel.Worksheets("Sheet1").Name="Module"
Wait 4
objExcel.Worksheets("Sheet2").Name="TestCase"
Wait 4
objExcel.Worksheets("Sheet3").Name="TestStep"

objExcel.ActiveWorkbook.SaveAs "C:\Documents and Settings\Administrator\Desktop\abcd.xls"

objExcel.Quit
Set objExcel=Nothing
-------------------------------------------------------------------------
15) 'Create an Excel file and add one more

Dim objExcel
Set objExcel=CreateObject("Excel.Application")
objExcel.Visible=True
objExcel.Workbooks.Add 'Creating Work Book
objExcel.Worksheets.Add 'Creating Work Sheet
Wait 4
objExcel.ActiveWorkbook.SaveAs "C:\Documents and Settings\Administrator\Desktop\abcde.xls"

objExcel.Quit
Set objExcel=Nothing
--------------------------------------------------------------------------------------
16) 'Capture Button names from Login Dialog (Flight Reservation Application) and perform Many to Many Complete Comparison

Capture Button names from Google home page and export to Excel  file 3rd sheet

Dim ObjExcel,ObjWorkbook,ObjWorksheet
Dim oButton,Buttons,myButton,i

Set ObjExcel=CreateObject("Excel.Application")
Set ObjWorkbook=ObjExcel.Workbooks.Open("C:\Documents and Settings\Administrator\Desktop\input.xls")
Set  ObjWorksheet=ObjWorkbook.Worksheets(2)

        ObjWorksheet.Cells(1,2)="Buttons"

Set oButton=Description.Create
oButton("Class Name").value="WinButton"
Set Buttons=Dialog("text:=Login").ChildObjects(oButton)

For i=0 to Buttons.Count-1 step 1
        myButton=Buttons(i).GetRoProperty("text")
        ObjWorksheet.Cells(i+2, 2)=myButton
Next
rows_Count= ObjWorksheet.usedrange.rows.count

x =0

For j= 2 to rows_Count step 1
        Expected=ObjWorksheet.Cells(j, 1)
        flag  = 0
        For k=2 to rows_Count step 1
                Actual=ObjWorksheet.Cells(k, 2)
                If  StrComp (Expected,Actual,1)= 0 Then
                Flag =1
                End If
                x=x+1 ' increment the comparison count
        next

        If  Flag=1 Then
                ObjWorksheet.Cells(j, 3)="Pass"
        Else
                ObjWorksheet.Cells(j, 3)="Fail"
        End If
        msgbox x  'inner loop comparison values
Next
        msgbox x ' Total number of comparisons

ObjWorkbook.Save
ObjExcel.Quit
Set ObjWorksheet=Nothing
Set ObjWorkbook=Nothing
Set ObjExcel=Nothing

Tuesday, August 2, 2011

Agile Testing Days 2011

 

Hunting Season starts!

 

 

We proudly open the ATD Early Bird hunting season! Hunting for discounts is one of the world's leading sports. For the next month you will find a lot of testing fans preparing their nets to catch the "Agile Testing Days Conference Early Bird" discount of more than 15% on all mentioned prices. 

 

The beautiful and rare ATD Early Bird swings its wings from now until the end of August, so register quickly to be one of the smart ones who decided to save some money!

 

The Agile Testing Days Conference takes place in November 2011 in Potsdam, near Berlin (Germany). The world's leading Agile Testers are coming to share their knowledge in more than 60 different discussions and presentations.

 

Get more information by watching the video:

http://www.youtube.com/watch?v=PweTzhxE1do

 

Do you really want to miss it? I do not think so!

 

So grab your net and hunt the ATD Early Bird.

 

Catch it here:

http://www.agiletestingdays.com/registration.php

 

Good hunting and stay agile!

 

 

P.S. planking or testing? – We got the right answer:

http://www.youtube.com/watch?v=0M4DCtE1rY4

 

Díaz & Hilterscheid Unternehmensberatung GmbH

Kurfürstendamm 179

10707 Berlin

Germany

 

Phone: +49 (0)30 74 76 28-0

Fax: +49 (0)30 74 76 28-99

E-mail: info@diazhilterscheid.com

Website: www.diazhilterscheid.de

 

 

 

Managing directors:

Marc Ahlbach

José M. Díaz Delgado

 

Ust-IdNr. DE195661616

Amtsgericht Berlin Charlottenburg HRB 67896

 

To unsubscribe please send an e-mail to info@agiletestingdays.com

 

 

 

 
Madeleine Griep
Assistant to CEO
 
Díaz & Hilterscheid Unternehmensberatung GmbH
Kurfürstendamm 179
10707 Berlin
 
Telefon: +49 (0)30 74 76 28 - 0
Telefax: +49 (0)30 74 76 28 - 99
Mobil:    +49 (0) 174 484 66 21
 
José M. Díaz Delgado - Geschäftsführer
Marc Ahlbach - Geschäftsführer
 
Ust-IdNr. DE195661616
Amtsgericht Berlin Charlottenburg HRB 67896
 
 
 
--------------------------------------------------------------------------------
Diese Nachricht kann vertrauliche Informationen enthalten.
Weitere Information finden Sie unter www.diazhilterscheid.de/privacy.htm
 
This message may contain confidential information.
--------------------------------------------------------------------------------