Monday, December 15, 2008

Testing Interview Questions

Testing Interview Questions

 

Kinds of Testing


1. Black box testing: not based on any knowledge of internal design or code.Tests are based on requirements and functionality

2. White box testing: based on knowledge of the internal logic of an application’s code. Tests are based on coverage of code statements, branches, paths, and conditions.

3. Unit testing: the most ‘micro’ scale of testing; to test particular functions or code modules. Typically done by the programmer and not by testers, as it requires detailed knowledge of the internal program design and code. Not always easily done unless the application has a well-designed architecture with tight code; may require developing test driver modules or test harnesses.

4. Incremental integration testing: continuous testing of an application as new functionality is added; requires that various aspects of an applications functionality be independent enough to work separately before all parts of the program are completed, or that test drivers be developed as needed; done by programmers or by testers.

6. Integration testing: testing of combined parts of an application to determine if they function together correctly the ‘parts’ can be code modules, individual applications, client and server applications on a networked. This type of testing is especially relevant to client/server and distributed systems.

7. Functional testing: black-box type testing geared to functional requirements of an application; testers should do this type of testing. This does not mean that the programmers should not check their code works before releasing it(which of course applies to any stage of testing).


What is the diff b/w functional testing and integration testing?

A: — functional testing is testing the whole functionality of the system or the application whether it is meeting the functional specifications

Integration testing means testing the functionality of integrated module when two individual modules are integrated for this we use top-down approach and bottom up approach


8. System testing: black –box type testing that is based on overall requirements specifications; covers all combined parts of system.

9. End to end testing: similar to system testing; the ‘macro’ end of the test scale; involves testing of a complete application environment in a situation that mimics real-world use, such as interacting with database, using network communications, or interacting with other hardware, applications, or systems if appropriate.

10. Sanity testing: typically an initial testing effort to determine if a new software version is performing well enough to accept it for a major testing effort. For example, if the new software is crashing systems every 5minutes warrant further testing in item current state.

11. Regression testing: re-testing after fixes or modifications of the software or its environment. It can be difficult to determine how much re-testing is needed, especially near the end of the development cycle. Automated testing tools can be especially useful for this type of testing.


Significance of doing Regression testing?

A:– To check for the bug fixes. And this fix should not disturb other functionality

To Ensure the newly added functionality or existing modified functionality or developer fixed bug arises any new bug or affecting any other side effect. this is called regression test and ensure already PASSED TEST CASES would not arise any new bug.

Why we call it as a regression test nor retest?

A:– If we test whether defect is closed or not i.e Retesting But here we are checking the impact also regression means repeated times

Difference between re testing and regression testing?

A: — Retesting: –

Re-execution of test cases on same application build with different input values is retesting.

Regression Testing:

Re-execution of test cases on modifies form of build is called regression testing…


 

12. Acceptance testing: final testing based on specifications of the end-user or customer, or based on use by end users/customers over some limited period of time.

13. Load testing: testing an application under heavy loads, such as testing of a web site under a range of loads to determine at what point the system’s response time degrades or fails.

Scalability testing comes under in which tool?
A: — Scalability testing comes under performance testing. Load testing, scalability testing both r same.


14. Stress testing: term often used interchangeably with ‘load’ and ‘performance’ testing. Also used to describe such tests as system functional testing while under unusually heavy loads, heavy repletion of certain actions or inputs input of large numerical values, large complex queries to a database system, etc.

15. Performance testing: term often used interchangeable with ‘stress’ and ‘load’ testing. Ideally ‘performance’ testing (and another ‘type’ of testing) is defined in requirements documentation or QA or test plans.

16. Usability testing: testing for ‘user-friendlinesses’. Clearly this is subjective,and will depend on the targeted end-ser or customer. User interviews, surveys, video recording of user sessions, and other techniques can be used programmers and testers are usually not appropriate as usability testers.


