Software Testing Social Network

Free Software Testing Tutorial and Quality Assurance Portal

Home My Page QTPExpert

About Me

Basic Information

Contact Information

Education

Friends

0 friends
QTPExpert
QTPExpert
  • Karma
  • Member since
  • Wednesday, 30 September 2009 17:10
  • Last online
  • 766 days ago
  • Profile views
  • 7299 views
25 months ago
QTPExpert created a blog entry QTP Functional Testi...

Each Test case is built using a series of Quick Test Professional Functions. Each function executes Quick Test Professional code to input data onto a screen.
Each object in the Quick Test Professional Function resides in the Object Repository, thus allowing Quick Test Professional to identify all fields in the application.
•    Each test case uses functions. Each function is either an applet on a screen or a whole screen depending on the amount of fields.
•    Each function is named AUT_Screen Name e.g. MyApps_Close_Application
•    Every field/object on the screen or applet must be learnt into the object repository and renamed where required to a more meaningful screen name.
•    Each function library must reside as .vbs file
•    All functions are accessible via the step generator.

* Initial Condition
Automated test scripts must begin from the same starting point. It is best practise to end all open browsers and start the Application under Test from the beginning. This ensures that all scripts can run back to back in an unattended batch mode.

* Start Up Script
The start up script will copy all functions from the LAN and load them on the C Drive of the PC executing the test case. It will also build the infrastructure libraries if they don’t exist.

* Test case Failure / Exception condition handling
All Quick Test Professional functions must use an exception handling framework. This allows any Quick Test Professional function to fail, report the failure and backout of the application. The exception handling framework is built by:
An Environment Variable set in the Quick Test Professional startup_script set as ENVIRONMENT(EXCEPTION_COND)=”N”.

Apr 16
QTPExpert created a blog entry What are the Pre-req...

The following are pre-requisites or dependencies for QTP automation:

•    Knowledge and hands-on experience with the use of QTP;
•    Quality Centre (QC) and QTP installed and configured;
•    QC and QTP are integrated;
•    QTP Add-Ins are installed (if required);
•    QC user groups are defined and granted access to Quality Centre projects;
•    The application or product is in a stable state;
•    Creation of new automated scripts requires existing manual test cases to have been executed successfully.  This task is performed by the application tester or business representative and is performed prior to handover to QTP automation.
•    The manual test cases must have been executed successfully and that there are no other changes in the application.  Existing automated scripts can be updated directly to reflect the changes as part of maintenance releases.
•    All test cases must start and end at the same point. This is normally the First screen of the application. This allows for test cases to be batched together into a test suite.
•    All environment, software or data table changes must be advised to the automated testing team. There will potentially be an impact on the running of automated test cases with the introduction of these changes.
•    The test cases must not be data dependent.  All data required in the test case must be created in the test case. In the event that data cannot be created and the test case is data dependent, the data must be able to be restored, or manipulated back to the initial state after a test case updates the data. This then allows for any test case to be rerun at anytime


Existing manual test cases exist in QC in the standard format (see the QC user guide) and a copy of the test case to be automated are placed in the regression folder alongside any existing automated scripts. Refer to Section 6.1 for further information regarding Manual Test Cases.

Apr 16
32 months ago
QTPExpert created a blog entry Web application perf...

QTP is a functional automated testing tools, and the page loading time or  response time of a web application should be a performance testing thing.But as a matter of fact, QTP can also get page load time statistics by some functions. Because QTP using a VBS script and VBS script is so powerful that it can call any windows of the COM components and objects. So the idea of getting page load time is very simple, that is, we want to use VBS for IE page and get statistics of the page load time.

Implementation steps:

  • using createobject to create an instance of IE to access the document object;
  •  using document object when the page loads readystate properties of various stages of acquisition time,
  •  using timer () to achieve millisecond statistics.
  •   in order to facilitate the call, use the time statistics as a function in the code package.

Coding:

