Basic funda of QA (Testing )

"No Standards for Testing only the Best Practices"

Thursday, September 4, 2008

QTP FAQs - Part II

16. How to get a text from a list box,a cell from a table etc..
1)To obtain a text from List box just select the range of items inthe list box and use GetSelection method along with the object name. You also have GetContent method to get all the items from the list.
2) To obtain a text from cell, Record: Click inside the cell and use GetROProperty("text") then you can see the text value. Same is the case with Table also.
4) how to import data for data driven test?
DataTable.ImportSheet(FileName, SheetSource, SheetDest) FileName (String): The full path of the Excel table from which you want to import a sheet. SheetSource (Variant): The name or index of the sheet in the file that you want to import. Index values begin with 1. SheetDest (Variant): The name or index of the sheet in the Data Table that you want to replace with the SheetSource. Index values begin with 1. Example The following example uses the ImportSheet method to import the first sheet of the name.xls table to the name sheet in the test's run-time Data Table. DataTable.ImportSheet "C:\name.xls" ,1 ,"name"
DataTable.ImportSheet(FileName, SheetSource, SheetDest) FileName (String): The full path of the Excel table from which you want to import a sheet. SheetSource (Variant): The name or index of the sheet in the file that you want to import. Index values begin with 1. SheetDest (Variant): The name or index of the sheet in the Data Table that you want to replace with the SheetSource. Index values begin with 1. Example The following example uses the ImportSheet method to import the first sheet of the name.xls table to the name sheet in the test's run-time Data Table. DataTable.ImportSheet "C:\name.xls" ,1 ,"name"
17. Give an example of a regular expression,user-define?
Regular Expressions: These r enable QT to identify Objects and Text Strings with varying values.There r so many examples for Regular expressions . plz refer Visual Basic6.0 any reference book.For example, start.* matches start, started, starting, starter, etc. You can use a combination of brackets and an asterisk to limit the search to a combination of non-numeric characters. For example: [a-zA-Z]* User Defined Functions: You can write your user-defined function directly into your test or component if you want to limit its use only to the local action or component, or you can store the function in an associated library file to make it available to many actions and tests or components (recommended). Note that if the same function name exists locally within your action or component and within an associated library file, QuickTest uses the function defined in the action or component. Function MyFuncWithParam (obj, x) dim y y = obj.GetROProperty("value") Reporter.ReportEvent micDone, "previous value", y MyFuncWithParam=obj.Set (x) End Function Built_in Function:QuickTest provides a set of built-invariables that enable you to use current information about the test and the QuickTest computer running your test. These can include the test name, the test path, the operating system type and version, and the local host name.
18. how to change a name of an object in a application ..?
As a tester u only check the functionalities of the ojects. Developes can do that one. okthe blow answer gives u a good idea.When recording an object QuickTest Professional uses one of the object's properties as the logical name for the object (the name displayed in the Expert View and in the KeywardView modes).You can change the property that is used to be a different one by specifying which property's value you want to use as the logical name for the object.For example in order to use the alt property as the logical name of an image, run regedit.exe and set the following information:[HKEY_LOCAL_MACHINE\SOFTWARE\Mercury Interactive\QuickTest Professional\MicTest\Test Objects\Image]"tag query
name"="alt"
19. how to invoke a databse application for database testing?
testconnection("Select * from emptable")
Function testconnection(query)
Set cnn = CreateObject("ADODB.Connection")Set rs = CreateObject("ADODB.Recordset")cnn.ConnectionString ="DRIVER={Oracle in OraHome92};SERVER=servername;UID=userid;PWD=pwd;DBQ=dbinstance"cnn.open
rs.open query,cnn rs.movefirst
for i = 0 to rs.fields.countmsgbox rs(i)next End Function
20. How many types of recording are there in QTP?
There are 3 types of Recording modes in QTP1. Stndard Recording or General Recording2. Analog Recording3. Low-level Recording
21.How can you show the data from a particular row and column?
NumColumns=datatable.GlobalSheet.GetParameterCountNumRows=datatable.GlobalSheet.getrowcountFor i = 1 to NumRowsDatatable.SetCurrentRow(i)For j = 1 to NumColumnstblCellText = Datatable(j,dtGlobalsheet)If tblCellText <> "" ThenMsgbox "The Text in Row: " & i & " and Column: " & j & " is: " & tblCellTextEnd IfNext Next
22) How i can get class name of test object by repository ?
Right-click an object with the property or value you want to find in the Keyword View or Active Screen and choose Object Properties (or View/Add Object in the Active Screen), and then click the Repository button, choose Tools > Object Repository, or click the Object Repository toolbar button
23.How to click on the link available in the web table?
Link is an item in web table and link is not static, i mean it can be any where, you can not guess?here , there are two actions, one is to capture the newly added item and than clicking on it.... U can use description method. For more about this method see QTP help. I had used the same for the same issue, but not as different Actions. U still can try this.
24. how can we test datareports through QTP?
we can test data reports by using descriptive programming.
25. how can i write a script to automate the page which contains random questions with corresponding answers as radio buttons ? eg:questions1............a b c dquestion 2a b c d..............
ACTUAL_ANS(0) = "2"ACTUAL_ANS(0) = "1"ACTUAL_ANS(0) = "3"ACTUAL_ANS(0) = "4"
RANDOM_ANS(I) = ANY RANDOM NO THROUGH RANDOMIZE FN RANGE BETWEEN 1 TO 4
Browser("QUIZ").Page("QUIZ_PAGE").WebRadioGroup("FIRSTQN").Select "#"&RANDOM_ANS(0)Browser("QUIZ").Page("QUIZ_PAGE").WebRadioGroup("SECONDQN").Select "#"&RANDOM_ANS(1)Browser("QUIZ").Page("QUIZ_PAGE").WebRadioGroup("THIRDQN").Select "#"&RANDOM_ANS(2)Browser("QUIZ").Page("QUIZ_PAGE").WebRadioGroup("FOURTHQN").Select "#"&RANDOM_ANS(3)
VALIDATE FOR ALL THE ANSWERS IN THAT ARRAY IN A LOOP
FOR LOOPIF RANDOM_ANS(I) = ACTUAL_ANS(I)GOOD_ANWSERED = GOOD_ANWSERED + 1END IFMSGBOX GOOD_ANWSERED ARE THE SCORE !!!NEXT
26. Explain the need to use analog recording in qtp?
This mode records exact mouse and Key Board operations you perform in relation to the screen /Application Window. This mode is useful for the operation which you can record at Object Level, such as drawing a picture, recording signature. The steps recorded using Analog Mode is saved in separated data file, Quick Tests add to your Test a Run Analog File statement that calls the recorded analog File. This file is stored with your action in which these Analog Steps are created. The Step recorded in Analog mode can not be edited within QT.
27. What are the loops used in Quick Test Professional?
As like as win runner q.t.p allows FOR LOOP, WHILE LOOP, DO LOOP,IF CONDION
28. how to execute qtp script from command prompt?
You need to create a vbs file... then create a batch file....that's it, i think this is possible by the using CScript.exe "filename" in the command prompt.
29. how do we record a pop up window in QTP?
we can record a pop up window through Recovery Management
30. I am using QTP testing tool,What is micclass? and how to refer the different DLL\'s?
Micclass is nothing but the Type of Object in the Application like Webedit,WebRadiogroup,Webcheckbox
To make use of Dlls..CreateObject can be used. like ;
set obj = CreateObject("mydll")
mydll.customfunctions