17. Install/uninstall testing: testing of full, partial, or upgrade install/uninstall processes.

18. Recovery testing: testing how well a system recovers from crashes, hardware failures or other catastrophic problems.

19. Security testing: testing how well system protects against unauthorized internal or external access, damage, etc, any require sophisticated testing techniques.

20. Compatibility testing: testing how well software performs in a particular hardware/software/operating/system/network/etc environment.


There are no Test Cases for Compatibility Testing; in Compatibility Testing we are Testing an application in different Hardware and software

21. Exploratory testing: often taken to mean a creative, informal software test that is not based on formal test plans of test cases; testers may be learning the software as they test it.

22. Ad-hoc testing: similar to exploratory testing, but often taken to mean that the testers have significant understanding of the software testing it.

   

      AdHoc means doing something which is not planned.

23. User acceptance testing: determining if software is satisfactory to an end-user or customer.

24. Comparison testing: comparing software weakness and strengths to competing products.

25. Alpha testing: testing of an application when development is nearing completion; minor design changes may still be made as a result of such testing. Typically done by end-users or others, not by programmers or testers.

26. Beta testing: testing when development and testing are essentially completed and final bugs and problems need to be found before final release. Typically done by end-users or others, not by programmers or testers.

27. Mutation testing: method for determining if a set of test data or test cases is useful, by deliberately introducing various code changes (‘bugs’) and retesting with the original test data/cases to determine if the ‘bugs’ are detected proper implementation requires large computational resources.


28.Smoke test:Testing the application whether it’s performing its basic functionality properly or not, so that the test team can go ahead with the application


Do you use any automation tool for smoke testing?
A: - Definitely can use.


29.What is Acid Testing??

A: — ACID Means:
ACID testing is related to testing a transaction.
A-Atomicity
C-Consistent
I-Isolation
D-Durable

Mostly this will be done database testing.


#################################################################################################################



Difference between client server testing and web server testing.


Web systems are one type of client/server. The client is the browser, the server is whatever is on the back end (database, proxy, mirror, etc). This differs from so-called “traditional” client/server in a few ways but both systems are a type of client/server. There is a certain client that connects via some protocol with a server (or set of servers).

Also understand that in a strict difference based on how the question is worded, “testing a Web server” specifically is simply testing the functionality and performance of the Web server itself. (For example, I might test if HTTP Keep-Alives are enabled and if that works. Or I might test if the logging feature is working. Or I might test certain filters, like ISAPI. Or I might test some general characteristics such as the load the server can take.) In the case of “client server testing”, as you have worded it, you might be doing the same general things to some other type of server, such as a database server. Also note that you can be testing the server directly, in some cases, and other times you can be testing it via the interaction of a client.

You can also test connectivity in both. (Anytime you have a client and a server there has to be connectivity between them or the system would be less than useful so far as I can see.) In the Web you are looking at HTTP protocols and perhaps FTP depending upon your site and if your server is configured for FTP connections as well as general TCP/IP concerns. In a “traditional” client/server you may be looking at sockets, Telnet, NNTP, etc.

#################################################################################################################

HOW TO TEST A WEBSITE BY MANUAL TESTING?

A: — Web Testing
During testing the websites the following scenarios should be considered.
Functionality
Performance
Usability
Server side interface
Client side compatibility
Security

Functionality:
In testing the functionality of the web sites the following should be tested.
Links
Internal links
External links
Mail links
Broken links
Forms
Field validation
Functional chart
Error message for wrong input
Optional and mandatory fields
Database
Testing will be done on the database integrity.
Cookies
Testing will be done on the client system side, on the temporary internet files.

Performance:
Performance testing can be applied to understand the web site’s scalability, or to benchmark the performance in the environment of third party products such as servers and middle ware for potential purchase.

Connection speed:
Tested over various Networks like Dial up, ISDN etc

Load
What is the no. of users per time?
Check for peak loads & how system behaves.
Large amount of data accessed by user.

