Wednesday, February 06, 2013

Test Cases Example



1.Test Case for ATM

TC 1 :- succesful card insertion.
TC 2 :- unsuccessful operation due to wrong angle card insertion.
TC 3:- unsuccesssful operation due to invalid account card.
TC 4:- successful entry of pin number.
TC 5:- unsuccessful operation due to wrong pin number entered 3 times.
TC 6:- successful selection of language.
TC 7:- successful selection of account type.
TC 8:- unsuccessful operation due to wrong account type selected w/r to that inserted card.
TC 9:- successful selection of withdrawl option.
TC 10:- successful selection of amount.
TC 11:- unsuccessful operation due to wrong denominations.
TC 12:- successful withdrawl operation.
TC 13:- unsuccessful withdrawl operation due to amount greater than possible balance.
TC 14:- unsucceful due to lack of amount in ATM.
TC 15:- un due to amount greater than the day limit.
TC 16:- un due to server down.
TC 17:- un due to click cancel after insert card.
TC 18:- un due to click cancel after insert card and pin no.
TC 19:- un due to click cancel after language selection,account type selection,withdrawl selection, enter amount



Test Cases for Mobile Phone:
1)Chek whether Battery is inserted into mobile properly
2)Chek Switch on/Switchoff of the Mobile
3)Insert the sim into the phone n chek
4)Add one user with name and phone number in Address book
5)Chek the Incoming call
6)chek the outgoing call
7)send/receive messages for that mobile
8)Chek all the numbers/Characters on the phone working fine by clicking on them..
9)Remove the user from phone book n chek removed properly with name and phone number
10)Chek whether Network working fine..
11)If its GPRS enabled chek for the connectivity.



3. Test cases for sending a message through mobile phone (assuming all the scenarios)
1.Check for the availability of the Mobile
2.Check the buttons on the mobile
3.Check the mobile is locked or unlocked
4.Check for the  unlock of the mobile
5.Select the menu
6.Check for the messages in menu
7.Select the messages
8.Check for the write message in messages menu
9.Select the write message
10.Check the buttons writing alphabets
11.Check for the chars  how many u can send
12.Write the message on the write message menu
13.Select the options
14.Select the send
15.Check whether asking for the phone No. of the receiver
16.Select the Search for the receiver Phone No.  if Exits
17.Enter the Phone No. of the receiver
18.Select Ok
19.Check for the request send
4. Test cases for Traffic Signal
1.verify if the traffic lights are having three lights(green,yellow,red)
2.verify that the lights turn on in a sequence
3.verify that lights turn on in a sequence based on time specified(greenlight-4.1min,yellowlight10sec,redlight 1 min)
5.verify that only one light glows at a time
6.verify if the speed of the Traffic light can be accelerated as time specified based on the traffic
7.verify if the traffic lights in some spots are sensor activated.

5.  Test case for 2 way switch
1. Check whether two switches are present.
2. Check whether both switches are connected properly.
3. Check power supplies for both switches.
4. Check on/off conditions are working properly.
5. Check whether any electornic applicace connected to the 2-way switches should not get power supply when both switches are either in on state or off state.
6. Check whether any electornic applicace connected to the 2-way switches should get power supply when one switch is in on state and other is in off state or vice versa.

6. Test cases Elevator
Some of the use cases would be:
1) Elevator is capable of moving up and down.
2) It is stopping at each floor.
3) It moves exactly to that floor when corresponding floor no is pressed.
4) It moves up when called from upward and down when called from downward.
5) It waits until ‘close’ button is pressed.
6) If anyon steps inbetween the door at the time of closing, door should open.
7) No break points exists

8) More usecases for the load that the elevator can carry (if required)

7. Test cases Calculator
1 It should have 9 numeric digits.
2 it should give proper output based on the operation.
3 it should  not allow charactres.
4 it should run from cell or battery not through power supply.
5 it should be small in size.
6 at least it should perform 4 basic operation such as
add,sub.div,mul
8. Test cases Bulb
 
Test cases for bulb 
Check the bulb is req shap and size
Check the bulb is fitted and removed from holder
Check the bulb glow req illumunation r not
Check the bulb it should glow when we switch on 
Check the bulb it should off when we switch off
Check the bulb material
Life of the bulb should meet the reqrmt

9. Test Case for Yahoo Page

1.Testing without entering any username and password
2.Test it only with Username
3.Test it only with password.
4 .User name with wrong password
5. Password with wrong user name
6. Right username and right password
7. Cancel, after entering username and pwd.
8.Enter long username and password that exceeds the set limit of characters.
9.Try copy/paste in the password text box.
10.After successfull sign-out, try “Back” option from your browser. Check whether it gets you to the “signed-in” page.


























































































































































Friday, December 21, 2012

Performance Testing INTERVIEW QUESTIONS

Performance Testing INTERVIEW QUESTIONS