'In loadrunner script to do to access the url parameter, the variable named SITEURL
'timeCount method returns a string, the contents of the string occur at all stages of the statistical time
'You can use various methods view the contents of the result
SiteURL = "www.sina.com.cn" 'Set the URL to visit
result = timeCount (SITEURL) 'returns running results
MsgBox result 'output to run As a result, the line can be commented out loadrunner

'Method defines the beginning
Public Function timeCount (url)
Set dom = CreateObject ( "InternetExplorer.Application") 'Create an IE object
dom.Navigate (url) 'open the specified URL
time_start = Now () 'to obtain statistics at the beginning of time
timer_start = timer () 'Get the current time in milliseconds
'a = dom.ReadyState' Get the current state of the value of IE will be used to determine the value of the state of the current state of the IE
dom.visible = True 'Set IE can be seen
While dom.busy or (dom.readyState <> 4) 'When the IE is in BUSY status or load does not complete (readystate is not equal to 4), depending on the state of IE statistical time, once every millisecond Statistics
wscript.sleep 1 'time interval 1 ms, if the relatively long time interval, then is likely to take less than a state value
Select Case dom.readystate 'to determine the value of dom.readystate

Case 0 'IE is not initialized, in fact, the method, readystate = 0 meaningless, because the cycle is at least a start.
time0 = Now ()
timer0 = timer ()

Case 1 ' "is sending request"
time1 = Now ()
timer1 = timer ()

Case 2 ' "request has been sent to complete"
time2 = Now ()
timer2 = timer ()

Case 3 ' "can receive the part of the response data,"
time3 = Now ()
timer3 = timer ()

Case 4 ' "Page is loaded"
time4 = Now ()
timer4 = timer ()

End select
wend
time_end = Now () 'Statistical End Time
'MsgBox "Start time is:" & time1 & "; the end of time is" & time2

timeCount = "Statistics Start Time:" & start_time & vbcrlf & "time0:" & time0 & vbcrlf & "time1:" & time1 & vbcrlf & "time2:
"& time2 & vbcrlf &" time3: "& time3 & vbcrlf &" time4: "& time4 & vbcrlf &" to complete the initialization of IE and send request:
"& (timer1-timer_start) &" seconds "& vbcrlf &" to send the completion and acceptance of server-side part of the response data:
"& (timer3-timer1) &" seconds "& vbcrlf &" 100% to receive and complete the HTML content parsing:
"& (timer4-timer3) &" seconds "& vbcrlf &" Total spent: "& (timer4-timer_start) &" seconds "
End Function

Oct 03
QTPExpert created a blog entry 4 Tips to overcome Q...

1. Make sure the correct Add-in is loaded for the application under test. For example, if the procedure is to test the Java class, we must load the Java Add-in. Other commonly used Ad-ins for QTP are QuickTest Professional Oracle 6.5 Add-in, QuickTest Professiona Siebel 8.0 Add-in, and QuickTest Professional Terminal Emulator 8.0 Add-in. To get more details for each of the Add in please check the corresponding QTP_Install_Guide.pdf and Main_Users_Guide.pdf found.
2. Use QTP Virtual Objects feature for non recognized objects:
Using the Virtual Object Wizard, you can map a virtual object to a standard object class, specify the boundaries  and the parent of the virtual object, and assign it a name. You can also group your virtual objects logically by assigning them to collections. Goto Tools -> Virtual Objects -> New Virtual Object, there will be Virtual Object Wizard dialog box to add some support to the custom/wrapper class control set to a virtual control and then add it to the object library But  the virtual object is dependent on the coordinates so if the page is moved, it will not work.

3. Change the QTP's own means of identification of a control from the tools - Object Identification. It lists all of the QTP controls, as well as the how QTP identify those controls. You can give it to add X, Y coordinates for recognition.  This change can solve some of the problems.

4. The use of low-level recording or mouse recording. With the LowLevelRecording/AnlogRecording you can record the coordinate of the screen to achieve the result. But this is poor for maintenance.

Oct 03

JomComment

No comment made yet.

hwdVideoShare

This user has not uploaded any videos.