Stress
Continuous load
Performance of memory, cpu, file handling etc.

Usability :
Usability testing is the process by which the human-computer interaction characteristics of a system are measured, and weaknesses are identified for correction. Usability can be defined as the degree to which a given piece of software assists the person sitting at the keyboard to accomplish a task, as opposed to becoming an additional impediment to such accomplishment. The broad goal of usable systems is often assessed using several

Criteria:
Ease of learning
Navigation
Subjective user satisfaction
General appearance

Server side interface:
In web testing the server side interface should be tested.
This is done by Verify that communication is done properly.
Compatibility of server with software, hardware, network and database should be tested.
The client side compatibility is also tested in various platforms, using various browsers etc.

Security:
The primary reason for testing the security of an web is to identify potential vulnerabilities and subsequently repair them.
The following types of testing are described in this section:
Network Scanning
Vulnerability Scanning
Password Cracking
Log Review
Integrity Checkers
Virus Detection

Performance Testing
Performance testing is a rigorous usability evaluation of a working system under realistic conditions to identify usability problems and to compare measures such as success
rate, task time and user satisfaction with requirements. The goal of performance testing is not to find bugs, but to eliminate bottlenecks and establish a baseline for future regression testing.

To conduct performance testing is to engage in a carefully controlled process of measurement and analysis. Ideally, the software under test is already stable enough so that this process can proceed smoothly. A clearly defined set of expectations is essential for meaningful performance testing.
For example, for a Web application, you need to know at least two things:
expected load in terms of concurrent users or HTTP connections
acceptable response time

Load testing:
Load testing is usually defined as the process of exercising the system under test by feeding it the largest tasks it can operate with. Load testing is sometimes called volume testing, or longevity/endurance testing
Examples of volume testing:
testing a word processor by editing a very large document
testing a printer by sending it a very large job
testing a mail server with thousands of users mailboxes
Examples of longevity/endurance testing:
testing a client-server application by running the client in a loop against the server over an extended period of time

Goals of load testing:
Expose bugs that do not surface in cursory testing, such as memory management bugs, memory leaks, buffer overflows, etc. Ensure that the application meets the performance baseline established during Performance testing. This is done by running regression tests against the application at a specified maximum load.
Although performance testing and load testing can seen similar, their goals are different. On one hand, performance testing uses load testing techniques and tools for measurement and benchmarking purposes and uses various load levels whereas load testing operates at a predefined load level, the highest load that the system can accept while still functioning properly.

Stress testing:
Stress testing is a form of testing that is used to determine the stability of a given system or entity. This is designed to test the software with abnormal situations. Stress testing attempts to find the limits at which the system will fail through abnormal quantity or frequency of inputs.
Stress testing tries to break the system under test by overwhelming its resources or by taking resources away from it (in which case it is sometimes called negative testing).
The main purpose behind this madness is to make sure that the system fails and recovers gracefully — this quality is known as recoverability.
Stress testing does not break the system but instead it allows observing how the system reacts to failure. Stress testing observes for the following.
Does it save its state or does it crash suddenly?
Does it just hang and freeze or does it fail gracefully?
Is it able to recover from the last good state on restart?

Etc.

Compatability Testing
A Testing to ensure compatibility of an application or Web site with different browsers, OS and hardware platforms. Different versions, configurations, display resolutions, and Internet connect speeds all can impact the behavior of the product and introduce costly and embarrassing bugs. We test for compatibility using real test environments. That is testing how will the system performs in the particular software, hardware or network environment. Compatibility testing can be performed manually or can be driven by an automated functional or reg The purpose of compatibility testing is to reveal issues related to the product& interaction session test suite.with other software as well as hardware. The product compatibility is evaluated by first identifying the hardware/software/browser components that the product is designed to support. Then a hardware/software/browser matrix is designed that indicates the configurations on which the product will be tested. Then, with input from the client, a testing script is designed that will be sufficient to evaluate compatibility between the product and the hardware/software/browser matrix. Finally, the script is executed against the matrix,and any anomalies are investigated to determine exactly where the incompatibility lies.
Some typical compatibility tests include testing your application:
On various client hardware configurations
Using different memory sizes and hard drive space
On various Operating Systems
In different network environments
With different printers and peripherals (i.e. zip drives, USBs, etc.)