QTP FAQs - Part I

1. How do u do batch testing in WR & is it possible to do in QTP, if so explain?
Ans: Batch Testing in WR is nothing but running the whole test set by selecting "Run Testset" from the "Execution Grid".The same is possible with QTP also. If our test cases are automated then by selecting "Run Testset" all the test scripts can be executed. In this process the Scripts get executed one by one by keeping all the remaining scripts in "Waiting" mode.
2. If i give some thousand tests to execute in 2 days what do u do?
Ans : Adhoc testing is done. It Covers the least basic functionalities to verify that the system is working fine.
3. what does it mean when a check point is in red color? what do u do?
Ans : A red color indicates failure. Here we analyze the the cause for failure whether it is a Script Issue or Envronment Issue or a Application issue.
4. what do you call the window testdirector-testlab?
Ans : "Execution Grid". It is place from where we Run all Manual / Automated Scripts
The Test Obj ect Model is a large set of object types or classes that QTP uses to represent the objects in your application. Each test object class has a list of properties that can uniquely identify objects of that class and a set of relevant methods that QTP can record for it.
A test object is an object that QTP creates in the test to represent the actual object in your application. QTP stores information about the object that will help to identify and check the object during the test run. A run-time object is the actual object in your Web site or application on which methods are performed during the test runAutomation Framework,
Automation framework is a process to develop the automation scripts and reduce maintenance. This framework completely depends on the application, types of testing and tools that you are using. Its hard to provide generalised framework for all applications:
In general, 1) Create reusable scripts

