Wednesday, February 2, 2011

Attaching files in Quality center

User can add all type of files uploaded into QC for user reference

Attaching files:-
- click the attachment link
- select the require file from machine
- click ‘open’ button Attached files will be displayed in the below grid for user reference

Attaching URL:-
- click the attachment url link
- Type the require link with format
- Click ‘ok’ button, IE explore format file has attached in the display grid

Capture the Image:-
- click the ‘Capture’ image button
- Capture window has populated in the screen, select require the screen to be capture and click ‘Camera’ link and attached that image and click ‘Attached’ button.

Note:- image captured in .bmp format

Attaching the system information:-
- import system properties information from the user machine



Alert in quality Center

     User can track the requirement changes, test scripts and defects in quality center using the add alert and follow up the flag

Automation notification alert:-
           QC admin can add alert rules, the rules based on requirement, tests and defects. Alert notified the responses in entity level changes.

Follow up Flag:-
     Specific requirement, test suite and defects to remind you to follow the up on the entity and notified the information via mail to the user
Steps:
- select the requirement and click the flag link
- Add the follow up flag date, description
- Change/ clear button use for clear the flag

Clear History in Quality Center

User can store the log of values in your projects, it can been viewed further, if no longer needed, you can delete the using ‘Tools->Clear History’ function

Note: - you must have proper user profile privileges

Entity: - User can customize the require entity can be selected in the list
Field: - select the field in the elected Entity
Date: - selected date range

Tuesday, February 1, 2011

Forget / Reset the QC Password

Reset the QC Password:-

Your can reset the password in quality center for following approach
Note:- verify the user profile has the rights to reset the password
- Logon to Quality center
- Click ‘Tools-->Customize’

- Click ‘User Properties-->change password’ button

- Enter the old password and new password and click ‘Save’ changes

Forget Password:-
User can request the forget password
- load the QC Url
- click ‘Forget Password’
- QC admin will trigger the mail or notification to users for the password



Starting Quality Center

User can lunch the QC on your machine from the Web browser