#################################################################################################################


 

What are the diff ways to check a date field in a website?

A:– There are different ways like :–
1) you can check the field width for minimum and maximum.
2) If that field only take the Numeric Value then check it’ll only take Numeric no other type.
3) If it takes the date or time then check for other.
4) Same way like Numeric you can check it for the Character,Alpha Numeric aand all.
5) And the most Important if you click and hit the enter key then some time pag e may give the error of javascript, that is the big fault on the page .
6) Check the field for the Null value ..
ETC…………………

The date field we can check in different ways Possitive testing: first we enter the date in given format

Negative Testing: We enter the date in invalid format suppose if we enter date like 30/02/2006 it should display some error message and also we use to check the numeric or text

 

#################################################################################################################

Is automated testing better than manual testing. If so, why?

A:– Automated testing and manual testing have advantages as well as disadvantages
Advantages: It increase the efficiency of testing process speed in process
reliable
Flexible
disadvantage’s
Tools should have compatibility with our development or deployment tools needs lot of time initially If the requirements are changing continuously Automation is not suitable
Manual: If the requirements are changing continuously Manual is suitable Once the build is stable with manual testing then only we go 4 automation
Disadvantages:
It needs lot of time
We can not do some type of testing manually
E.g Performances

 

#################################################################################################################


What do u do if the bug that u found is not accepted by the developer and he is saying its not reproducible. Note:The developer is in the on site location ?

A:– once again we will check that condition with all reasons. then we will attach screen shots with strong reasons. then we will explain to the project manager and also explain to the client when they contact us

Sometimes bug is not reproducible it is because of different environment suppose development team using other environment and you are using different environment at this situation there is chance of bug not reproducing. At this situation please check the environment in the base line documents that is functional documents if the environment which we r using is correct we will raise it as defect We will take screen shots and sends them with test procedure also

#################################################################################################################


What does u mean by Positive and Negative testing & what is the diff’s between them. Can anyone explain with an example?

A: — Positive Testing: Testing the application functionality with valid inputs and verifying that output is correct
Negative testing: Testing the application functionality with invalid inputs and verifying the output.

Difference is nothing but how the application behaves when we enter some invalid inputs suppose if it accepts invalid input the application
Functionality is wrong

Positive test: testing aimed to show that s/w work i.e. with valid inputs. This is also called as “test to pass’
Negative testing: testing aimed at showing s/w doesn’t work. Which is also know as ‘test to fail” BVA is the best example of -ve testing.

#################################################################################################################

What is bug life cycle?
A: — New: when tester reports a defect
Open: when developer accepts that it is a bug or if the developer rejects the defect, then the status is turned into “Rejected”
Fixed: when developer make changes to the code to rectify the bug…
Closed/Reopen: when tester tests it again. If the expected result shown up, it is turned into “Closed” and if the problem resists again, it’s “Reopen

#################################################################################################################

What is deferred status in defect life cycle?
A: — Deferred status means the developer accepted the bus, but it is scheduled to rectify in the next build

#################################################################################################################


What is Verification and validation?

 Verification is static. No code is executed. Say, analysis of requirements etc. Validation is dynamic. Code is executed with scenarios present in test cases.

 What is test plan and explain its contents?

Test plan is a document which contains the scope for testing the application and what to be tested, when to be tested and who to test.

Advantages of automation over manual testing?

Time, resource and Money

#################################################################################################################


QTP Interview Questions