2) Create modular scripts and drive scripts from external data.
5. How does Parameterization and Data-Driving relate to each other in QTP?
To datadrive we have to parameterize.i.e. we have to make the constant value as parameter, so that in each iteraration(cycle) it takes a value that is supplied in run-time datatable. Through parameterization only we can drive a transaction(action) with different sets of data. You know running the script with the same set of data several times is not suggestable, & it's also of no use.
6. Explain the concept of how QTP identifies object.
QTP uses the Object Repository file to recognize objects on the application. When QTP runs a action, it uses the Object Repository to locate objects. It reads an object’s description in the Object Repository and then looks for an object with the same properties in the application being tested. During recording qtp looks at the object and stores it as test object.For each test object QT learns a set of default properties called mandatory properties,and look at the rest of the objects to check whether this properties are enough to uniquely identify the object. During test run,QT searches for the run time obkects that matches with the test object it learned while recording.
7. What is the difference between Call to Action and Copy Action.?
Call to Action : The changes made in Call to Action , will be reflected in the orginal action( from where the script is called).But where as in Copy Action , the changes made in the script ,will not effect the original script(Action)
when u insert a call to action,they r read only in the calling test.It can be modified in the original test.where as come to copy action,you can make changes to the copied action,your changes will not effect the original action where it created.
8. have you ever written a compiled module? If yes tell me about some of the functions that you wrote ?
I Used the functions for Capturing the dynamic data during runtime. Function used for Capturing Desktop, browser and pages. in qtp the compiled modules are called library files. so write different files in a file extention with .vbs and call this in qtp test scipt file
9. Explain what the difference between Shared Repository and Per_Action Repository
Shared Repository: Entire application uses one Object Repository , that similar to Global GUI Map file in WinRunner Per Action: For each Action ,one Object Repository is created, like GUI map file per test in WinRunner
10. Few basic questions on commonly used Excel VBA functions.
common functions are: Coloring the cell Auto fit cell setting navigation from link in one cell to other saving
11. Explain the keyword createobject with an example.?
Creates and returns a reference to an Automation object syntax: CreateObject(servername.typename [, location]) Arguments servername:Required. The name of the application providing the object. typename : Required. The type or class of the object to create. location : Optional. The name of the network server where the object is to be created.
create object creates handle to the instance of the specified object so that we program can use the methods on the specified object. It is used for implementing Automation(as defined by microsoft). ex: set oDesc= createobject(Excel.application) odesc.activeworksheet=1
Createobject:Creates and returns a reference to an Automation object.Example:Dim ExcelSheetSet ExcelSheet = CreateObject("Excel.Sheet")
12. How to use the Object spy in QTP 8.0 version?
The SPY will be used to recognize and read all the objects on the application.
There are two ways to Spy the objects in QTP 1) Thru file toolbar ---In the File ToolBar click on the last toolbar button (an icon showing a person with hat). 2) Tru Object repository Dialog ---In Objectrepository dialog click on the button"object spy..." In the Object spy Dialog click on the button showing hand symbol. the pointer now changes in to a hand symbol and we have to point out the object to spy the state of the object if at all the object is not visible..or window is minimised then Hold the Ctrl button and activate the required window to and release the Ctrl button.
13. Give me an example where you have used a COM interface in your QTP project?
com inteface appears in the scenario of front end and back end.for eg:if you r using oracle as back end and front end as VB or any language then for better compatibility we will go for an interface.of which COM wil be one among those intefaces.