1
What is performance testing?
2
What are the leading performance tools in the market?
3
What are phases involved in performance testing?
4
What is the objective of performance testing?
5
Give me some examples which initiate necessity of performance testing?
6
What are different metrics should be monitored?
7
What version of loadrunner you are using?
8
What are the protocols you are familiar with?
9
What is the difference between URL and HTML mode of recording?
10
What is correlation?
11
What is parameterisation?
12
What are methods you use for correlation?
13
What is the file name of Vugen?
14
Can you syntax for think time?
15
What is the testing environment you worked on?
16
What is the extension of a Vuser Script in loadrunner?
17
Can you write statements for start and end transactions?
18
What is port mapping and how it is useful?
19
what function you use for correlation?
20
How do you perform auto correlation?
21
Can you tell me different types of parameters you worked on?
22
What is the application architecture you worked on?
23
Can you tell me the reason why you correlate?
24
Can you distinguish between Sequential, Random and unique?
25
What are your roles and responsibilities?
26
What is break point and how you use it?
27
What is scan script for correlations and how you work on it?
28
How to do manual correlation?
29
What is protocol advisor and how it is useful?
30
What are different components of loadrunner?
31
What is the difference between think time and pacing?
32
What is action and provide me syntax?
33
What are elements you have in your test plan?
34
What is effort estimation and have you performed it?
35
What is the function you use for outputting a message?
36
What is the purpose of Run step by step?
37
What is the purpose of Regenerate script?
38
Rate for scripting/execution/monitoring
39
What are the different logs available?
40
What is latency?
41
What are different views?
42
How do you handle text checks
43
What does a tree view contains?
44
What are the different windows in output window?
45
What is load balancing?
46
If my replay browser is not displaying how can I make it available to display?
47
What is granularity?
48
How can I increase font size and style of script recorded?
49
What is the difference between POST and GET?
50
Explain me basic functions for string conversions?
51
Give me some functions related to Tool specific?
52
Give me some functions related to web protocol specific?
53
Have you written any custom functions? If any explain those.
54
How do you work on blocks?
55
What is IP Spoofing?
56
What are the files generated after recording?
57
What is the max load of users you tested?
58
What are the files generated after replay?
59
What is the component used for executing tests?
60
How do you identify memory leaks?
61
What are different types of scenarios you configure?
62
What is load generator?
63
What is goal oriented scenario?
64
What are the types of performance tests you encountered with?
65
What is the difference between Run vuser as a thread and Run vuser as a process?
66
If I want run a test with different groups how you can achieve?
67
How do you configure monitors?
68
What is load testing?
69
What is the difference between absolute time and relative time?
70
If you got your response time of transactions greater than SLAs how you proceed?
71
How can I get HMTL report?
72
What is stress testing?
73
What are the different ways of merging the graphs?
74
Can you explain me how loadrunner works?
75
What is Web break down analysis?
76
What are different HTTP Status codes?
77
What is ramp up, ramp down and Steady period?
78
What are the Entry and Exit criteria for performance testing?
79
How can I set a content check rule?
80
What is pacing?
81
What log you use for performing Manual correlation?
82
What is 90th percentile and what is its significance?
83
What is rendezvous point?
84
What are the diagnostic tools you are familiar with?
85
What is throughput?
86
What are the monitoring tools you are familiar with?
87
What is relationship between request/sec and throughput?
88
How do you trace performance bottlenecks?
89
How do you manage defect tracking?
90
Do you have any idea on perfmon?
91
What is spike testing?
92
What are the bottlenecks you identified in your project?
93
Give me some examples of Web and application servers?
94
What is Capacity planning?
95
How to increase the size of data coming for a dynamic page?
96
What is application Benchmarking?
97
What is Volume testing?
98
What is work load profiling and how do you manage it?
99
Why Application architecture is significant for performance testing?
100
If I want to know breakpoint of application which test I should go for?
101
Can you tell me advantages and disadvantages of loadrunner?
102
Give me the some examples of open source performance testing tools?
103
Give me some examples of Database servers?
104
Can you explain the capabilities of loadrunner for performance testing?
105
Which version of loadrunner you are using?
106
If the web application has Ajax scripting in it, which protocol do you suggest?
107
Where can I know the tool licensing information?
108
What are the extensions of results file, scenario file and analysis files?
109
If you don’t know which protocol to go, how you proceed?

D. Bottleneck Identification:
You need to identify bottlenecks caused by poor design or implementation early in the application life cycle. Bottlenecks that cannot be optimized or tuned need to be identified as constraints during the design phase of the life cycle, so that they can be factored in the design to minimize the impact on performance.

What Are Bottlenecks?

A bottleneck is the device or resource that constrains throughput. Most of the time, performance bottlenecks in your application relate to resource issues that may include server resources such as CPU, memory, disk I/O, and network I/O or other external resources such as available database connections or network bandwidth.

Bottlenecks vary from layer to layer, based on the server role:

Web/Application server. Some common causes of bottlenecks include inefficient session and state management, thread contention, long-running calls to a Web service or a database, and chatty interfaces.
Database server. Some common causes for bottlenecks include poor logical database design such as bad table design, improper normalization of tables, inefficient indexes on tables, and badly partitioned data across tables. Other causes include inefficient queries, inappropriate isolation levels used by transactions in queries, and inefficient stored procedures.

How to Identify Bottlenecks

The first step in identifying bottlenecks is to know the different tests and measurements that you must run to simulate varying user loads and access patterns for the application. The following measurements help you to expose bottlenecks and isolate areas that require tuning:

Measure response time, throughput, and resource utilization across user loads.
Measure metrics that help you capture a more granular view of your application.

Measure Response Time, Throughput, and Resource Utilization across User Loads .These metrics help you identify whether you are moving toward or away from your performance goals with each iteration through the tuning process. These also give you a rough idea as to which resource is the first bottleneck for the application, and on which server the bottleneck occurs.

Analyzing Response Time across User Loads

When you measure response times with varying number of users, watch for a sharp rise in response time. This rise is the point of poor efficiency, and performance only degrades from this point onward

Measuring Throughput across User Loads

When you measure throughput across user loads, watch for the peak levels of throughput. At the point where throughput starts to fall, the bottleneck has been hit. Performance continues to degrade from this point onward.

Analyzing Resource Utilization across User Loads

Analyze resource utilization levels across linearly increasing user loads. See whether the resource utilization levels increase at a sharper rate as new users are added and more transactions are performed.

Measure Metrics that Help You Capture a More Granular View of Your Application

Using input from the coarse-grained monitoring of your performance objectives mentioned earlier, you can add additional counters during subsequent iterations of the tuning process. Continuing with the example introduced earlier, if you are performing a remote database call, you can measure the time taken by the database call to complete.

Monitor the metrics related to indexes, locks, number of tables scanned, resource utilization levels, and so forth on the database to identify the reason why the query is taking a long time to execute.

E. Tips and Tricks:

1. Consult your developer if you need help to identify the protocol used by the application.

2. Some other applications, such as antivirus, VPN’s, firewall, and so on may interfere with the recorder. In case of problems, always look to see what is installed on the machine and try to disable software that looks like it is interfering with socket level data.

3. Delete (or comment out) all the “web_add_cookie” statements in the script. Some applications use explicit cookies to keep track of users. Therefore cookies statements have to be commented out otherwise old cookies are sent to the server again and it will not work.

4. Delete all the web_url (…..) statements in start of the script, which are downloading the windows updates or something like that.

5. If you are using the Multiple Protocol recorder, you can use this option of Tools “Regenerate Vuser” to regenerate the script, if the earlier modified script is not working fine.

6. Sometimes, you will encounter cases where the Web recorder (Single and Multi) records some initial login steps but nothing else after that, even though it is still using the HTTP protocol. This can happen if the application is dependent on the cache in some way. By default, LoadRunner recording will disable the cache.

    To set LoadRunner not to interfere with the cache setting, change the following in registry:
a. Go to Start Run, and enter regedit to open the registry editor.
b. Navigate to HKEY_CURRENT_USER\Software\Mercury Interactive\ LoadRunner\ Protocols\
HTTP\Analyzer
c. Set AddNoCacheHeaderToHtml=0.

7. The following are limitations of the Single Protocol Web recorder. If any of the following is causing a problem, you are recommended to switch to use the Multiple Protocol web recorder to record.

Note: All the issues below can be resolved with Multiple Protocol Web recorder.

a. While recording, the Single Protocol Web recorder will redirect the client requests to a local proxy, at localhost: 7777. For such, make sure that you have the permission to change the LAN settings of the machine.
 To verify:
i. Open Internet Explorer and go to Tools Internet Options Connections LAN Settings.
ii. Make sure that you can modify the entries here.
b. The Single Protocol Web recorder obtains the proxy setting from the HKEY_CURRENT_USER registry hive. Verify the following to make sure that it is set up correctly:
i. Go to Start Run, and enter regedit to open the registry editor.
ii. Navigate to HKLM\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\InternetSettings.
iii. Verify the non-default key, ProxySettingsPerUser. If the
 iv. ProxySettingsPerUser value exists and has a value data of 0 (zero), set it to
1. It is okay if you do not have that registry key. As long as ProxySettingsPerUser is not set to one, proxy settings will be obtained from the HKEY_CURRENT_USER registry hive.

1.       To make permanent change in default settings in VuGenerator:

To keep from having to change the run-time settings every time that you create a new script, here is an easy way to save your own default settings.
1. Create a new script
2. Make the setting changes that you need to make.
3. Save the script
4. Now, copy the default.cfg file out of the directory of the script file that you just created to the Program Files\Mercury Interactive\LoadRunner\template\{dir}.
The {dir} is whatever directory that you are creating your scripts from. For example, a Web/HTML vuser directory is the \qtweb\ directory. You can also change the init.c, end.c, or action.c if you seem to always have to make changes to these files every time you create a new script.