1.Main difference between QTP and Winrunner?

  • QTP supports .NET,SAP
  • QTP uses VBscript while Winrunner uses TSL


2.If requirments changed then how we can teach the QTP this is the new requirment
  I
f there is measure change in GUI or functionality of  application then create new test.
                               OR
If some of objects & it's properties are changed do changes in OR such changing logical name or add/delete 
objects.

3.What's the difference in between function and sub and give 
some code as well?

A Function procedure is a series of VBScript statements enclosed by the Function and End Function statements. A Function procedure is similar to a Sub procedure, but can 
also return a value. A Function procedure can take arguments a Function procedure has no arguments, its Function statement must include an empty set of parentheses.

Function Celsius(fDegrees)
   Celsius = (fDegrees - 32) * 5 / 9
End Function

A Sub procedure is a series of VBScript statements (enclosed by Sub and End Sub statements) that perform actions but don't return a value. A Sub procedure can take 
arguments (constants, variables, or expressions that are passed by a calling procedure). If a Sub procedure has no arguments, its Sub statement must include an empty set of 
parentheses ().

Sub ConvertTemp()
   temp = InputBox("Please enter the temperature in degrees 
F.", 1)
   MsgBox "The temperature is " & Celsius(temp) & " degrees 
C."
End Sub

4.I have a pblm in qtp,im testing an webappl in which different types of error pop up messages are displayed which qtp is not differentiating or it is not recognising.
how do i make it recognise different popup errorm messages 
while writing script?

Use the Recovery manger to diffrentiating the pop up..Here you have two check box options like
1. Window title and Regular expression
2. Window text contains

5.If an application name is changing frequently i.e while recording it has name “Window1” and then while running 
its “Windows2” in this case how does QTP handle?

QTP handle this type situation using "Regular expressions",like :"Windows.*"("*" indicates 0 to many no.s/characters ... in this case 1 2 3 4 5 ........)

Yes..We can handle such situation using the regular expressions.Select "window1" in the script.Goto tools and open the object repository.Select Window1 in the tree that 
gets displayed.In the configure value click the constant value option button and change the value from "window1" to "window.*" and click the Regular expression 


6.What is the BPT(bussiness process testing ).and what is the 
main difference between BPT and QTPcheckbox.

  • "Mercury Business Process Testing" is a complete system for  functional testcase design for both automated and manual testing. It enables non-technical subject-matter experts to become an integral part of the quality optimizationprocess, automates the creation of test-plan documentation, and streamlines test maintenance for application change."QTP(Quick Test Prefessional)" is a functional testing tool, by using this we can do the regression testing also
  • business process testing means first we recording some componenets and we did some enhancement and we bound those componets using QC and we will start running the scripts.In business process testing each script treat as a components nothing else.In QTP one scope ot testing is BPT 
7.What are the designobjects in QTP?
As per my knowlege, there are only two types of objects:
1. Test Objects
2. Run-time object


8.
What are the 5 types of objects in qtp?


QTP supports 6 types of objects:
Standard Windows Object – Methods and Properties within this object can be used for testing standard windows objects

ActiveX Objects – Methods and Properties within this object can be used for testing ActiveX objects

Visual Basic Objects – Methods and Properties within this object can be used for testing Visual Basic objects


Web Objects – Methods and Properties within this object can be used for testing Web Objects

Utility Objects – Methods and Properties within this object can be used for testing Utility Objects

Supplemental Objects - Methods and Properties within this object can be used for testing Supplemental objects

 

9.What is difference between function and procedure?

 

Action is a part of Function.Function is a Like a Functional Test case.Procedure is a process to perform the Different Actions.
Function can return a value procedure cannot return a value.
Difference b/w Action Function in QTP?
Action : 1.when u want to use object repository facility we go for action,(means when the appliction contains objects witch recognied by QTP ) go for Actions is nothing  but mouse moments it will generate the script automatically.  2. it will returns more than one out put values.   Functions : 1 when the objects witch r not recognised by QTP we go for functions(means discriptive program in that those objects is not stored under objectrepository) 2. it will returns only one out put value.
 
10.In QTP what is the difference between Step-in, Step-out, Step-over ?
Step-in:Line by line execution  Step-over:which is used to speed up debugging..we can go with step-over if we know perticular funtion is bug free ex: if script contains a loop means when we use step-over  option the loop wont be executed only the result of the  loop ill be displayed...  step-out:which is similar to step-in ex: if script contains a loop means when we use step-out option the loop will be executed....
11.What are the Latest Feature are added In QTP 9.2?
Block commenting , Check syntax
12.QTP recognizing objects as "string_1","string_2","string_3","string_4" like that but when using FOR LOOP for these.QTP not proceeding further can i declare these _1,_2,_3,_4 as a single variable
As stated in the question that values are changing as "string_1","string_2","string_3","string_4" this is mainly because the index value is changing..  Note : go to repository for string_1 and check the index value , likewise check the index value for string_2 and string_3..check if all three have an oderly increments like  for string_1 the index value in object repository will be 1 and string_2 should be 2.. and so on.  All to need to do is consider one recorded object either srting_1 or string_2 .. or any one amoung the four recorded object .. After loop completed one iteration and moves to  second iteration, jst set the index value of selected object to 1, 2.. and so on ..Use SetTo property method to set the index value ..
13.What is the difference between keyword driven frameworkd and Modularisation framework?
Modular FrameWork: QuickTest Records the operation and executes operation basedon actions, which is consider as  modules.  Keyword FrameWork: Based on a Keyword if we are calling a  function, which is keyword Framework.
Modularity Frame works is Application and System dependent.  Its old and initial method of frame work. It has two components: 1.Generic script 2.Call lib  In generic script has script from theier we calling  call.lib in which we record the application and store it..   Keyword Driven Frame Work. It is advanced one. It is  Application and system independent.  It has four components:  1.Script folder  a)Mani lib  b)call lib  c)proc lib(process library)  d)std lib 2.Repository folder 3.Excel sheet 4.Notepad file
 
 
14.Difference between GetRoProperry and GetToProperty.and where we've to use exactly those properties? 
 