14. How do you test oracle application using qtp?
With Help of Below Commands, first u launch the Oracle Applications and then Test with the help of Data Driven and DML and DDL commandsqtApp.Test.Settings.Launchers("Oracle 8i").Active = TrueqtApp.Test.Settings.Launchers("Oracle 8i").CommandLine = qtApp.Test.Settings.Launchers("Oracle 8i").WorkingDirectory =
15. Where is the bitmap chekpoint information saved?
The Bitmap Check Point Information saved in the Below File:C:\Program Files \ Mercury Interactive\Quick Test Professional\Tests\Action Name\Res1

Basic Guidelines and Checklist for Website Testing

Worldwide web is browsed by customers with different knowledge levels, while testing websites (static/Dynamic) QA department should concentrate on various aspects to make effective presentation of website in www.
Ø Functionality
Ø Usability
Ø User Interface
Ø Serverside Interface
Ø Compatibility
Ø Security
Ø Performance

Description :
Ø Functionality :
1.1 Links
Objective is to check for all the links in the website
1.1.1 All Hyperlinks
1.1.2 All Internal links
1.1.3 All External links
1.1.4 All Mail links
1.1.5 Check for orphan pages
1.1.6 Check for Broken links

1.2Forms
Check for the integrity of submission of all forms
1.1.7 All Field level Checks
1.1.8 All Field level Validations
1.1.9 Functionality of create,modify,delete and view
1.1.10 Handling of wrong inputs
1.1.11 Default values if any (standard)
1.1.12 Optional Versus Mandatory fields

1.3 Cookies
Check for the cookies that has to be enabled and how it has to be expired

1.4 Web Indexing
Depending on how the site is designed using metatags, frames, HTMLsyntax, dynamically created pages, passwords or different languages, our site will be searchable in different ways
1.4.1 Meta Tags
1.4.2 Frames
1.4.3 HTML syntax

1.5 Database
Two types of errors that may occur in web application
a) Data Integrity : Missing or wrong data in table
b) Output Errors : Errors In writing ,editing or reading operation in the table

Ø Usability :
How simple customer can browse the website
2.1 Navigation
Navigation describes the way user navigate with in a webpage, between different user interface controls (buttons, text boxes, combo boxes, dropdown lists ...etc)
2.1.1 Application navigation is proper through tab (key board)
2.1.2 Application navigation through mouse
2.1.3 Main features accessible from the main/home page (mother window)
2.1.4 Any hotkeys, control keys to access menus

2.2 Content
Correctness is whether the information is truthful or contains misinformation. The accuracy of the information is whether it is without grammatical or spelling errors. Remove irrelevant information from your site this may otherwise cause misunderstanding or confusion
2.2.1 Spelling and grammar
2.2.2 Updated information (contact details mail IDs help reports)

2.3 General appearance
2.3.1 Page appearance
2.3.2 Colour, font size
2.3.3 Frames
2.3.4 Consistent Designs
2.3.5 Symbols and logos (localization)

