Monday, December 13, 2010

Test Run Setting Preference in Quality Centre

• User can run the test scripts that are stored in QC via QTP

• QC clients installed in on your computer or via QC clients

Note:-

• User can’t run the test scripts from QC if QTP machine is logged and logoff

• QTP runs always hidden mode for improve the performance(tooltip will populate the information ,you can change the setting in Remote Agent

Enable the setting in QTP

• Select Tools->Option

• Click Run Note Tab

• Select “Allow other HP Products to run tests and components

Understand the setting in Remote Agent

• Remote Agent setting for support for test execution based on the application, QTP Speed and other process

Level

• Determine the QC and QTP log

None – No log is generated

Low – QC and QTP communication Errors

Medium – QC and QTP communication errors and information’s on major operation

High – Include all available information

Log folder

• The folder path for storing the log file

Reset testing tool:-

• Tool provide the option to reset the QTP tools and QC for after the no runs has completed

Save the open, modified test before the test run

• Remote agent can save any unsaved related to QTP Tests

Save the open, new test before the test run

• Remote invoke all tests and save the location Quick Test installation folder\Tests\Quality Center

Open a new test after the test run

• Remote agent has completed the test set execution after that invoke the new test in QTP

Run Quick Test in hidden Mode

• Default QTP tests run the hidden mode for improve the performance, user can customize the using “Remote Setting”

Reset testing tool

• Operation - QTP configure the operation like open and run (Default 2700)

• Queries – based on the remote application perform to confirm the application is responses

Thursday, December 9, 2010

Opening Tests from the Recent Files List (File Menu)

  • You can open Quality centre files from the recent file list in the File Menu
  • If you select a test located in Quality centre, but currently QC is not connected, the below window will be populated in the screen
  • 
    Add caption
    
  • Provide the require information like User Name and Password and Server name and Project name default displayed in the application

Monday, December 6, 2010

Saving the test from Quality Centre

• when Quick test connected,you can create/modify the tests in quick test and save them directly to quality centre


• File -> Save click button, Save dialog window open

• Click ‘Quality Centre Test Plan’ then select the specific location and click save button (Note:- check the check box - Screen files are uploaded into QC Else No

Integrate the QC with QTP

• QCUtil is an object to access the full functionality of the quality centre OTA(Open Test Architecture)


• You can store or retire the files and scripts from quality centre

Dim TDConnection


Set TDConnection = CreateObject("TDApiOle80.TDConnection")

Disconnect Quick Test from Quality Centre

• User can disconnect the quality centre connection from QTP like File -> Quality centre connection or toolbar button 
• While disconnect the QC, if any QC testscripts, vbsfiles,OR will automatically disconnect from QTP
 
Step3 Logout from the project or change the project

Step2 Change User or logon to new user

Step1 Disconnect form the server

After that, close the QC Connection window

 

Sunday, December 5, 2010

Function to open the data sheet

Public Function OpenDataTable(strFileName,strSheetName)

CurPath=environment("TestDir")

pathArr=split(CurPath,"\") CurDrive=pathArr(0) pathFile="\nxc Automation\Data Table\"

dataTablePath=CurDrive + pathFile strFilePath=dataTablePath+ strFileName

DataTable.ImportSheet strFilePath,strSheetName,"Global"

End Function

Check Web Button Visiable Status and click

Public Function WebButtonClick(oBjName)

Webbutton = oBjName.ToString

If oBjName.Exist(0) Then

If oBjName.Object.Isdisabled Then

WebButtonvisibleClick = False

ExitTestIteration

Else

oBjName.click

WebButtonvisibleClick = True

End if

Else

WebButtonvisibleClick = False

ExitTestIteration

End If

End Function

Create Excel,Add Sheet,Rename the Sheet

Call CreateEventIdXls()
Public Function CreateEventIdXls()

Set fs = createObject("Scripting.FilesystemObject")

Environment.Value("FolderPath") = "C:\Documents and Settings\" & Environment.Value("UserName") & "\Desktop\EventId.xls"

If fs.FileExists(Environment.Value("FolderPath")) = False Then

Set ExcelObj = CreateObject("Excel.Application")

ExcelObj.Visible = False

Set ExcelWB = ExcelObj.Workbooks

ExcelWB.Add

'ExcelWB(1).SaveAs Environment.Value("FolderPath") '& "\" &Environment.Value("TestName")

Set ExcelWS = ExcelWB(1).Worksheets

'ExcelWS(1).Activate

'ExcelWS(2).Activate

'ExcelWS(3).Activate

ExcelWS.add

ExcelWS(4).Activate

ExcelWS.add

ExcelWS(5).Activate

ExcelWS.add

ExcelWS(6).Activate

ExcelWS(1).name = "DAY1"

ExcelWS(2).name = "DAY2"

ExcelWS(3).name = "DAY3"

ExcelWS(4).name = "DAY4"

ExcelWS(5).name = "DAY5"

ExcelWS(6).name = "DAY6"

ExcelObj.DisplayAlerts = False

ExcelWB(1).SaveAs Environment.Value("FolderPath") '& "\" &Environment.Value("TestName")


ExcelWS(1).Cells(1, 1).Value = "oUTEventType"


ExcelWS(1).Columns("A:B").AutoFit

ExcelWS(1).Range("A1:B1").Font.Bold = True


ExcelWS(2).Cells(1,1).value ="oUTEventType"

ExcelWS(2).Cells(1,2).value ="oUTEventToBeVerified"

ExcelWS(2).Columns("A:B").AutoFit

ExcelWS(2).Range("A1:B1").Font.Bold = True



ExcelWS(3).Cells(1,1).value ="oUTEventType"

ExcelWS(3).Cells(1,2).value ="oUTEventToBeVerified"

ExcelWS(3).Columns("A:B").AutoFit

ExcelWS(3).Range("A1:B1").Font.Bold = True

ExcelWS(4).Cells(1, 1).Value = "oUTEventType"

ExcelWS(4).Cells(1, 2).Value = "oUTEventToBeVerified"

ExcelWS(4).Columns("A:B").AutoFit

ExcelWS(4).Range("A1:B1").Font.Bold = True
ExcelWB(1).Save

ExcelObj.Quit

Set ExcelWB = Nothing

Set ExcelWS = Nothing

Set ExcelObj = Nothing

End if

End Function

Create Excel Sheet,Add New Sheet,Rename the Sheet Name

'Call AddSheet()
Function AddSheet ()

Environment.Value("FolderPath") = "C:\Documents and Settings\" & Environment.Value("UserName") & "\Desktop\EventIdNew2.xls"

Dim ExcelObj

Set ExcelObj = CreateObject("Excel.Application")

FilePath= Environment.Value("FolderPath")

'Disable alerts

ExcelObj.DisplayAlerts = False

Set ExcelWB =ExcelObj.Workbooks.Add

'Add a workbook to the Excel App

For i=1 to 4

ExcelWB.WorkSheets.Add

Next

'Save the file

ExcelObj.ActiveWorkbook.saveas FilePath



'Close Excel

ExcelObj.quit



'Relese the Object

Set ExcelWB = Nothing

Set ExcelObj = Nothing

End Function