GetToProperty: returns the specific property value from the  test object properties descriptions.  GetRoProperty: returns the current property value of the  object durting the test run.
 
GetRoProperty:--(Get Run Time object Property) At the time of execution, properties of an object may  change. These properties at execution time is called RunTime object property. EG:- x co-ordinate of insert order button should be 125.    (OR)   In some web applications like in Naukri some of  objects are blinking that type of object is run time   (OR)   ScreenSavers.  GetToProperty:-- The property of an object at the time of  learning(recording)
15.Where exactly we can't do the automation testing. give some examples
We can not do the automation testing for the following  scenarios: 1. For the newly build application 2. For Smoke Testing of the application 3. For the application to be tested only once 4. For the application which has to be tested in rush time 5. For UAT
 16.Explain the concept of object repository & how QTP recognises objects?
Object Repository: displays a tree of all objects in the current component or in the current action or entire test( depending on the object repository mode you selected). we can view or modify the test object description of any test object
in the repository or to add new objects to the repository.Quicktest learns the default property values and determines in which test object  class it fits.If it is not enough it adds assistive properties, one by one to the description until it has compiled the unique description.
If no assistive properties are available, then it adds a special Ordianl identifier such as objects location onthe page or in the source code 

 

Object Repository is a storage place where we can store the objects information and it is also act as an interface between the test script and AUT (Application under Test) in order to identify objects during execution 

There are 2 types of Object Repository

1) Per-action: For each and every action separate Object repository is created and is managed by QTP

2) Shared Repositary: Object repositary can be associated to mulitple test, it can be managed manually, advantage of Shared repository is easy to maintain.