User Interface :
All about how exactly website looks like (view)
Basic guidelines for web User interface (Microsoft)
3.1 Verify whether screen resolution been taken in to account while using browser, will the UI resize itself as you maximize/minimize this must be tested with various screen resolutions
3.2 verify whether the number of ‘controls’ per page have been checked, generally 10 is a good number
3.3 Where there are options to choose from, user should be forced to choose from a set of radio buttons and the default should be pointing at default message (none, select one..etc)
3.4 Every dropdown box should have the first choice as NONE (it could be any other meaningful sentence such as ‘Choose one’ or ‘select’
3.5 Ensure persistency of all values, when you enter values in a form, and move on the next page and then return to change one of the previous screen .The users must not be forced to re-enter all the values once again, this must be checked and ensured
3.6 Horizontal scrolling is not preferable in general .Avoid using horizontal scroll bar Ensure that the use of vertical scroll bar is judicious
3.7 Consider the use of pagination where appropriate.
3.8 Ensure that ‘shift click’ ‘control click ‘work in list boxes, clarify these features work in both browsers
3.9 The location of buttons (OK and Cancel) should be at the right hand bottom side of a screen and consistent.
3.10 Clarify whether encryption of the password occurs from your login page all the way to the backend (the login page must not transmit clear –text password)
3.11 Illegal operations should give popup messages (message should be simple & clear)

3.12 Verify if there is a requirement to use image maps in the application (does net scape support this well
3.13 positive popup messages should be displayed (submitted, deleted, updated, done and cleared)
3.14 Ensure that you have multiple check boxes when multiple selections is to be performed
3.15 Avoid long scrolling drop down list make it short
3.16 website URL should be small and simple

Serverside Interface :
4.1 Serverside Interface
4.1.1 Verify that communication is done correctly, web server-application server, application server-database sever and vice versa
4.1.2 Compatibility of server software, hardware, network connections
4.1.3 Database compatibility
4.1.4 External interface if any

Client side Compatibility:
5.1 platforms
Check for the website compatibility with
5.1.1 Windows (95, 98, 2000, NT)
5.1.2 Unix
5.1.3 Linux
5.1.4 Macintosh (if applicable)
5.1.5 Solaris (if applicable)
5.2 Browsers
5.2.1 Internet Explorer (5.x, 6.x)
5.2.2 Netscape Navigator (5.x, 6.x)
5.2.3 AOL
5.2.4 Browser settings (security settings graphics, java etc..)
5.2.5 Frames and cascade style sheets
5.2.6 HTML specification
5.3 Graphics
of images graphics, etc.

Security :
6.1 Valid and invalid login
6.2 limits defined for the number of tries
6.3 Can it be bypassed by typing URL to a page inside directly in the browser?
6.4 verify log files are maintained to store the information for traceability
6.5 verify encryption is done correctly if SSL is used (if applicable)6.6 No access to edit scripts on the server without authorization

Wednesday, August 20, 2008

Product Testing Fundas & FAQ's

Product testing is the process used to identify the correctness, totality, security, and quality of a developed product, be it a software, a website, or anything within the realms of IT. Testing can never completely establish the correctness of arbitrary computer software and in the theory of computability, it is impossible to solve the halting problem, the question of whether an arbitrary computer program will enter an infinite loop, or halt and produce output. In other words, testing is nothing but criticism or comparison, which is comparing the actual value with the expected one.

1. What is the difference between . NET testing & Java testing?

There is not much difference in .Net and Java Testing if you are testing web application only change in particular template level. But if you are testing a dotnet Product or Java Product. Then for testing you required compatible DLL files, mean in general you have make complete Test bed according to technology.
some more explanation i will post in this topic.

Santosh Malvi (Courtesy : geekinterview.com)

2. If you add a new object or a new module for the existing application then how will you test the application?

First we will test the functionality of the new object or new module and then test the new object functionality with respect to other old functionalities in the application (i.e, whether the data flow between the modules are fine or not). And then check out whether any other new bugs which appears due to the new functionality added to the application

Rajagopal

3. What is the difference between testing a product and testing any web -based application?

if product is a client based one then there is difference between this both but if the product is web based then no difference in my view product is build by company and kept for sale as to be sold by customers who needs them and product will be customized as per required changes (if needed) and sold to customer. in sense your question is some what confusing as it should product testing Vs project testing otherwise web testing Vs client server testing

Allabaksh (Courtesy : geekinterview.com)

4. What is the difference between product testing and project testing?

Product testing : Product testing is the branch of engineering concerned with the experimental, developmental, and performance characteristics of product . In other words It is develop by the organization and marketing by the company IT selfs.

Project testing: A project manager drafts a project definition, but its development is a team effort. The definition is an agreement among key participants in a project, and must have input from all of those participants.

In other words project testing is done according to the client requirement. The modification and change has to made according in some case.

Sudhakar kolla

5. What is alpha testing?

A: Alpha testing is final testing before the software is released to the general public. First, (and this is called the first phase of alpha testing), the software is tested by in-house developers. They use either debugger software, or hardware-assisted debuggers. The goal is to catch bugs quickly. Then, (and this is called second stage of alpha testing), the software is handed over to us, the software QA staff, for additional testing in an environment that is similar to the intended use.

6. What is beta testing?

A: Following alpha testing, "beta versions" of the software are released to a group of people, and limited public tests are performed, so that further testing can ensure the product has few bugs. Other times, beta versions are made available to the general public, in order to receive as much feedback as possible. The goal is to benefit the maximum number of future users.

7. What is the difference between alpha and beta testing?

A: Alpha testing is performed by in-house developers and software QA personnel. Beta testing is performed by the public, a few select prospective customers, or the general public.

8. What is the basic difference between Product testing and Application Testing?
Ans: Product testing is just like black box testing in this u no need to test the coding just u wants to see whether the product meets expected with actual but application testing u need some knowledge of software language
(Or)

Clear definition of product is ex: software released to the market Whereas application is also software developed to particular client for his requirements. Whereas a product is in market for all the people needed.
Or

Application is software developed to particular client for his requirements. Whereas a product is for all the people needed.

9. What is SDLC in Product based company?

in product based company there is no question of testing the product in development stage .the complete product would be developed and would be given for QA team for testing. so first comes the stage of development and then when te product is complete then testing and when all the requirements are achieved then the product would be given to the delivery team for release.

Pnaveen (Courtesy : geekinterview.com)

Tuesday, August 19, 2008

Basic Definitions of Testing

What is 'Software Testing'?
Testing involves operation of a system or application under controlled conditions and evaluating the results (e.g., 'if the user is in interface A of the application while using hardware B, and does C, then D should happen'). The controlled conditions should include both normal and abnormal conditions. Testing should intentionally attempt to make things go wrong to determine if things happen when they shouldn't or things don't happen when they should. It is oriented to 'detection'.

What is 'Software Quality Assurance'?

1)Software QA involves the entire software development PROCESS
2) monitoring and improving the process,
3) standards and procedures are followed
4) ensuring that problems are found and dealt with. It is oriented to 'prevention'.

Testing vs. Quality Assurance:

Quality Assurance is the process of making sure that the customers gets enough of what they pay for to satisfy their needs. Testing is the means by which we perform the process. You can test without assuring quality, but you can't assure quality without testing.

What is Quality Control (QC) ?
Consists of monitoring, controlling and other tactical activities associated with the measurement of product quality goals.

What is Verification?
“Verification” checks whether we are building the right system, and Verification typically involves reviews and meetings to evaluate documents, plans, code, requirements, and specifications. This can be done with checklists, issues lists, walkthroughs, and inspection meetings.
What is Validation?

“Validation” checks whether we are building the system right. Validation typically involves actual testing and takes place after verifications are completed