- Type and load the QC URL like (http:// <:Port>/Qcbin

- Click ‘Quality Center’ Link,

Note:-
• First time user require Admin rights for install the .net framework and Add-in
• Automatically find and install the .net framework for that machine
- If user assigns any project, then you will get intimation about the username and password
- Enter the Username/Password, then assigned domain/project name select from the list

- Click on ‘Login’ button
- QC Loaded successfully

Friday, January 28, 2011

QuickTest Professional Object Model Reference - Utility Statements

Describe Result :-

Return the text description of the error message
Code:-
oBjError = getlasterror
Msgbox (describeresult(oBjError))

ExecuteFile :-

User can call the following format using “ExecuteFile”command in the script level .vbs .txt and .qfl
Code:-
ExecuteFile “FileLocation & file Name”
Note:- Execute file can also call files which is attached in QC also
ExecuteFile ("[QualityCenter] Subject\FileName.vbs")

Exit Action :-

User can call the action based on the function flow or requirement; in meanwhile like to stop the execution of the action we can also use the Exit Action command
Code:-
If RunStatus = “Y” then
Call Runaction "vinodh", "oneIteration"
Else
Exit Action (return Value)
End if
Note:- Return Value populated in the Test result in Quick Test

ExitActionIteration :-

It’s will stop iteration of the function flow
Code :-
If CITY = “USA” then
Call Runaction "vinodh", "oneIteration"
Else
ExitActionIteration(return Value)
End if
Note:- Return Value populated in the Test result in Quick Test

ExitComponent :-

Function used for BPT Testing, exit for the current component run
Code:-
If res = False Then
ExitComponent (return Value)
End If
Note:- Return Value populated in the Test result in Quick Test

ExitComponentIteration :-

Function used for BPT Testing, exit for the current iteration
If res = False Then
ExitComponentIteration(return Value)
End If
Note:- Return Value populated in the Test result in Quick Test

ExitTestIteration :-

Exit current iteration of the Quick Test, Quality centre and BPT component also
If res = False Then
ExitTestIteration (return Value)
End If
Note:- Return Value populated in the Test result in Quick Test

InvokeApplication:-
Invoke the executable application like exe file
Code:-
InvokeApplication "E:\Program Files\Microsoft Internet\IEXPLORE.EXE"

LoadAndRunAction:-

Load the specific action when user require to run the action
Code :-
If CITY = “USA” then
LoadAndRunAction (“Path”,”ActionName”,”Iteration”)
Else
Exit test
End if

Print :-

Display the runtime value from the application
Code:-
Print "VariableName"

Tuesday, January 4, 2011

Quick Test Object Reference Model

Crypt Object – Encrypt Method  
          Encrypt the string variable using Encrypt Method Ex: User can use the Password for securities

Pwd = "vinodh"
Cpwd = Crypt.Encrypt (Pwd)
Msgbox Cpwd

Data Table Method
          Quick Test have feature to create the multiple test data and stored in the Data Table and handled in the runtime.  Scripts will store the temporally in the Data table; User can see the test data in the QT Result window    

Addsheet Method
          Run time user can add the new sheet with test data  
Ex:
a = Datatable.AddSheet("Vino").AddParameter("Name","Check")
print a

Export Method
          Quick Test store the test data value into excel format based on the location
Ex:
a = Datatable.AddSheet("Vino").AddParameter("Name","Check")
print a
DataTable.Export("C:\Vinodh\TestLog.xls")

Delete Method
          Delete the sheet while running the test data table Index value is :1
Ex:
a = Datatable.AddSheet("Vino").AddParameter("Name","Check")
print a
DataTable.DeleteSheet("Vino")

ExportSheet Method

          Export the specific test data sheet from the runtime data table
Index value is : 1

a = Datatable.AddSheet("Vino").AddParameter("Name","Check")
print a
DataTable.ExportSheet "C:\Vinodh\TestLog.xls",3


GetRowCount Method
          Return the total no of the row available in this particular sheet
a = Datatable.AddSheet("Vino").AddParameter("Name","Sona")
print a
ss = Datatable.GetSheet("Vino").GetRowCount
print ss

GetSheet Count Method
          Return the number of sheet count available in excel sheet
DataTable.Export("C:\Vinodh\TestLog.xls")
sheetcount = DataTable.GetSheetCount
print sheetcount


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

Monday, November 29, 2010

Find the Excel Prodcut Code, Version,UseSystem Separators, Default File Path

Dim ExcelVersion as string


ExcelVersion = CreateObject("Excel.Application").ProductCode

Msgbox ExcelVersion

Dim ExcelVersion as string

ExcelVersion = CreateObject("Excel.Application").Version

Msgbox ExcelVersion

Dim ExcelVersion as string

ExcelVersion = CreateObject("Excel.Application").UseSystemSeparators

Msgbox ExcelVersion


Dim ExcelVersion as string

ExcelVersion = CreateObject("Excel.Application").DefaultFilePath

Msgbox ExcelVersion

Raise the defect from QTP

Dim TDConnection


Set TDConnection = CreateObject("TDApiOle80.TDConnection")

TDConnection.InitConnection "http://10.128.76.242:8080/qcbin" ' URL for the DB

TDConnection.ConnectProjectEx "DomainName","ProjectName","UserName","Password "

If TDConnection.Connected Then

MsgBox("Connected to " + chr (13) + "Server " + TDConnection.ServerName + chr (13) +"Project " + TDConnection.ProjectName )

'Get the IBugFactory

Set BugFactory = TDConnection.BugFactory

'Add a new empty bug

Set Bug = BugFactory.AddItem (Nothing)

Bug.field ("BG_STATUS") = "New"

' BG_RESPONSIBLE

Bug.field ("BG_PROJECT") = "Testing"

Bug.field ("BG_SUBJECT") = "Automation Testing"

Bug.field ("BG_SUMMARY") = "Automation Testing"

Bug.field ("BG_DESCRIPTION") = "QTP create the Defect Log for Automation Testing"

' BG_DEV_COMMENTS

Bug.field ("BG_SEVERITY") = "Severity 4"

Bug.field ("BG_PRIORITY") = "Low"

Bug.field ("BG_DETECTED_BY") = "UserNAme"

Bug.field ("BG_USER_01") = "Raised"

Bug.field ("BG_USER_02") = "Cycle 0"

Bug.field ("BG_USER_06") = ""

Bug.field ("BG_USER_09") = "1375484"

Bug.field ("BG_USER_10") = "SIT"

Bug.field ("BG_USER_11") = "Automation"

Bug.field ("BG_USER_12") = "Others"

Bug.field ("BG_USER_15") = "IN"

Bug.Post

Else

MsgBox("Not Connected")

End If

Wednesday, October 6, 2010

How to Connect QC Using QTP

  • When working with automation testing scripts using Quality centre and QTP, need to established the connection
  • Make sure that QC Add-in installed into local system in ‘Quality Centre connectivity Add-in”
Quality Centre:
Quality Center is a data portal for collecting and storing data relevant into a manual testing process, Automation Scripts and business components

Invoke the QTP Application and click File-Quality Center Connection

  • Provide the Server URL, Username, and Password, Domain and Project Information and User can able to retrieve/Access the Data portal from quality Centre















Open the Scripts/function library and data files from QC:

  •         If Click Open -> Quality Centre Test Plan, it will populated all the folder structure in Quality centre














Save all the scripts/function in QC:

  • Select the Stored the file location
  • Entered File Name
  • If you require to save Active Screen files into QC
  • Finally click ‘Save’ button

Tuesday, October 5, 2010

Check and Create the Folder in Local System

Public Function CreateFolder()
   Environment.Value("OutSideViwerAutoFolderPath") = "C:\COPEPerlAutomationExecution"
   Set fs = CreateObject("Scripting.FileSystemObject")
   If fs.FolderExists(Environment.Value("OutSideViwerAutoFolderPath")) = False Then
     fs.CreateFolder (Environment.Value("OutSideViwerAutoFolderPath") )
   else
     Msgbox "Folder Exists"
   End if
  End Function