Quantcast Job Interview Questions - www.interviewhelper.org: March 2008



Get unlimited interview questions on our new improved website...


 Interview Helper Home | Forum | Submit Link | Online Tickets | Freelance Work | Free Games | Jobs

Monday, March 24, 2008

Infosys Test Paper 5

1. Father's age is three years more than three times the son's age. After three years, father's age will be ten years more than twice the son's age. What is the father's present age.
Ans: 33 years
2. Find the values of each of the alphabets.
N O O N S O O N+ M O O N ---------- J U N E
Ans:
3. There are 20 poles with a constant distance between each pole A car takes 24 second to reach the 12th pole. How much will it take to reach the last pole.
Ans: 41.45 seconds (2 marks) Let the distance between two poles = x Hence 11x:24::19x:?

4. A car is travelling at a uniform speed. The driver sees a milestone showing a 2-digit number. After travelling for an hour the driver sees another milestone with the same digits in reverse order. After another hour the driver sees another milestone containing the same two digits. What is the average speed of the driver.
Ans: 45 kmph (4 marks)

5. The minute and the hour hand of a watch meet every 65 minutes. How much does the watch lose or gain time and by how much?
Ans: Gains; 5/11

6. Ram, Shyam and Gumnaam are friends. Ram is a widower and lives alone and his sister takes care of him. Shyam is a bachelor and his neice cooks his food and looks after his house. Gumnaam is married to Gita and lives in large house in the same town. Gita gives the idea that all of them could stay together in the house and share monthly expenses equally. During their first month of living together, each person contributed Rs.25. At the end of the month, it was found that Rs 92 was the expense so the remaining amount was distributed equally among everyone. The distribution was such that everyone recieved a whole number of Rupees. How much did each person recieve?
Ans. Rs (Hint: Ram's sister, Shyam's neice and Gumnaam's wife are the same person)

7. Four persons A, B, C and D are playing cards. Each person has one card, laid down on the table below him, which has two different colours on either side. The colours visible on the table are Red, Green, Red and Blue. They see the color on the reverse side and give the following comment.
A: Yellow or GreenB: Neither Blue nor GreenC: Blue or YellowD: Blue or Yellow
Given that out of the 4 people 2 always lie find out the colours on the cards each person.

Infosys Test Paper 4

INFOSYS
1) There are two balls touching each other circumferencically.
The radius of the big ball is 4 times the diameter of the small
ball.The outer small ball rotates in anticlockwise direction
circumferencically over the bigger one at the rate of 16 rev/sec.
The bigger wheel also rotates anticlockwise at Nrev/sec. what is
'N' for the horizontal line from the centre of small wheel always
is horizontal.
2) 1 2 3 4
+ 3 4 5 5
----------
4 6 8 9
- 2 3 4 5
----------
2 3 4 4
+ 1 2 5 4
------------
3 6 9 8
Q) Strike off any digit from each number in seven rows (need not
be at same place) and combine the same operations with 3 digit numbers
to get the same addition. After this strike off another digit from all
and add all the No.s to get the same 2 digit No. perform the same
process again with 1 digit No.s. Give the ' no.s in 7 rows at
each stage.
3) there is a safe with a 5 digit No. The 4th digit is 4 greater than
second digit, while 3rd digit is 3 less than 2nd digit. The 1st digit
is thrice the last digit. There are 3 pairs whose sum is 11. Find
the number. Ans) 65292.
4) there are 2 guards Bal and Pal walking on the side of a wall of a
wearhouse(12m X 11m) in opposite directions. They meet at a point and
Bal says to Pal " See you again in the other side". After a few moments
of walking Bal decides to go back for a smoke but he changes his
direction again to his previous one after 10 minutes of walking in
the other(opposite) direction remembering that Pal will be waiting
for to meet.If Bal and Pal walk 8 and 11 feet respectively, how
much distance they would have travelled before meeting again.
5) xxx)xxxxx(xxx
3xx
-------
xxx
x3x
------
xxx
3xx
------
Q) Find the 5 digit No.
Hint: 5 is used atleast once in the calculation.
6) Afly is there 1 feet below the ceiling right across a wall length
is 30m at equal distance from both the ends. There is a spider 1 feet
above floor right across the long wall eqidistant from both the ends.
If the width of the room is 12m and 12m, what distance is to be
travelled by the spider to catch the fly? if it takes the shortest
path.
7) Ramesh sit around a round table with some other men. He has one
rupee more than his right person and this person in turn has 1 rupee
more than the person to his right and so on, Ramesh decided to give
1 rupee to his right & he in turn 2 rupees to his right and 3 rupees
to his right & so on. This process went on till a person has
'no money' to give to his right. At this time he has 4 times the
money to his right person. How many men are there along with Ramesh
and what is the money with poorest fellow.
8)Question related to probabilities of removing the red ball from a
basket,given that two balls are removed from the basket and the other
ball is red. The basket contains blue,red,yellow balls.
9)Venkat has 1boy&2daughters.The product of these children age is 72.
The sum of their ages give the door numberof Venkat.Boy is elder of
three.Can you tell the ages of all the three.
ANALYTICAL
----------
1)L:says all of my other 4 friends have money
M:says that P said that exact one has money
N:says that L said that precisely two have money
O:says that M said that 3 of others have money.
P:Land N said that they have money.
all are liers.Who has money&who doesn't have?
2)A hotel has two,the east wing and the west wing.some east wing rooms
but not all have an ocean view(OV).All WW have a harbour view(HV).The
charge for all rooms is identical, except as follows
* Extra charge for all HV rooms on or above the 3rd floor
Page 2
infotest5
* Extra charge for all OV rooms except those without balcony
* Extra charge for some HV rooms on the first two floor&some EW rooms
without OV but having kitchen facilities. (GRE modrl Test 3-question
1J-22)
3)Post man has a data of name surname door no.pet name of 4 families.
But only one is correct for each family.There are a set of statements
&questions.
4)4 couples have a party.Depending on the set of statements,find who
insulted whom and who is the host of the party.
5)5 women given some of their heights(tall,medium,short)Hair( long,
plainted),stards(Black or Brown), sari,2 medium,2-short.Tall->no
sari.Plainted->medium.Answer the combinations.
1) A person has to go both Northwards&Southwards in search of a job.
He decides to go by the first train he encounters. There are trains for
every 15 min both southwards and northwards. First train towards south is at 6:00 A.M. and that towards North is at 6:10 .If the person arrives at any random time,what is the probability that he gets into a train towards North.
2) A person has his own coach&whenever he goes to railway station he
takes his coach.One day he was supposed to reach the railway station
at 5 O'clock. But he finished his work early and reached at 3O'clock.
Then he rung up his residence and asked to send the coach immediately. He came to know that the coach has left just now to the railway station. He thought that the coach has left just now to the railway station. He thought that he should not waste his time and started moving towards his residence at the speed of 3mi/hr.On the way,he gets the coach and reaches home at 6 o'clock. How far is his residence from railway station.
3)Radha, Geeta& Revathi went for a picnic. After a few days they forgot the date,day and month on which they went to picnic.Radha said that it was on Thursday,May 8 and Geeta said that it was Thursday May10.Revathi said Friday Jun 8.Now one of them told all things wrongly,others one thing wrong and the last two things wrongly. If April 1st is tuesdaywhat is the right day,date and month?

Infosys Test Paper 3

INFOSYS
PART 1
1). A beggr collects cigarette stubs and makes one ful cigarette
with every 7 stubs. Once he gets 49 stubs . How many cigarettes
can he smoke totally.
Ans. 8
2). A soldiar looses his way in a thick jungle at random walks
from his camp but mathematically in an interestingg fashion.
First he walks one mile east then half mile to north. Then 1/4
mile to west, then 1/8 mile to south and so on making a loop.
Finally hoe far he is from his camp and in which direction.
ans: in north and south directions
1/2 - 1/8 + 1/32 - 1/128 + 1/512 - and so on
= 1/2/((1-(-1/4))
similarly in east and west directions
1- 1/4 + 1/16 - 1/64 + 1/256 - and so on
= 1/(( 1- ( - 1/4))
add both the answers
3). hoe 1000000000 can be written as a product of two factors
neither of them containing zeros
Ans 2 power 9 x 5 ppower 9 ( check the answer )
4). Conversation between two mathematcians:
first : I have three childern. Thew pproduct of their ages is 36
.. If you sum their ages . it is exactly same as my neighbour's
door number on my left. The sacond mathematiciaan verfies the
door number and says that the not sufficient . Then the first
says " o.k one more clue is that my youngest is the youngest"
Immmediately the second mathematician answers . Can you aanswer
the questoion asked by the first mathematician?
What are the childeren ages? ans 2 and 3 and 6
5).. Light glows for every 13 seconds . How many times did it
between 1:57:58 and 3:20:47 am
ans : 383 + 1 = 384
6). 500 men are arranged in an array of 10 rows and 50 columns .
ALL tallest among each row aare asked to fall out . And the
shortest among THEM is A. Similarly after resuming that to their
originaal podsitions that the shorteest among each column are
asked to fall out. And the longest among them is B . Now who is
taller among A and B ?
ans A
7). A person spending out 1/3 for cloths , 1/5 of the remsaining
for food and 1/4 of the remaining for travelles is left with
Rs 100/- . How he had in the begining ?
ans RS 250/-
8). there are six boxes containing 5 , 7 , 14 , 16 , 18 , 29
Page 1
infotest4
balls of either red or blue in colour. Some boxes contain only
red balls and others contain only blue . One sales man sold one
box out of them and then he says " I have the same number of red
balls left out as that of blue ". Which box is the one he solds
out ?
Ans : total no of balls = 89 and (89-29 /2 = 60/2 = 30
and also 14 + 16 = 5 + 7 + 18 = 30
9). A chain is broken into three pieces of equal lenths
conttaining 3 links each. It is taken to a backsmith to join into
a single continuous one . How many links are to tobe opened to
make it ?
Ans : 2.
10). Grass in lawn grows equally thickand in a uniform rate. It
takes 24 days for 70 cows and 60 for 30 cows . How many cows can
eat away the same in 96 days.?
Ans : 18 or 19
11). There is a certain four digit number whose fourth digit is
twise the first digit.
Third digit is three more than second digit.
Sum of the first and fourth digits twise the third number.
What was that number ?
Ans : 2034 and 4368
If you qualify in the first part then you have to appear for
the second i.e the following part.
Part 2.
1. From a vessel on the first day, 1/3rd of the liquid
evaporates. On the second day 3/4th of the remaining liquid
evaporates. what fraction of the volume is present at the end of
the II day.
2. an orange galss has orange juice. and white glass has apple
juice. Bothe equal volume 50ml of the orange juice is taken and
poured into the apple juice. 50ml from the white glass is poured
into the orange glass. Of the two quantities, the amount of
apple juice in the orange glass and the amount of orange juice in
the white glass, which one is greater and by how much?
3. there is a 4 inch cube painted on all sides. this is cut
into no of 1 inch cubes. what is the no of cubes which have no
pointed sides.
4. sam and mala have a conversation. sam says i am vertainly not
over 40. mala says i am 38 and you are atleast 5 years older
than me. Now sam says you are atleast 39. all the sattements by
the two are false. How hold are they realy.
5. ram singh goes to his office in the city, every day from his
suburban house. his driver mangaram drops him at the railway
station in the morning and picks him up in the evening. Every
evening ram singh reaches the station at 5 o'clock. mangaram
also reaches at the same time. one day ramsingh started early
from his office and came to the station at 4 o'clock. not
wanting to wait for the car he starts walking home. Mangaram
starts at normal time, picks him up on the way and takes him back
house, half an hour early. how much time did ram singh walk.
6. in a railway station, there are tow trains going. One in the
harbor line and one in the main line, each having a frequency of
10 minutes. the main line service starts at 5 o'clock. the
harbor line starts at 5.02a.m. a man goes to the station every
day to catch the first train. what is the probability of man
catching the first train
7. some people went for vaction. unfortunately it rained for 13
days when they were there. but whenever it rained in the
morning, they had clean afternood and vice versa. In all they
enjoyed 11 morning and 12 afternoons. how many days did they
stay there totally
8. exalator problem repeat
9. a survey was taken among 100 people to firn their preference
of watching t.v. programmes. there are 3 channels. given no of
people who watch
at least channel 1
" " 2
" " 3
no channels at all
atleast channels 1and 3
" " 1 and 2
" " 2 and 3
find the no of people who watched all three.
10. albert and fernandes they have two leg swimming race. both
start from opposite and of the pool. On the first leg, the boys
pass each other at 18 mt from the deep end of the pool. during
the II leg they pass at 10 mt from the shallow end of the pool.
Both go at const speed. but one of them is faster. each boy
rests for 4 sec to see at the end of the i leg. what is the
length of the pool.
11. T H I S Each alphabet stands for one
I S digit, what is the maximum value T
-------------- can take
X F X X
X X U X
--------------
X X N X X
1. an escalator is descending at constant speed. A walks down
and takes 50 steps to reach the bottom. B runs down and takes 90
steps in the same time as A takes 10 steps. how many steps are
visible when the escalator is not operating.
2. every day a cyclist meets a train at a particular crossing.
the road is straight before the crossing and both are traveling
in the same direction. cyclist travels with a speed of 10 Kmph.
One day the cyclist comes late by 25 min. and meets the train 5km
before the crossing. what is the seppd of the train.
3. five persons muckerjee, misra, iyer, patil and sharma, all
take then first or middle names in the full names. There are 4
persons having I or middle name of kumar, 3 persons with mohan, 2
persons withdev and 1 anil.
--Either mukherjee and patil have a I or middle name of dev or
misra and iyer have their I or middle name of dev
--of mukherkjee and misre, either both of them have a first or
middle name of mohan or neither have a first or middle name of
mohan
--either iyer of sharma has a I or middle name of kumar hut not
both.
who has the I or middle name of anil
4. reading comprehension
5. a bird keeper has got Pigeon, M mynas and S sparrows. the
keeper goes for lunch leaving his assistant to watch the birds.
a. suppose p=10, m=5, s=8 when the bird keeper comes back, the
assistant informs the x birds have escaped. the bird keeper
exclaims oh no! all my sparrows are gone. how many birds flew
away.
b. when the bird keeper come back, the assistand told him that
x birds have escaped. the keeper realised that atleast2 sparrows
have escaped. what is minimum no of birds that can escape.
6. select from the five alternatives A,B,C,D,E
AT THE end of each question ,two conditions will be given.
the choices are to filled at follows.
a. if a definete conclusion can be drawn from condition 1
b. if a definete conclusion can be drawn from condition 2
c. if a definete conclusion can be drawn from condition 1 and 2
d. if a definete conclusion can be drawn from condition 1 or 2
e. no conclusion can be drawn using both conditions
7. there are N coins on a table. there are two players A&B.
you can take 1 or 2 coins at a time. the person who takes the
last coin is the loser. a always starts first if N=7
a) A can always win by taking two coins in his first chanse
b) B can win only if A takes two coins in his first chance.
c) B can always win by proper play
d) none of the above
2. A can win by proper play if N is equal to
a) 13 b) 37 c) 22 d) 34 e) 48 ans. e.
3. B can win by proper play if N is equal to
a) 25 b)26 c) 32 d) 41 e) none
4. if N<4,>

Infosys Test Paper 2

--------------------------------------------------------------
1)At 6'o clock clock ticks 6 times. The time between first and
last ticks was 30sec. How much time it takes at 12'o clock.
Ans. 66 sec. 2 marks.
2)Three friends divided some bullets equally. After all of them
shot 4 bullets the total no.of remaining bullets is equal to that of
one has after division. Find the original number divided.
Ans. x x x
x-4 x-4 x-4
3x-12 = x
x= 6
ans is 18 2 marks
3)A ship went on a voyage after 180 miles a plane statrted with 10
times
speed that of the ship. Find the distance when they meet from
starting point.
Ans. 180 + (x/10) = x
x = 20
ans is 180+20=200miles. 2 marks
4) Fill the empty slots.
Three FOOTBALL teams are there. Given below the list of maches.
played won lost draw Goals for Goals against
A 2 2 *0 *0 *7 1
B 2 *0 *1 1 2 4
C 2 *0 *1 *1 3 7
the slots with stars are answers. 4 marks
BC drew with 2-2
A won on B by 2-0
a won on C by 5-1
( YOU HAVE TO FILL THE BLANKS AT APPROPRIATE STAR SYMBOLS.)`
5) There are 3 societies a,b,c. a lent tractors to b and c as many
as they had. After some time b gave as many tractors to a and c
as many as they have. After sometime c did the same thing.
At the end of this transaction each one of them had 24.
Find the tractors each orginally had.
Ans a had 39, b had 21, c had 12, 4 marks
6) There N stations on a railroad. After adding x stations 46 additional
tickets have to be printed. Find N and X.
Ans. let N(N-1) = t;
(N+x)(N+x-1) = t+46;
trail and error method x=2 and N=11 4 marks
7)Given that April 1 is tuesday. a,b,c are 3 persons told that their
farewell party was on
a - may 8, thursday
b - may 10,tuesday
c - june 8, friday
Out of a,b,c one is only correct one of the regarding month,day,date.
Other told two correct and the third person told all wrong.What is
correct date,month,day. 5 marks
(ans may be MAY 10 SUNDAY. check once again)
8)There are 4 parties. df,gs,dl(depositloss),ew ran for a contest.
Anup,Sujit,John made the following statements regarding results.
Anup said either df or ew will definitely win
sujit said he is confident that df will not win
John said he is confident that neither ew nor dl will win
the result has come. only one of the above three has made a correct
statement. Who has made the correct statement and who has won
the contest. 5 marks.
(ans DL )
9)Five people a,b,c,d,e are related to each other. Four of them make
one true statement each as follows.
i) b is my father's brother. (ans. d said this)
ii)e is my mother-in-law. ( b )
iii)c is my son-in-law's brother. ( e )
iv)a is my brother's wife. (c)
10 marks.
10) All members of d are also members of a
All '' e '' d
all '' c '' both a and b
not all '' a are members of d
not all '' d '' e
Some questions on these conditions.(5questions 5 marks)
11)boys are allowed to watch football at c.v.Raman auditorium subjected to conditions.
i)the boy over age 16 can wear overcoat
ii)no boy over age 15 can wear cap
iii)to watch the football either he has to wear overcoat or cap
or both
iv) a boy with an umberella or above 16 or both cannot wear sweater
v) boys must either not watch football or wear sweater.
What is the appearence of the boy who is watching football.
Try to solve this question.................
YOU HAVE TO DO SOME ROUGH WORK FOR EACH QUESTION . IT WILL
CARRY SOME GRACE MARKS.

Infosys Test Paper 1

PAPER CODE Q/C.
----------------------------------------------------------------------
1a) BE * BE = ACB
A,B,C,E ARE NON ZERO NUMBERS FIND B,E.
ANS) B=1 E=9
2) A,B,C,D,E ARE HAVING NUMERICAL VALUES. THERE ARE SOME CONDITIONS
GIVEN
a) A=C <===> B!=E
b) DIFFERENCE BETWEEN A AND C AS SAME AS DIFFERENCE BETWEEN C AND B
AS SAME AS DIFFERENCE BETWEEN A AND D
c) C
D
THEN FIND A,B,C,D,E
3) THERE ARE SIX CARDS IN WHICH IT HAS TWO KING CARDS. ALL CARDS ARE
TURNED DOWN AND TWO CARDS ARE OPENED
a) WHAT IS THE POSSOBILITY TO GET AT LEAST ONE KING.
b) WHAT IS THE POSSIBILITY TO GET TWO KINGS.
4) A PERSON WENT TO A SHOP AND ASKED FOR CHANGE FOR 1.15PAISE.
BUT HE SAID THAT HE COULD NOT ONLY GIVE CHANGE FOR ONE RUPEE.
BUT ALSO FOR 50P,25P,10P AND 5P. WHAT WERE THE COINS HE HAD
ans) 1-->50 4--->10P 1--->25P
5) THERE ARE 3 NURSES AND THEY WORK ALTOGETHER ONLY ONCE IN A WEEK.
NO NURSE IS CALLED TO WORK FOR 3 CONSECUTIVE DAYS.
NURSE 1 IS OFF ON TUESEDAY,THURSDAY AND SUNDAY.
NURSE 2 IS OFF ON SATURDAY.
NURSE 3 IS OFF ON THURSDAY,SUNDAY.
NO TWO NURSES ARE OFF MORE THAN ONCE A WEEK.
FIND THE DAY ON WHICH ALL THE 3 NURSES WERE ON WORK.
6) THERE ARE 5 PERSONS A,B,C,D,E AND EACH IS WEARING A BLOCK OR WHITE
CAP ON HIS HEAD. A PERSON CAN SEE THE CAPS OF THE REMAINING 4 BUT CAN'T SEE HIS OWN CAP. A PERSON WEARING WHITE SAYS TRUE AND WHO WEARS BLOCK SAYS FALSE.
i) A SAYS I SEE 3 WHITES AND 1 BLOCK
ii) B SAYS I SEE 4 BLOCKS
iii) E SAYS I SEE 4 WHITES
iiii) C SAYS I SEE 3 BLOCKS AND 1 WHITE.
NOW FIND THE CAPS WEARED BY A,B,C,D AND E
Answer : Black, Black, White, White, Black
7) THERE ARE TWO WOMEN, KAVITHA AND SHAMILI AND TWO MALES SHYAM,
ARAVIND
WHO ARE MUSICIANS. OUT OF THESE FOUR ONE IS A PIANIST, ONE FLUTIST,
VIOLINIST AND DRUMMER.
i) ACROSS ARAVIND BEATS PIANIST
ii) ACROSS SHYAM IS NOT A FLUTIST
iii) KAVITHA'S LEFT IS A PIANIST
iiii) SHAMILI'S LEFT IS NOT A DRUMMER
V) FLUTIST AND DRUMMER ARE MARRIED.
8) 1/3 ED OF THE CONTENTS OF A CONTAINER EVAPORATED ON THE 1 ST DAY.
3/4 TH OF THE REMAINING CONTENTS OF THE CONTAINER EVAPORATED THE
SECOND DAY. WHAT PART OF THE CONTENTS OF THE CONTAINER ARE LEFT AT
THE END OF THE SECOND DAY. Answer : 1/6
9) A MAN COVERED 28 STEPS IN 30 SECONDS BUT HE DECIDED TO MOVE FAST AN
D
COVERED 34 STEPS IN 18 SECONDS. HOW MANY STEPS ARE THERE ON THE
ESCALATOR WHEN STATIONARY. Answer : 43
10) ALL FAIR SKINNED, RICH, HANDSOME, MUSCULAR, LEAN AND EMPLOYED ARE
TALL MEN
1) ALL LEAN MEN ARE MUSCULAR.
2) NO FAIRSKINNED PERSON WHO IS NOT RICH IS HANDSOME.
3) SOME MUSCULAR MEN ARE HANDSOME.
4) ALL HANDSOME ARE FAIRSKINNED.
5) NO PERSON WHO IS NEITHER FAIR SKINNED NOR MUSCULAR IS ENPLYED.
6) we unable to recall this condition and question also incomplete

Sunday, March 23, 2008

Operating System Questions

Following are a few basic questions that cover the essentials of OS:

1. What is the difference between Swapping and Paging?

Swapping: Whole process is moved from the swap device to the main memory for execution.Process size must be less than or equal to the available main memory.It is easier to implementation and overhead to the system.Swapping system does not handle the memory more flexibly as compated to the paging systems.
Paging:Only the required memory pages are moved to main memory from the swap device for execution. Process size does not matter. Gives the concept of the virtual memory.

It provides greater flexibility in mapping the virtual address space into the physical memory of the machine. Allows more number of processes to fit in the main memory simultaneously. Allows the greater process size than the available physical memory. Demand paging systems handle the memory more flexibly.

2. What is major difference between the Historic Unix and the new BSD release of Unix System V in terms of Memory Management?

Historic Unix uses Swapping - entire process is transferred to the main memory from the swap device, whereas the Unix System V uses Demand Paging - only the part of the process is moved to the main memory. Historic Unix uses one Swap Device and Unix System V allow multiple Swap Devices.

3. What is the main goal of the Memory Management?

· It decides which process should reside in the main memory,

· Manages the parts of the virtual address space of a process which is non-core resident,

· Monitors the available main memory and periodically write the processes into the swap device to provide more processes fit in the main memory simultaneously.

4. What is a Map?

A Map is an Array, which contains the addresses of the free space in the swap device that are allocatable resources, and the number of the resource units available there.

This allows First-Fit allocation of contiguous blocks of a resource. Initially the Map contains one entry - address (block offset from the starting of the swap area) and the total number of resources.

Kernel treats each unit of Map as a group of disk blocks. On the allocation and freeing of the resources Kernel updates the Map for accurate information.

5. What scheme does the Kernel in Unix System V follow while choosing a swap device among the multiple swap devices?

Kernel follows Round Robin scheme choosing a swap device among the multiple swap devices in Unix System V.

6. What is a Region?

A Region is a continuous area of a process’s address space (such as text, data and stack). The kernel in a ‘Region Table’ that is local to the process maintains region. Regions are sharable among the process.

7. What are the events done by the Kernel after a process is being swapped out from the main memory?

When Kernel swaps the process out of the primary memory, it performs the following:

Ø Kernel decrements the Reference Count of each region of the process. If the reference count becomes zero, swaps the region out of the main memory,

Ø Kernel allocates the space for the swapping process in the swap device,

Ø Kernel locks the other swapping process while the current swapping operation is going on,

Ø The Kernel saves the swap address of the region in the region table.

8. Is the Process before and after the swap are the same? Give reason.

Process before swapping is residing in the primary memory in its original form. The regions (text, data and stack) may not be occupied fully by the process, there may be few empty slots in any of the regions and while swapping Kernel do not bother about the empty slots while swapping the process out.

After swapping the process resides in the swap (secondary memory) device. The regions swapped out will be present but only the occupied region slots but not the empty slots that were present before assigning.

While swapping the process once again into the main memory, the Kernel referring to the Process Memory Map, it assigns the main memory accordingly taking care of the empty slots in the regions.

9. What do you mean by u-area (user area) or u-block?

This contains the private data that is manipulated only by the Kernel. This is local to the Process, i.e. each process is allocated a u-area.

10. What are the entities that are swapped out of the main memory while swapping the process out of the main memory?

All memory space occupied by the process, process’s u-area, and Kernel stack are swapped out, theoretically.

Practically, if the process’s u-area contains the Address Translation Tables for the process then Kernel implementations do not swap the u-area.

11. What is Fork swap?

fork() is a system call to create a child process. When the parent process calls fork() system call, the child process is created and if there is short of memory then the child process is sent to the read-to-run state in the swap device, and return to the user state without swapping the parent process. When the memory will be available the child process will be swapped into the main memory.

12. What is Expansion swap?

At the time when any process requires more memory than it is currently allocated, the Kernel performs Expansion swap. To do this Kernel reserves enough space in the swap device. Then the address translation mapping is adjusted for the new virtual address space but the physical memory is not allocated. At last Kernel swaps the process into the assigned space in the swap device. Later when the Kernel swaps the process into the main memory this assigns memory according to the new address translation mapping.

13. How the Swapper works?

The swapper is the only process that swaps the processes. The Swapper operates only in the Kernel mode and it does not uses System calls instead it uses internal Kernel functions for swapping. It is the archetype of all kernel process.

14. What are the processes that are not bothered by the swapper? Give Reason.

Ø Zombie process: They do not take any up physical memory.

Ø Processes locked in memories that are updating the region of the process.

Ø Kernel swaps only the sleeping processes rather than the ‘ready-to-run’ processes, as they have the higher probability of being scheduled than the Sleeping processes.

15. What are the requirements for a swapper to work?

The swapper works on the highest scheduling priority. Firstly it will look for any sleeping process, if not found then it will look for the ready-to-run process for swapping. But the major requirement for the swapper to work the ready-to-run process must be core-resident for at least 2 seconds before swapping out. And for swapping in the process must have been resided in the swap device for at least 2 seconds. If the requirement is not satisfied then the swapper will go into the wait state on that event and it is awaken once in a second by the Kernel.

16. What are the criteria for choosing a process for swapping into memory from the swap device?

The resident time of the processes in the swap device, the priority of the processes and the amount of time the processes had been swapped out.

17. What are the criteria for choosing a process for swapping out of the memory to the swap device?

Ø The process’s memory resident time,

Ø Priority of the process and

Ø The nice value.

18. What do you mean by nice value?

Nice value is the value that controls {increments or decrements} the priority of the process. This value that is returned by the nice () system call. The equation for using nice value is:

Priority = (“recent CPU usage”/constant) + (base- priority) + (nice value)

Only the administrator can supply the nice value. The nice () system call works for the running process only. Nice value of one process cannot affect the nice value of the other process.

19. What are conditions on which deadlock can occur while swapping the processes?

· All processes in the main memory are asleep.

· All ‘ready-to-run’ processes are swapped out.

· There is no space in the swap device for the new incoming process that are swapped out of the main memory.

· There is no space in the main memory for the new incoming process.

20. What are conditions for a machine to support Demand Paging?

· Memory architecture must based on Pages,

· The machine must support the ‘restartable’ instructions.

21. What is ‘the principle of locality’?

It’s the nature of the processes that they refer only to the small subset of the total data space of the process. i.e. the process frequently calls the same subroutines or executes the loop instructions.

22. What is the working set of a process?

The set of pages that are referred by the process in the last ‘n’, references, where ‘n’ is called the window of the working set of the process.

23. What is the window of the working set of a process?

The window of the working set of a process is the total number in which the process had referred the set of pages in the working set of the process.

24. What is called a page fault?

Page fault is referred to the situation when the process addresses a page in the working set of the process but the process fails to locate the page in the working set. And on a page fault the kernel updates the working set by reading the page from the secondary device.

25. What are data structures that are used for Demand Paging?

Kernel contains 4 data structures for Demand paging. They are,

Ø Page table entries,

Ø Disk block descriptors,

Ø Page frame data table (pfdata),

Ø Swap-use table.

What are the bits that support the demand paging?

Valid, Reference, Modify, Copy on write, Age. These bits are the part of the page table entry, which includes physical address of the page and protection bits.

Page address AgeCopy on writeModifyReferenceValidProtection

How the Kernel handles the fork() system call in traditional Unix and in the System V Unix, while swapping?

Kernel in traditional Unix, makes the duplicate copy of the parent’s address space and attaches it to the child’s process, while swapping. Kernel in System V Unix, manipulates the region tables, page table, and pfdata table entries, by incrementing the reference count of the region table of shared regions.

Difference between the fork() and vfork() system call?

During the fork() system call the Kernel makes a copy of the parent process’s address space and attaches it to the child process.

But the vfork() system call do not makes any copy of the parent’s address space, so it is faster than the fork() system call. The child process as a result of the vfork() system call executes exec() system call. The child process from vfork() system call executes in the parent’s address space (this can overwrite the parent’s data and stack ) which suspends the parent process until the child process exits.

What is BSS(Block Started by Symbol)?

A data representation at the machine level, that has initial values when a program starts and tells about how much space the kernel allocates for the un-initialized data. Kernel initializes it to zero at run-time.

What is Page-Stealer process?

This is the Kernel process that makes rooms for the incoming pages, by swapping the memory pages that are not the part of the working set of a process. Page-Stealer is created by the Kernel at the system initialization and invokes it throughout the lifetime of the system. Kernel locks a region when a process faults on a page in the region, so that page stealer cannot steal the page, which is being faulted in.

Name two paging states for a page in memory?

The two paging states are:

· The page is aging and is not yet eligible for swapping,

· The page is eligible for swapping but not yet eligible for reassignment to other virtual address space.

What are the phases of swapping a page from the memory?

· Page stealer finds the page eligible for swapping and places the page number in the list of pages to be swapped.

· Kernel copies the page to a swap device when necessary and clears the valid bit in the page table entry, decrements the pfdata reference count, and places the pfdata table entry at the end of the free list if its reference count is 0.

What is page fault? Its types?

Page fault refers to the situation of not having a page in the main memory when any process references it.

There are two types of page fault :

· Validity fault,

· Protection fault.

In what way the Fault Handlers and the Interrupt handlers are different?

Fault handlers are also an interrupt handler with an exception that the interrupt handlers cannot sleep. Fault handlers sleep in the context of the process that caused the memory fault. The fault refers to the running process and no arbitrary processes are put to sleep.

What is validity fault?

If a process referring a page in the main memory whose valid bit is not set, it results in validity fault.

The valid bit is not set for those pages:

· that are outside the virtual address space of a process,

· that are the part of the virtual address space of the process but no physical address is assigned to it.

What does the swapping system do if it identifies the illegal page for swapping?

If the disk block descriptor does not contain any record of the faulted page, then this causes the attempted memory reference is invalid and the kernel sends a “Segmentation violation” signal to the offending process. This happens when the swapping system identifies any invalid memory reference.

What are states that the page can be in, after causing a page fault?

· On a swap device and not in memory,

· On the free page list in the main memory,

· In an executable file,

· Marked “demand zero”,

· Marked “demand fill”.

In what way the validity fault handler concludes?

· It sets the valid bit of the page by clearing the modify bit.

· It recalculates the process priority.

At what mode the fault handler executes?

At the Kernel Mode.

What do you mean by the protection fault?

Protection fault refers to the process accessing the pages, which do not have the access permission. A process also incur the protection fault when it attempts to write a page whose copy on write bit was set during the fork() system call.

How the Kernel handles the copy on write bit of a page, when the bit is set?

In situations like, where the copy on write bit of a page is set and that page is shared by more than one process, the Kernel allocates new page and copies the content to the new page and the other processes retain their references to the old page. After copying the Kernel updates the page table entry with the new page number. Then Kernel decrements the reference count of the old pfdata table entry.

In cases like, where the copy on write bit is set and no processes are sharing the page, the Kernel allows the physical page to be reused by the processes. By doing so, it clears the copy on write bit and disassociates the page from its disk copy (if one exists), because other process may share the disk copy. Then it removes the pfdata table entry from the page-queue as the new copy of the virtual page is not on the swap device. It decrements the swap-use count for the page and if count drops to 0, frees the swap space.

For which kind of fault the page is checked first?

The page is first checked for the validity fault, as soon as it is found that the page is invalid (valid bit is clear), the validity fault handler returns immediately, and the process incur the validity page fault. Kernel handles the validity fault and the process will incur the protection fault if any one is present.

In what way the protection fault handler concludes?

After finishing the execution of the fault handler, it sets the modify and protection bits and clears the copy on write bit. It recalculates the process-priority and checks for signals.

How the Kernel handles both the page stealer and the fault handler?

The page stealer and the fault handler thrash because of the shortage of the memory. If the sum of the working sets of all processes is greater that the physical memory then the fault handler will usually sleep because it cannot allocate pages for a process. This results in the reduction of the system throughput because Kernel spends too much time in overhead, rearranging the memory in the frantic pace.


Explain the concept of Reentrancy.

It is a useful, memory-saving technique for multiprogrammed timesharing systems. A Reentrant Procedure is one in which multiple users can share a single copy of a program during the same period. Reentrancy has 2 key aspects: The program code cannot modify itself, and the local data for each user process must be stored separately. Thus, the permanent part is the code, and the temporary part is the pointer back to the calling program and local variables used by that program. Each execution instance is called activation. It executes the code in the permanent part, but has its own copy of local variables/parameters. The temporary part associated with each activation is the activation record. Generally, the activation record is kept on the stack.

Note: A reentrant procedure can be interrupted and called by an interrupting program, and still execute correctly on returning to the procedure.

Explain Belady's Anomaly.

Also called FIFO anomaly. Usually, on increasing the number of frames allocated to a process' virtual memory, the process execution is faster, because fewer page faults occur. Sometimes, the reverse happens, i.e., the execution time increases even when more frames are allocated to the process. This is Belady's Anomaly. This is true for certain page reference patterns.

What is a binary semaphore? What is its use?

A binary semaphore is one, which takes only 0 and 1 as values. They are used to implement mutual exclusion and synchronize concurrent processes.

What is thrashing?

It is a phenomenon in virtual memory schemes when the processor spends most of its time swapping pages, rather than executing instructions. This is due to an inordinate number of page faults.

List the Coffman's conditions that lead to a deadlock.

· Mutual Exclusion: Only one process may use a critical resource at a time.

· Hold & Wait: A process may be allocated some resources while waiting for others.

· No Pre-emption: No resource can be forcible removed from a process holding it.

· Circular Wait: A closed chain of processes exist such that each process holds at least one resource needed by another process in the chain.

What are short-, long- and medium-term scheduling?

Long term scheduler determines which programs are admitted to the system for processing. It controls the degree of multiprogramming. Once admitted, a job becomes a process.

Medium term scheduling is part of the swapping function. This relates to processes that are in a blocked or suspended state. They are swapped out of real-memory until they are ready to execute. The swapping-in decision is based on memory-management criteria.

Short term scheduler, also know as a dispatcher executes most frequently, and makes the finest-grained decision of which process should execute next. This scheduler is invoked whenever an event occurs. It may lead to interruption of one process by preemption.

What are turnaround time and response time?

Turnaround time is the interval between the submission of a job and its completion. Response time is the interval between submission of a request, and the first response to that request.

What are the typical elements of a process image?

· User data: Modifiable part of user space. May include program data, user stack area, and programs that may be modified.

· User program: The instructions to be executed.

· System Stack: Each process has one or more LIFO stacks associated with it. Used to store parameters and calling addresses for procedure and system calls.

· Process control Block (PCB): Info needed by the OS to control processes.

What is the Translation Lookaside Buffer (TLB)?

In a cached system, the base addresses of the last few referenced pages is maintained in registers called the TLB that aids in faster lookup. TLB contains those page-table entries that have been most recently used. Normally, each virtual memory reference causes 2 physical memory accesses-- one to fetch appropriate page-table entry, and one to fetch the desired data. Using TLB in-between, this is reduced to just one physical memory access in cases of TLB-hit.

What is the resident set and working set of a process?

Resident set is that portion of the process image that is actually in real-memory at a particular instant. Working set is that subset of resident set that is actually needed for execution. (Relate this to the variable-window size method for swapping techniques.)

When is a system in safe state?

The set of dispatchable processes is in a safe state if there exists at least one temporal order in which all processes can be run to completion without resulting in a deadlock.

What is cycle stealing?

We encounter cycle stealing in the context of Direct Memory Access (DMA). Either the DMA controller can use the data bus when the CPU does not need it, or it may force the CPU to temporarily suspend operation. The latter technique is called cycle stealing. Note that cycle stealing can be done only at specific break points in an instruction cycle.

What is meant by arm-stickiness?

If one or a few processes have a high access rate to data on one track of a storage disk, then they may monopolize the device by repeated requests to that track. This generally happens with most common device scheduling algorithms (LIFO, SSTF, C-SCAN, etc). High-density multisurface disks are more likely to be affected by this than low density ones.

What are the stipulations of C2 level security?

C2 level security provides for:

· Discretionary Access Control

· Identification and Authentication

· Auditing

· Resource reuse

What is busy waiting?

The repeated execution of a loop of code while waiting for an event to occur is called busy-waiting. The CPU is not engaged in any real productive activity during this period, and the process does not progress toward completion.

Explain the popular multiprocessor thread-scheduling strategies.

· Load Sharing: Processes are not assigned to a particular processor. A global queue of threads is maintained. Each processor, when idle, selects a thread from this queue. Note that load balancing refers to a scheme where work is allocated to processors on a more permanent basis.

· Gang Scheduling: A set of related threads is scheduled to run on a set of processors at the same time, on a 1-to-1 basis. Closely related threads / processes may be scheduled this way to reduce synchronization blocking, and minimize process switching. Group scheduling predated this strategy.

· Dedicated processor assignment: Provides implicit scheduling defined by assignment of threads to processors. For the duration of program execution, each program is allocated a set of processors equal in number to the number of threads in the program. Processors are chosen from the available pool.

· Dynamic scheduling: The number of thread in a program can be altered during the course of execution.

When does the condition 'rendezvous' arise?

In message passing, it is the condition in which, both, the sender and receiver are blocked until the message is delivered.

What is a trap and trapdoor?

Trapdoor is a secret undocumented entry point into a program used to grant access without normal methods of access authentication. A trap is a software interrupt, usually the result of an error condition.

What are local and global page replacements?

Local replacement means that an incoming page is brought in only to the relevant process' address space. Global replacement policy allows any page frame from any process to be replaced. The latter is applicable to variable partitions model only.

Define latency, transfer and seek time with respect to disk I/O.

Seek time is the time required to move the disk arm to the required track. Rotational delay or latency is the time it takes for the beginning of the required sector to reach the head. Sum of seek time (if any) and latency is the access time. Time taken to actually transfer a span of data is transfer time.

Describe the Buddy system of memory allocation.

Free memory is maintained in linked lists, each of equal sized blocks. Any such block is of size 2^k. When some memory is required by a process, the block size of next higher order is chosen, and broken into two. Note that the two such pieces differ in address only in their kth bit. Such pieces are called buddies. When any used block is freed, the OS checks to see if its buddy is also free. If so, it is rejoined, and put into the original free-block linked-list.

What is time-stamping?

It is a technique proposed by Lamport, used to order events in a distributed system without the use of clocks. This scheme is intended to order events consisting of the transmission of messages. Each system 'i' in the network maintains a counter Ci. Every time a system transmits a message, it increments its counter by 1 and attaches the time-stamp Ti to the message. When a message is received, the receiving system 'j' sets its counter Cj to 1 more than the maximum of its current value and the incoming time-stamp Ti. At each site, the ordering of messages is determined by the following rules: For messages x from site i and y from site j, x precedes y if one of the following conditions holds....(a) if Ti (b) if Ti=Tj and i

How are the wait/signal operations for monitor different from those for semaphores?

If a process in a monitor signal and no task is waiting on the condition variable, the signal is lost. So this allows easier program design. Whereas in semaphores, every operation affects the value of the semaphore, so the wait and signal operations should be perfectly balanced in the program.

In the context of memory management, what are placement and replacement algorithms?

Placement algorithms determine where in available real-memory to load a program. Common methods are first-fit, next-fit, best-fit. Replacement algorithms are used when memory is full, and one process (or part of a process) needs to be swapped out to accommodate a new program. The replacement algorithm determines which are the partitions to be swapped out.

In loading programs into memory, what is the difference between load-time dynamic linking and run-time dynamic linking?

For load-time dynamic linking: Load module to be loaded is read into memory. Any reference to a target external module causes that module to be loaded and the references are updated to a relative address from the start base address of the application module.

With run-time dynamic loading: Some of the linking is postponed until actual reference during execution. Then the correct module is loaded and linked.

What are demand- and pre-paging?

With demand paging, a page is brought into memory only when a location on that page is actually referenced during execution. With pre-paging, pages other than the one demanded by a page fault are brought in. The selection of such pages is done based on common access patterns, especially for secondary memory devices.

Paging a memory management function, while multiprogramming a processor management function, are the two interdependent?

Yes.

What is page cannibalizing?

Page swapping or page replacements are called page cannibalizing.

What has triggered the need for multitasking in PCs?

· Increased speed and memory capacity of microprocessors together with the support fir virtual memory and

· Growth of client server computing

What are the four layers that Windows NT have in order to achieve independence?

· Hardware abstraction layer

· Kernel

· Subsystems

· System Services.

What is SMP?

To achieve maximum efficiency and reliability a mode of operation known as symmetric multiprocessing is used. In essence, with SMP any process or threads can be assigned to any processor.

What are the key object oriented concepts used by Windows NT?

· Encapsulation

· Object class and instance

Is Windows NT a full blown object oriented operating system? Give reasons.

No Windows NT is not so, because its not implemented in object oriented language and the data structures reside within one executive component and are not represented as objects and it does not support object oriented capabilities .

What is a drawback of MVT?

It does not have the features like

· ability to support multiple processors

· virtual storage

· source level debugging

What is process spawning?

When the OS at the explicit request of another process creates a process, this action is called process spawning.

How many jobs can be run concurrently on MVT?

15 jobs

List out some reasons for process termination.

· Normal completion

· Time limit exceeded

· Memory unavailable

· Bounds violation

· Protection error

· Arithmetic error

· Time overrun

· I/O failure

· Invalid instruction

· Privileged instruction

· Data misuse

· Operator or OS intervention

· Parent termination.

What are the reasons for process suspension?

· swapping

· interactive user request

· timing

· parent process request

What is process migration?

It is the transfer of sufficient amount of the state of process from one machine to the target machine

What is mutant?

In Windows NT a mutant provides kernel mode or user mode mutual exclusion with the notion of ownership.

What is an idle thread?

The special thread a dispatcher will execute when no ready thread is found.

What is FtDisk?

It is a fault tolerance disk driver for Windows NT.

What are the possible threads a thread can have?

· Ready

· Standby

· Running

· Waiting

· Transition

· Terminated.

What are rings in Windows NT?

Windows NT uses protection mechanism called rings provides by the process to implement separation between the user mode and kernel mode.

What is Executive in Windows NT?

In Windows NT, executive refers to the operating system code that runs in kernel mode.

What are the sub-components of I/O manager in Windows NT?

· Network redirector/ Server

· Cache manager.

· File systems

· Network driver

· Device driver

What are DDks? Name an operating system that includes this feature.

DDks are device driver kits, which are equivalent to SDKs for writing device drivers. Windows NT includes DDks.

What level of security does Windows NT meets?

C2 level security.

Friday, March 21, 2008

CTS Interview Questions Part 6

SECTION I - 8 questions.
Series.
1. Interchange of letters in a word and the adjacent letters are also to
be changed. given letters series like [also few condotions]
AAABBB=
ABABAB=
LET QUESTION IS ABBAAB
If we apply 25 on this it means we have to interchange the letters
at positions 2 and 5, and we have to change the adjacent letters 2 and 5
from A to B and B to A.
That is q's A B B A A B
after Step 1 i.e interchange 2 and 5.

now change adjacent elements of 2 and 5...finally answer becomes
Ans: B A A B B A

//Hint: As per question papers 5 questions above like but numbers
change.

REMAINING 3 QUESTIONS:
6. To get AAABBD from BBBAAA what ot apply:-
a) 25 b) 34 c)25 & 34 d) none


SECTION II
1. Given the function f(n a b c ) = ac if n=1
f(n a b c) = f( n-1 a b c) + f( 1 a b c) + f( n-1 b a c )
if n > 1
f( 2) = ?
Ans: f( 2 a c b ) = ab + ac + bc.

2. similar question in functions.
3. [ based on function in 1.] f( 4 a b c ) the number of terms is...?
Ans: f( 4 a b c ) = f( 3 a c b ) + f( 1 a b c ) + f( 3 b a c ) etc.
= 5ab + 5ac + 5bc.
4. f( 5 a b c ) = ?

Any number of flags can be accommodated on any single pole.
i) r=5,n=5 The no. of ways the flags can be arranged ?
ii) to iv) are based on this.

6. r= 5 n = 3 . If first pole has 2 flags ,third pole has 1 flag
how many ways the remaining can be arranged?
7.& 8. same as above.

SECTION IV
Question consising of figures consist of 4 small squares and every square
having an arrow pointing in one Direction.

GRE test of reasoning.
hint: What is the next sequence if we tilt the figure by 90 degrees like
that( clockwise and mirror images ? ).

SECTION V
In this section first part of compound word is given. Select meaning of
the second part from the choice given:
1. Swan
2. Swans
3. Fool
4. Fools
5. Stare
6. Lady
For all above 4 choices are given.....
Eg. Swan
a) category b) music c) --- d) none
Ans: Swansong is compound word. But song is not given as option. so
b) music is answer.

TS 99 PAPER .
*This paper contains 40 questions and time is 60mts.*/

CTS -REC'99(TRICHY)

SECTION-1:

Find the sequence:
( d is always NONE )

1. BC CE EG GK ?
a)KN b)KU c)KM d)..
2. AA AB BC CE?
a)EG b)EH c)EI d)
3. AB EF JK QR ?
a)YZ b)ZA c)AB d)
4.ACD EGL IKT MOB?
a)QST b)QSZ c)QSY d)
5.AC CG GO OE?
a)EJ b)EI c)EL d)
6.AE BH CM DU?
a)EH b)EZ c) EB d)
7. AD DP PL LV
a)VS b)VK c)VI d)
8. SE QU EN TI?
a)CN b)BM c)AI or AZ d)

SECTION-II:

FIND THE VALUES FOR FOLLOWING PROBLEM:
F(X)= 2X-1 + f(X-1) if X NOT EQUAL TO ZERO
if f(X=0)=0
9. f(5) VALUE
a)15 b)24 c)22 d)NONE
10.f(f(2))

11.f(16)- f(15)

12.f(16)+f(15)-480

13.f(f(x))=81 THEN VALUE OF X=

14.f(X)=4f(X-1) THEN VALUE OF X=

15.f(X)= f(X-1)+f(X-2) FOR X>1 THEN X=

16.f(X)-f(X-1)=f(X-8) FOR X>5 THEN X=


SECTION -III:

###In the follwing questins we r giving 'aword' which may not have any
meaning.Find differnet possible words or palandrams for the word as per que.
I. for the following find no of distinct words that can be formed.
17. TYGHHTT
A).420 B)1540 C)840 D)NONE
18. TYGHHTY
19. TYGHHTT
20. TYGHHTT
21. TYGHASD
22. TYGHHTY
II Find NO OF POSSIBLE PALANDRAMS for following
23. TYGHHTY
24. TYHHHTYH.
/*dEAR FRIENDS DON,T CONFUSE WITH THE WORDS REPEATED.Iam sure.Words are
same.They might have changed the questionsfor20,21,22.Concentrate on that
respect*/
25 to 32 are figures.Uhave to analyse them.He will give five figs.One is not
correct
SECTION IV:
It having complete of figs.(26 -32)
SECTION -V:

For following first find out the anagram and then note the corresponding
meaning.
33.TABLET(anagram means first u arrange the letters in correct order like
(TABLET===BATTLE . so ans is FIGHT i.e. B)
34.RUGGED
35.GORE.
36.STASSI.
For all above choices are.
A) resentment B)Fight c)Help d) Monster
37. ENFOLD
38. LAMB
39. RECEDE.
40. PLEASE.
For above 4 choices are same
A)cuddle B)sleeping c)proclamination d)ointment.

CTS Interview Questions Part 5

There are 60 questions to be answered in 60 minutes

1) In a club there are certain no. of males and females. If 15 females are absent then no. of females will be twice that of males. If 45 males are absent then female strength will be 5 times that of males. Find no. of males actually present.
Ans : Males 80,Females 175

2) Three men A, B, C plays Cards. If one loses the game he have to give Rs.3. If he wins the game he will gain Rs.6. If A has won 3 Games, B loses Rs.3, C wins Rs.12.What is the total no. of games played?

3) A can swim & cross 50m(the length of swimming pool) in 2 min. B can swim & cross 50m in 2min 15sec. Every time when they meet a bell gong is struck. For 2000m how many bell sounds might be produced?
Ans : 37

4) When I was married 10 years ago my wife is the 6th member of the family. Today my father died and a baby born to me. The average age of my family during my marriage is same as today. What is the age of Father when he died?
Ans : 60

5) There are 9 balls of equal size and same weight(they look similar) except 1. How may weighs required to find the dissimilar ball using a weighing balance?
Ans : 3

6) Product of Prime no. between 1 to 20?
Ans 9699690

7) Find out the total numbers between 1 to 999 that are neither divisible by 8 nor by 12?
Ans :833

8) Find out the distinct numbers that can be formed by 2, 3, 7, 6(don’t now exactly) that should be divided by 4?
Ans :8

9) Two trains at speed 60 km/hr comes in the opposite direction. At a particular time the distance between the two trains is 18km. A shuttle
flies between the trains at the speed of 80 km/hr. At the time the two trains crashes what is the distance traveled by shuttle?
Ans:12 km

10) There are n urns and m balls. If we put 3 balls in each urn 3 balls will be excess. If we put 4 balls in each urn 1 urn will be excess. Find no. of Urns (or) Balls?
Ans:7 URNS & 24BALLS.

11) Find the area not occupied by circles:Given length =y breadth =x
Ans: 3x2(1-pie/4)

12) A man gets x/y of Rs.10 and y/x of Rs.10. He returns Rs.20. The Answer choices are
a) He may not lose Ans He never losses
b) He may lose
c) He always loses
d) Cannot be Determined

13) Three men A,B,C can complete a work separately in some specified days(may be8,7,6).If they do the work together by alternate days. Then how many days need to complete the work?
Ans: 7 1/8

14) Four Members A,B,C,D are playing a game .A person losing a game should double the amount of others .B,C,D are losing in order after three games .The amount after 3 games are A&B having 40,D is having 16&C 80.
Each questions carry one mark
a) who started with small amount of money?
Ans)A=5

15) Who started with greatest amount of money?

16) What amount did B have?
Ans)93
Hint: I solved and found the answers to be A->5,B->93

17)There are some houses in a street back to back .And they that house behind 10 was 23.How many houses in the street?
Ans:32

18) There are 1997 doors in a auditorium and as many as people as the no of doors open enter the auditorium .A door was closed and as many as people as no of doors open leave the auditorium . the process was repeated till the no of doors is equal to1.find the total no of peoples enter the auditorium?
Ans :1996

19) A batsman average was 15.at last innings he took 23 runs then his average became.how much run he should take to make his average 18?
Ans 39

20) Find the number WXYZ divisible by 36?
i)let the digits be5,4,3,6 -not in that order
ii)sum of last two digits is 9
iii) sum of middle two digits is 7
->if one is sufficient then ans asA if two is sufficient then ans as Bif all are necessary then ans as C if nothing is needed then ans as D
21) X and Y live in a North-South parallel street. X travels 10 km towards North to reach the east-west street . Y travels 6 km towards south to reach the east -west street . X travels now 4km towards east and y travels 8km towards west and they met each other. What is the distance between x and y?

22) The houses are numbered 1,2,3,… and reach the end of the street and backtracks toward s the starting point. The house numbered 10 is opposite to 23. there are even no of houses. Find the total no of houses.Ans :32

23) A seller has a set of apples out of which he sells one half of it and half an apple to his first customer.then he sells half of the remaining apples and a half apple to his second customer.Then he sells half of the remaining apple and ½ apple to his third customer and so on.This repeats upto 7th customer and no more apples are remaining . Find the total no of apples he had. Ans :127

24) A hollow cube of size 5cm is taken , with the thickness of 1cm . it is made of smaller cubes of size 1cm . if the outer surface of the cube is painted how many faces of the smaller cubes remain unpainted?Ans 438

25) If a 36 cm thread is used to wrap a book , lengthwise twice and breadthwise once, what is the size of the book?
Ans 7,4 & 8,2 Area 6

26) The various degrees of the vertices are marked in the dig. Find y
Ans =54

27) If 4 circles of equal radius are drawn with vertices of a square as the centre , the side of the square being 7 cm, find the area of the circles outside the square?
Ans 3 pie r pow 2 [461.58]

28) A bus has 40 seats and the passengers agree to share the total bus fare among themselves equally. If the total fair is 80.67 , find the total no of the seats unoccupied.
Ans :37

29) A 4 digit no may consist of the digits 6,2,7,5 where none of the nos are repeated.Find the possible no of combinations divisible by 36?
Ans :0

30) If u r traveling from Mumbai to banglore and return back .To find the speed of the car which of the following r needed.
a)the distance between them.
b)time taken
c)avg speed towards Mumbai and the avg speed towards banglore.
Choices:
1)a only. 2) Ans a and b 3) a,b,c 4)b only 5)Ans c only ( ans not in order)

31)(Diagram drawn approximate not to scale.) if all the blocks are squares and the complete fig is also a square and the area of the a is 1 cm2,b=81 cm2what is the area of i?
Ans = 324

32) A secret can be told only 2 persons in 5 minutes .the same person tells to 2 more persons and so on . How long will take to tell it to 768 persons ?
a)47.5 min b)50 min c) 500 min d)….
Ans: 47.5 min ......35min

33) Three birds cross a point in a same st. line and of that 2 fly in opposite directions. If a triangle is formed with the position of the birds what kind of the triangle will be formed?
a) Ans If same speed isosceles b)right angle c)equilateral d)right angle and isosceles.

35) One question is given for explaining the working of cornea (in eyes) & the window
Ans: drawing analogy
36) m a)m-n < x-y b)m+n < x+y
c)&d) Similar options using all 4 variables
Ans : x-m
37)Four circles are drawn from the corners of a square of area 49 cm2 . Find the area of 4 circles outside the square
(they didn’t mention that circles have radius=1/2 side of a square)
Ans: intermediate

38)In a pond ecosystem,large fishes and small fishes will be there.If we want to remove small amount of pollutants,small fishes are to be employed.In a food-chain food passes through a number of mouths and en route the mouth of the superfeeder-the eagle.The size of the ecosystem is determined by its population.But this has been proved false.
What can you infer from above?
(4 choices)

39)In Bangalore,during income tax deduction for a single person,the percentage increased by 3% and for middle house-holders,it decreased by 3%.What can you infer?

40)In China,Mao-Tse -Tung was responsible for organizing its people and taking China into success path.It evolved into a great economic power by improved industrial and economical statistics.China prospered in those years,but_________________
Which of the following best completes the sentence?(4 choices)

41)A ridge formed over Pacific Ocean was because of the intersection of two volcanoes.But in history it was written that it was not due to those volcanoes.It proves a contradictory to form the view that history will be proved wrong in the future.
Inference?

42)In a poultry form because of cloning,a large breed of hens were produced.This increased the production but the maintenance was very difficult because of the large number.This does not mean that cloning is a disaster in the scientific world but it is a tool which in some ways is constructive but in other ways ,it is destructive.Inference?

CTS Interview Questions Part 4

Analogies
1. slur : speech : : smudge :?Ans. writing
2. epaulet : shoulder : : ring :? Ans.finger
3. vernacular : place : : fingerprint : ?Ans.identical

OppositesQ. corpulent Ans: emaciated
Q. officiousAns: pragmate
Q. dextrousAns: clumsy
The following sentences are broken into 4 sections- A, B, C, DChoose the part which has a mistakeMark (E) if you find no mistake.
Q.A)psychologists point out that B)there are human processes C)which does not involve D) the use of words
Ans. (C) which does not involve (do)
Q.A)jack ordered for B)two plates of chicken C)and a glass D)of water
Ans. (A)jack ordered for
The following is a group of questions is based on a passage or a set of conditions for each question.Select the best answer choice given.
(i). If it is fobidden by law if the object of agreement is the doing of an act,that is forbidden by law the agreement is void.
(ii). If it is of the nature that,it would defeat the provision of any law is the agreement is void.if the object of agreement is such that thing got directly forbidden by law it would defeat the provision of statuary law.
(iii). If the object of agreement is fraddulent it is void.
(iv). An object of agreement is void if it involves or implies to the personnal property of another.
(v). An object of agreement is void where the constant regards as ignored.
(vi). An object of agreement is void where the constant regards is as opposed to public policy.
Q. An algorithm follws a six step process za,zb,zc,zd,ze,zf, it is governed by the following
(i) zd should follow ze(ii) the first may be za,zd or zf(iii) zb and zc have to be performed after zd(iv) zc must be immediately after zb
Q. If za is the first set zd must be
a) 3rd b) 5th c) 2nd d) 4th

Q. If zb must follow za then za can be
a) third or fourthb) first or second c) can not be third d) fouth or fifth e) none
Q. If ze is third term the number of different operations possible are
The following questions are based on the given statementsRavi plants six seperate saplings -- x,y,z,w,u,v in rows no 1 to 6 ,according to the follwing conditionsHe must plant x before y and uHe must plant y and wThe third has to be z
Q. Which of the following is acceptable
a) xuywzv b) xvzyuw c) zuyxwv d) zvxuwy e) wyzuvx
Q. Which of the following is true
a) z before v b) z before x c) w before u d) y before ue) x before w
Q. If he plants v first, then which can be planted second
a) xb) yc) zd) we) u
Q. Which of the following describes a correct combination of sapling and row?
a) x,3 b) y,6 c) z,1 d) w,2 e) u,6
Q. If he plants b 6th which would be planted first and second
a) x and w b) x and y c)y and x d)w and z e) w and u
Q. If he plants w before u and after v he should plant w at
a) first b) second c) fourth d) fifth e) sixth
Q. At a certain moment a watch shows 2 min lag although it is running fast. If it showed a 3 min lag at that moment, but also gains by 1/2 min more a day than its current speed it would show the true time one day sooner than it usually does. How many mins does the watch gain per day.
a).2 b).5 c).6 d).4 e).75
Q. In 400m race A gives B a start of 7 sec and beats him by 24 sec. In another race A beats B by 10 sec.the speeds are in the ratio
a)8:7 b)7:6 c)10:8 d)6:8 e)12:10
Q. 3x+4y=10 x3 + y3=6 What is the minimum value of 3x+11y=?
Q. There are 600 tennis players 4% wear wrist band on one wrist Of the remaining, 25% wear wrist bands on both hands How many players don't wear a wrist band?
Ans. 432
Q. Three types of tea the a,b,c costs Rs. 95/kg,100/kg and70/kg respectively. How many kgs of each should be blended to produce 100 kg of mixture worth Rs.90/kg given that the quntities of band c are equal
a)70,15,15 b)50,25,25 c)60,20,20 d)40,30,30
Ans. (b)
Q. Two distinct no's are taken from 1,2,3,4......28 Find the probability that their sum is less than 13

CTS Interview Questions Part 3

SECTION I - 8 questions based on series.

1. These questions involve interchange of letters in a word at particular locations and also interchanging letters adjacent to those particular locations.Certain other conditions may also be given For eg.

Let the word be ABBAABAIf we apply 25 on this, it means we have to interchange the letters at positions 2 and 5, also we have to change the letters adjacent to positions 2 and 5 i.e.from A to B and B to A. A B B A A B after Step 1 i.e interchange of 2 and 5 becomes AABABB Now change adjacent elements of 2 and 5...finally answer becomes
Ans: B A A B B A

Questions 1-5 are based on the pattern with changed numbers as described above
Questions 6-8 are of the following type
To get AAABBD from BBBAAA what number should be applied:-

a) 25

b) 34

c) 25 & 34

d) none
SECTION II

1. Given the following functions(1) f(n a b c ) = ac if n=1(2) f(n a b c) = f( n-1 a c b) + f( 1 a b c) + f( n-1 b a c ) if n > 1 Then what is the value f( 2 a b c ) = ?

Ans: f( 2 a c b ) = ab + ac + bc.
2. Similar question on functions.
3. [ Based on the function in the first question] For the function f( 4 a b c ) the number of terms is...?Hint f( 4 a b c ) = f( 3 a c b ) + f( 1 a b c ) + f( 3 b a c ) etc.4. What is the value of the function f( 5 a b c ) = ?
SECTION III

Permutations and Combinations.

8 Questions.1. r = number of flags;n = number of poles;Any number of flags can be accommodated on any single pole.1)r=5,n=5 The no. of ways the flags can be arranged ?Questions 2-5 are based on the above pattern
6. r = 5 n = 3 . If first pole has 2 flags, third pole has 1 flag How many ways can the remaining be arranged?Questions 7.& 8. are similar to Question 6.
SECTION IV
Question consisting of figures - Pattern-matching type.
Refer R.S Agarwal's book on Analytical Reasoning & TMHs Quantitative ability book by Edgar Thorpe.SECTION V
In this section first part of compound word is given. Select meaning of the second part from the choice given:

1. Swan2. Swans3. Fool4. Fools5. Stare6. LadyFor all above 4 choices are given.....Eg. Swan ---> Swansong (compound word)

a) category

b) music

c) television

d) none
Ans: Swansong is compound word. But song is not given as an option. so (b) music is the answer.

CTS Interview Questions Part 2

SECTION-1:
Find the next in the sequence:
1. BC CE EG GK ?a)KN b)KU c)KM d)None
2. AA AB BC CE?a)EG b)EH c)EI d)None
3. AB EF JK QR ?a)YZ b)ZA c)AB d)None
4.ACD EGL IKT MOB?a)QST b)QSZ c)QSY d)None
5.AC CG GO OE?a)EJ b)EI c)EL d)None
6.AE BH CM DU?a)EH b)EZ c) EB d)None
7. AD DP PL LVa)VSb)VK c)VI d)None
8. SE QU EN TI?a)CN b)BM c)AI or AZ d)None
SECTION-II:Find the values for the following problem:f(X)= 2X-1 + f(X-1) if X is not equal to zeroandiff(X=0)=0
9. Value of f(5)a)15 b)24 c)22 d)None
10. Value of f(f(2))
11. Value of f(16)- f(15)
12. Value of f(16)+f(15)-480
13. If f(f(X))=81 then the value of X=?
14. If f(X)=4f(X-1) then the value of X=?
15.If f(X)= f(X-1)+f(X-2) for X>1 then X= ?
16. If f(X)-f(X-1)=f(X-8) for X>5 then X=

SECTION -III:In the following questions a 'word' is given which may not have any meaning.Find differnet possible words or palindromes for
the word as per the question. For the following find no of distinct words that can be formed.17. TYGHHTTa).420 b)1540 c)840 d)None
18. TYGHHTY19. TYGHHTT
20. TYGHHTT
21. TYGHASD
22. TYGHHTY
Find the number of possible palindromes for following
23. TYGHHTY
24. TYHHHTYH.
SECTION-IV:25 to 32 are based on the figures. You have to analyse them and find the odd one out. Five figures will be given out of which one is not correct.
Refer R.S Agarwal's book on Analytical Reasoning & TMHs Quantitative ability book by Edgar Thorpe.
SECTION -V:For following first find out the anagram and then note the corresponding meaning.33.TABLET Hint: anagram means first u arrange the letters in correct order like TABLET===BATTLE . So ans is FIGHT
34.RUGGED
35.GORE.
36.STASSI.
For all above choices are.a)resentment b)fight c)help d)monster
37. ENFOLD
38. LAMB
39. RECEDE.
40. PLEASE.For all the above 4 choices are samea)cuddle b)sleeping c)proclamination d)ointment.

Thursday, March 20, 2008

CTS Interview Questions Part 1

  • A says " the horse is not black".B says " the horse is either brown or grey."C says " the horse is brown"At least one is telling truth and atleast one is lying. tell the colour of horse.
    grey
    A son and father goes for boating in river upstream . After rowing for 1 mile son notices the hat of his fathe falling in the river. After 5 min. he tells his father that his hat has fallen. So they turn around and are able to pick the hat at the point from where they began boating after 5 min. Tell the speed of river.
    6 miles/hr
    A+B+C+D=D+E+F+G=G+H+I=17 where each letter represent a number from 1 to 9. Find out what does letter D and G represent if letter A=4. (8 marks)
    D=5,G=1
    Argentina had football team of 22 player of which captain is from Brazilian team and goalki from European team. For remaining player they have picked 6 from argentinan and 14 from european. Now for a team of 11 they must have goalki and captain so out of 9 now they plan to select 3 from argentinian and 6 from European. Find out no. of methods available for it (2 marks)
    160600( check out for right no. 6C3 * 14C6)
    Three thives were caught stealing sheep, mule and camel.A says " B had stolen sheep "C says " B had stolen mule"B says he had stolen nothing.the one who had stolen horse is speaking truth. the one who had stolen camel is lying . Tell who had stolen what? (5 marks)
    A- camel, B- mule, C- horse
    A group of friends goes for dinner and gets bill of Rs 2400. Two of them says that they have forgotten their purse so remaining make an extra contribution of Rs 100 to pay up the bill. Tell the no. of person in that group. (3 marks)
    8 person
    In acolony there are some families. Each of them have children but different in numbers.Following are conditions a no of adultno of sonsno of daughtersno of families.beach sister must have atleast one brother and should have at the most 1 sister. c no of children in one family exceeds the sum of no of children in the rest families. Tell the no of families.(5 marks)
    3 families
    There are 6 people W,H,M,C,G,F who are murderer , victim , judge , police, witness, hangman. There was no eye witness only circumtancial witness. The murderer was sentenced to death. Read following statement and determine who is who.
    1. M knew both murderer and victim.2. Judge asked C to discribe murder incident.3. W was last to see F alive.4. Police found G at the murder site.5 H and W never met.( 8 marks)The above mentioned questions are of 37 marks rest I don't remember as they had no of condition. One which mentions about hundustani music, Gazals ect. is tobe solved through venn diagram. Its of 8 marks. and another was grading 5 student which was of 5 marks.

Wednesday, March 19, 2008

Load Runner Q & A Part 2

Load Runner Q & A Part 2

11.What is load testing?

Testing of application for simultaneous users

12.What does vuser_init action contains?

Login procedures

13.What is the main aim of load testing?

To calculate the response time

14.What the Vuser script will do while running the scenario?

The actions that a Vuser performs during the scenario are described in a Vuser script. When we run a scenario,each Vuser executes a Vuser script. The Vuser script include functions that measure and record the performance of the server during the scenario.

15.What is Transaction time?

To measure the performance of the server,we define transactions. Transactions measure the time that it takes for the server to respond to tasks submitted by Vuser.

16.What is Rendezvous points?

We can insert Rendezvous points in to Vuser scripts to emulate heavy user load on the server. Rendezvous points instruct multiple Vuser to perform tasks at exactly the same time.

17.What is controller?

LoadRunner controller is used to manage and maintain our scenarios. Using the controller ,we can control all the Vusers in a scenario from a single work station.

18.What is Hosts?

The host is the machine that executes the Vuser script,enabling the Vuser to emulate the actions of a human user.

19.What is mean by Rendezvous points?

A rendezvous point creates intense user load on the server and enables LoadRunner to measure server performance under load

20.What is the need for doing load testing?

The factors are: Minimal infrastructure,Reliable,Repeatable,Programmable,Comprehensive,Reusable

21.How to create Vuser Groups in loadrunner?

A scenario consists of groups of Vusers which emulate human user interacting with your application. When you run a scenario, the Vusers generate load on the server, and LoadRunner monitors the server and transaction performance

22.Why should we automate the performance testing?

Its a discipline that leverages products,people and processes to reduce the risk of application,upgrade or patch deployment. It is about applying production work loads to pre-deployment systems while simultaneously measuring system performance and end-user experience.

23.What are all the things will be considered while doing performance testing?

? Does the application respond quickly enough for the intended users?

? Will the application handle the expected user load and beyond?

? Will the application handle the number of transactions required by the business?

? Is the application stable under expected and unexpected user loads?

? Are we sure that users will have a positive experience on go-live day?

24. What are the LoadRunner components?

? Virtual User Generator

? Controller

? Load Generators

? Analysis

? Launcher

25. What is the LoadRunner testing process?

? Plan load test

? Create Vuser Scripts

? Define Scenario

? Run Scenario

? Analyze results

26.What is remote command launcher?

The remote command launcher enables the controller to start applications on the host machine


Load Runner Q & A Part 1

Load Runner Q & A Part 1

1.Where the LoadRunner will be exactly applicable?

Its mainly applicable for testing the performance of the client and server based applications

2.How the LoadRunner will test the application?

LoadRunner enables us to test our system under controlled and peak load conditions. To generate load LoadRunner runs thousands of virtual users that are distributed over a network. Using a minimum of hardware resources,these virtual users provide consistent,repeatable,and measurable load to exercise our client and server system just as real users would.

3.How to evaluate the performance of a system?

LoadRunner's in-depth reports and graph provide the information that we need to evaluate the performance of our client and server system

4.What are all the compatible platforms which will be used to execute the LoadRunner scripts?

Windows,UNIX

5.What are all the parameters LoadRunner will mainly test?

To load our client and server system, LoadRunner emulates an environment where multiple users work concurrently,while the client and server system is under load, LoadRunner accurately measures and analyze the system performance,and its functionality

6.What kind of applications which will be mainly focused by the performance testing?

Modern client and server architectures are complex. While they provide an unprecedented degree of power and flexibility,these systems are difficult to test. Whereas single user testing focuses primarily on functionality and the user interface of single application,client and server testing focuses on performance and reliability of an entire client and server system.

7.What are the limitations of manual load testing?

? It is expensive,requiring large amount of both personnel and machinery

? It is complicated,especially coordinating and synchronizing multiple users

? It involves a high degree of organization

? The repeatability of the manual tests is limited

8.What are all the main features of LoadRunner?

? LoadRunner reduces the personnel requirements

? LoadRunner reduces the hardware requirements

? The controlling will be accomplished effectively by the controller

? Because LoadRunner tests are fully automated,we can easily repeat them as many times we need

9.What is the purpose of LoadRunner scenarios?

Using LoadRunner,we divide our client and server performance requirements into scenarios. A scenario defines

the events that occur during each testing session.

10.What sort of things will be replaced in scenarios?

In the scenario, LoadRunner replaces human users with virtual users or Vusers. When we run a scenario, Vuser emulate the actions of human users-submitting input into the server.

Test Director Q & A Part 2

Test Director Q & A Part 2

11.TestDirector is a Test management tool

12..What are all the components of TestDirector5.0?

Plan tests,Run tests,Track defects

13.Who is having full privileges in TestDirector project?

TD Admin

12.What is test set?

A test set is a subset of tests in our database designed to achieve a specified testing objective

13.How the analyzing of test results will be accomplished in TestDirector?

Analyzing results will be accomplished by viewing run data and by generating TestDirector reports and graphs

14.What is Test set builder?

The test set builder enables us to create,edit,and delete test sets. Our test sets can include both manual and automated tests. We can include the same test in different test sets.

15.How the running of Manual test will be accomplished in TestDirector?

When running a manual test,we perform the actions detailed in the test steps and compare them to the expected results. The mini step window allows us to conveniently perform manual tests and record results with TestDirector minimized

16.How the running of Automated test will be accomplished in TestDirector?

We can execute automated tests on our own computer or on multiple remote hosts. The test execution window enables us to control test execution and manage hosts. We can execute a single test, or launch an entire batch of tests.

17.How to execute test plan in testdirector?

Write testcases in test plan(Description and expected results)

To execute them go to TEST LAB . Give coverage from test plan to test lab by selecting “select tests”.

Then click on RUN of RUN TEST SET to execute the test cases.

18.What is the use of Test Director software?

TestDirector is Mercury Interactive's software test management tool. It helps quality assurance personnel plan and organize the testing process. With TestDirector you can create database of manual and automated tests, build test cycles, run tests, and report and track defects.

19.How you integrated your automated scripts from TestDirector?

When you work with WinRunner , you can choose to save your tests directly to your TestDirector database or while creating a test case in the TestDirector we can specify whether the script in automated or manual.

20.Who all are having the rights to detect and report the defects?

? Software developers

? Testers

? End users

21.What are the main things want to be considered while reporting the bug?

? Description about the bug

? Software version

? Additional informations necessary to reproduce and repair the defect

22.Describe about mailing defect data

Connecting TestDirector to your e-mail system lets you routinely inform development and quality assurance personnel about defect repair activity.

23.What is report designer?

Its a powerful and flexible tool that allows you to design your own unique reports

24.What is the use of graphs in TestDirector?

TestDirector graphs help us visualize the progress of test planning,test execution,and defect tracking for our application,so that we can detect bottlenecks in the testing process.

Test Director Q & A Part 1

Test Director Q & A Part 1

1.What is Test Director?

Its a Mercury interactive's Test management tool. It includes all the features we need to organize and manage the testing process.

2.What are all the main features of Test Director?

It enables us to create a database of tests,execute tests, report and track defects detected in the software.

3.How the assessment of the application will be taken place in Test Director?

As we test, Test Director allows us to continuously assess the status of our application by generating sophisticated reports and graphs. By integrating all tasks involved in software testing Test Director helps us to ensure that our software is ready for deployment.

4.What the planning tests will do in Test Director?

It is used to develop a test plan and create tests. This includes defining goals and strategy,designing tests,automating tests where beneficial and analyzing the plan.

5.What the running tests will do in Test Director?

It execute the test created in the planning test phase, and analyze the test results

6.What the tracking defects will do in Test Director?

It is used to monitor the software quality. It includes reporting defects,determining repair priorities,assigning tasks,and tracking repair progress

7.What are all the three main views available in What the running tests will do in Test Director?

? Plan tests

? Run tests

? Track defects

Each view includes all the tools we need to complete each phase of the testing process

8.What is test plan tree?

A test plan tree enables you to organize and display your test hierarchically,according to your testing requirements

9.What are all the contents of test plan tree?

Test plan tree can include several type of tests

? Manual test scripts

? Win Runner test scripts

? Batch of Win Runner test scripts

? Visual API test scripts

? Load Runner scenario scripts and Vuser scripts

10.What is test step?

A test step includes the action to perform in our application,input to enter,and its expected output

Quick Test Professional Q & A Part 2

Quick Test Professional Q & A Part 2

11.Keyword view in QTP is also termed as

Icon based view

12.What is the use of data table in QTP?

parameterizing the test

13.What is the use of working with actions?

To design a modular and efficient tests

14.What is the file extension of the code file and object repository file in QTP?

The extension for code file is .vbs and the extension for object repository is .tsr

15.What are the properties we can use for identifying a browser and page when using descriptive programming?

The name property is used to identify the browser and the title property is used to identify the page

16.What are the different scripting languages we can use when working with QTP?

VB script

17.Give the example where we can use a COM interface in our QTP project?

COM interface appears in the scenario of front end and back end.

18.Explain the keyword createobject with example

createobject is used to create and return a reference to an automation object.

For example:

Dim ExcelSheetSet

ExcelSheet=createobject(“Excel.Sheet”)

19.How to open excel sheet using QTP script?

You can open excel in QTP by using the following command

System.Util.Run”Path of the file”

20.Is it necessary to learn VB script to work with QTP?

Its not mandate that one should mastered in VB script to work with QTP. It is mostly user friendly and for good results we need to have basic VB or concepts which will suffice

21.If WinRunner and QTP both are functional testing tools from the same company. Why a separate tool QTP came in to picture?

QTP has some additional functionality which is not present in WinRunner. For example,you can test(Functionality and Regression testing) an application developed in .Net technology with QTP,which is not possible to test in WinRunner

22.Explain in brief about the QTP automation object model

The test object model is a large set of object types or classes that QTP uses to represent the objects in our application. Each test object has a list of properties that can uniquely identify objects of that class

23.What is a Run-Time data table?

The test results tree also includes the table-shaped icon that displays the run-time data table-a table that shows the values used to run a test containing data table parameters or the data table output values retrieved from a application under test

24.What are all the components of QTP test script?

QTP test script is a combination of VB script statements and statements that use QuickTest test objects ,methods and properties

25. What is test object?

Its an object that QTP uses to represent an object in our application. Each test object has one or more methods and properties that we can use to perform operations and retrieve values for that object. Each object also has a number of identification properties that can describe the object.

26.What are all the rules and guidelines want to be followed while working in expert view?

Case-sensitivity

VB script is not case sensitive and does not differentiate between upper case and lower case spelling of words.

Text strings

When we enter value as a string, that time we must add quotation marks before and after the string

Variables

We can use variables to store strings,integers,arrays and objects. Using variables helps to make our script more readable and flexible.

Parentheses

To achieve the desired result and to avoid the errors,it is important that we use parentheses() correctly in our statements.

Comments

We can add comments to our statements using apostrophe('),either at a beginning of the separate line or at the end of a statement

Spaces

We can add extra blank spaces to our script to improve clarity. These spaces are ignored by the VB script

Quick Test Professional Q & A Part 1

Quick Test Professional Q & A Part 1

1.What is Quick test pro?

Its a Mercury interactive's keyword driven testing tool

2.By using QTP what kind of applications we can test?

By using QTP we can test standard windows applications,Web objects,ActiveX controls,and Visual basic applications.

3.What is called as test?

Test is a collection of steps organized into one or more actions,which are used to verify that your application performs as expected

4.What is the meaning of business component?

Its a collections of steps representing a single task in your application. Business components are combined into specific scenario to build business process tests in Mercury Quality center with Business process testing

5.How the test will be created in QTP?

As we navigate through our application,QTP records each step we perform and generates a test or component that graphically displays theses steps in an table-based keyword view.

6.What are all the main tasks which will be accomplished by the QTP after creating a test?

After we have finished recording,we can instruct QTP to check the properties of specific objects in our application by means of enhancement features available in QTP. When we perform a run session,QTP performs each step in our test or component. After the run session ends,we can view a report detailing which steps were performed,and which one succeeded or failed.

7.What is Actions?

A test is composed of actions. The steps we add to a test are included with in the test's actions. By each test begin with a single action. We can divide our test into multiple actions to organize our test.

8.What are all the main stages will involve in QTP while testing?

? Creating tests or business components

? Running tests or business components

? Analyzing results

9.How the creation of test will be accomplished in QTP?

We can create the test or component by either recording a session on our application or web site or building an object repository and adding steps manually to the keyword view using keyword-driven functionality. We can then modify our test with programming statements.

10.What is the purpose of documentation in key word view?

The documentation column of the key word view used to displays a description of each step in easy to understand sentences.

Win Runner Q & A Part 16

Win Runner Q & A Part 16

151. What is the purpose of setting a break point?

152. What is a watch list?

153. During debugging how do you monitor the value of the variables?

154.What are the reasons that WinRunner fails to identify an object on the GUI?

a) WinRunner fails to identify an object in a GUI due to various reasons.

i. The object is not a standard windows object.

ii. If the browser used is not compatible with the WinRunner version, GUI Map Editor will not be able to learn any of the objects displayed in the browser window.

155.What do you mean by the logical name of the object.

a) An object’s logical name is determined by its class. In most cases, the logical name is the label that appears on an object.

156.If the object does not have a name then what will be the logical name?

If the object does not have a name then the logical name could be the attached text.

157.What is the different between GUI map and GUI map files?

a) The GUI map is actually the sum of one or more GUI map files. There are two modes for organizing GUI map files.

i. Global GUI Map file: a single GUI Map file for the entire application

ii. GUI Map File per Test: WinRunner automatically creates a GUI Map file for each test created.

b) GUI Map file is a file which contains the windows and the objects learned by the WinRunner with its logical name and their physical description.

158.How do you view the contents of the GUI map?

a) GUI Map editor displays the content of a GUI Map. We can invoke GUI Map Editor from the Tools Menu in WinRunner. The GUI Map Editor displays the various GUI Map files created and the windows and objects learned in to them with their logical name and physical description.

160.What is startup script in WinRunner?

It is writing a script and when WinRunner starts it automatically runs the script. If you write script like invoking some application as soon as the script is run the application will be invoked for the purpose of testing

161.What is the purpose of loading WinRunner add-ins?

Add-ins are used in WinRunner to load functions specific to the particular add-in to the memory. While creating a script only those functions in the add-in selected will be listed in the function generator,and while executing the script only those functions in the loaded add-in will be executed,else WinRunner will give an error message saying it does not recognize the function

162.What is the purpose of GUI spy?

Using the GUI spy you can view the properties of any GUI object and your desktop. You use the spy pointer to point to an object,and the GUI spy displays the properties and their values in the GUI spy dialog box. You can choose to view all properties of an object, or only the selected set of properties that WinRunner learns.

163.When you create GUI map do you record all the objects of specific objects?

a) If we are learning a window then WinRunner automatically learns all the objects in the window else we will we identifying those object, which are to be learned in a window, since we will be working with only those objects while creating scripts.

164.What is the purpose of set_window command?

b) Set_Window command sets the focus to the specified window. We use this command to set the focus to the required window before executing tests on a particular window.


Syntax: set_window(, time);

The logical name is the logical name of the window and time is the time the execution has to wait till it gets the given window into focus.

165.How do you load GUI map?

c) We can load a GUI Map by using the GUI_load command.

Syntax: GUI_load();

166..What is the disadvantage of loading the GUI maps through start up scripts?

d) If we are using a single GUI Map file for the entire AUT then the memory used by the GUI Map may be much high.

e) If there is any change in the object being learned then WinRunner will not be able to recognize the object, as it is not in the GUI Map file loaded in the memory. So we will have to learn the object again and update the GUI File and reload it.

167.How do you unload the GUI map?

f) We can use GUI_close to unload a specific GUI Map file or else we call use GUI_close_all command to unload all the GUI Map files loaded in the memory.

Syntax: GUI_close(); or GUI_close_all;

Win Runner Q & A Part 15

Win Runner Q & A Part 15

141. How do you update your expected results?

142. How do you run your script with multiple sets of expected results?

143. How do you view and evaluate test results for various check points?

144. How do you view the results of file comparison?

145. What is the purpose of Wdiff utility?

146. What are batch tests and how do you create and run batch tests ?

147. How do you store and view batch test results?

148. How do you execute your tests from windows run command?

149. Explain different command line options?

150. What TSL function you will use to pause your script?

Win Runner Q & A Part 14

Win Runner Q & A Part 14

131. Why you use reload function?

a) If you make changes in a module, you should reload it. The reload function removes a loaded module from memory and reloads it (combining the functions of unload and load).

The syntax of the reload function is:

reload ( module_name [ ,1|0 ] [ ,1|0 ] );


The module_name is the name of an existing compiled module.

Two additional optional parameters indicate the type of module. The first parameter indicates whether the module is a system module or a user module: 1 indicates a system module; 0 indicates a user module.

(Default = 0)

The second optional parameter indicates whether a user module will remain open in the WinRunner window or will close automatically after it is loaded. 1 indicates that the module will close automatically. 0 indicates that the module will remain open.

(Default = 0)

132. Why does the minus sign not appear when using obj_type(), win_type(), type()?

If using any of the type() functions, minus signs actually means hold down the button for the previous character. The solution is to put a backslash character "\\" before the minus sign. This also applies to + < >.

133. Write and explain compile module?

134. How do you call a function from external libraries (dll).

135. What is the purpose of load_dll?

136. How do you load and unload external libraries?

137. How do you declare external functions in TSL?

138. How do you call windows APIs, explain with an example?

139. Write TSL functions for the following interactive modes:

i. Creating a dialog box with any message you specify, and an edit field.

ii. Create dialog box with list of items and message.

iii. Create dialog box with edit field, check box, and execute button, and a cancel button.

iv. Creating a browse dialog box from which user selects a file.

v. Create a dialog box with two edit fields, one for login and another for password input.

140. What is the purpose of step, step into, step out, step to cursor commands for debugging your script?

Win Runner Q & A Part 13

Win Runner Q & A Part 13

121. What is the use of treturn and texit statements in the test script?

a) The treturn and texit statements are used to stop execution of called tests.

i. The treturn statement stops the current test and returns control to the calling test.

ii. The texit statement stops test execution entirely, unless tests are being called from a batch test. In this case, control is returned to the main batch test.

b) Both functions provide a return value for the called test. If treturn or texit is not used, or if no value is specified, then the return value of the call statement is 0.

treturn

c) The treturn statement terminates execution of the called test and returns control to the calling test.

The syntax is:

treturn [( expression )];

d) The optional expression is the value returned to the call statement used to invoke the test.

texit

e) When tests are run interactively, the texit statement discontinues test execution. However, when tests are called from a batch test, texit ends execution of the current test only; control is then returned to the calling batch test.

The syntax is:

texit [( expression )];

122. Where do you set up the search path for a called test.

a) The search path determines the directories that WinRunner will search for a called test.

b) To set the search path, choose Settings > General Options. The General Options dialog box opens. Click the Folders tab and choose a search path in the Search Path for Called Tests box. WinRunner searches the directories in the order in which they are listed in the box. Note that the search paths you define remain active in future testing sessions.

123. How you create user-defined functions and explain the syntax?

a) A user-defined function has the following structure:

[class] function name ([mode] parameter...)

{

declarations;

statements;

}

b) The class of a function can be either static or public. A static function is available only to the test or module within which the function was defined.

c) Parameters need not be explicitly declared. They can be of mode in, out, or inout. For all non-array parameters, the default mode is in. For array parameters, the default is inout. The significance of each of these parameter types is as follows:

in: A parameter that is assigned a value from outside the function.

out: A parameter that is assigned a value from inside the function.

inout: A parameter that can be assigned a value from outside or inside the function.

124. What does static and public class of a function means?

a) The class of a function can be either static or public.

b) A static function is available only to the test or module within which the function was defined.

c) Once you execute a public function, it is available to all tests, for as long as the test containing the function remains open. This is convenient when you want the function to be accessible from called tests. However, if you want to create a function that will be available to many tests, you should place it in a compiled module. The functions in a compiled module are available for the duration of the testing session.

d) If no class is explicitly declared, the function is assigned the default class, public.

125. What does in, out and input parameters means?

a) in: A parameter that is assigned a value from outside the function.

b) out: A parameter that is assigned a value from inside the function.

c) inout: A parameter that can be assigned a value from outside or inside the function.

126. What is the purpose of return statement?

a) This statement passes control back to the calling function or test. It also returns the value of the evaluated expression to the calling function or test. If no expression is assigned to the return statement, an empty string is returned.

Syntax: return [( expression )];


127. What does auto, static, public and extern variables means?

a) auto: An auto variable can be declared only within a function and is local to that function. It exists only for as long as the function is running. A new copy of the variable is created each time the function is called.

b) static: A static variable is local to the function, test, or compiled module in which it is declared. The variable retains its value until the test is terminated by an Abort command. This variable is initialized each time the definition of the function is executed.

c) public: A public variable can be declared only within a test or module, and is available for all functions, tests, and compiled modules.

d) extern: An extern declaration indicates a reference to a public variable declared outside of the current test or module.

128. How do you declare constants?

a) The const specifier indicates that the declared value cannot be modified. The class of a constant may be either public or static. If no class is explicitly declared, the constant is assigned the default class public. Once a constant is defined, it remains in existence until you exit WinRunner.

b) The syntax of this declaration is:

[class] const name [= expression];

129. How do you declare arrays?

a) The following syntax is used to define the class and the initial expression of an array. Array size need not be defined in TSL.

b) class array_name [ ] [=init_expression]

c) The array class may be any of the classes used for variable declarations (auto, static, public, extern).

130. How do you load and unload a compile module?

a) In order to access the functions in a compiled module you need to load the module. You can load it from within any test script using the load command; all tests will then be able to access the function until you quit WinRunner or unload the compiled module.

b) You can load a module either as a system module or as a user module. A system module is generally a closed module that is “invisible” to the tester. It is not displayed when it is loaded, cannot be stepped into, and is not stopped by a pause command. A system module is not unloaded when you execute an unload statement with no parameters (global unload).

load (module_name [,1|0] [,1|0] );

The module_name is the name of an existing compiled module.


Two additional, optional parameters indicate the type of module. The first parameter indicates whether the function module is a system module or a user module: 1 indicates a system module; 0 indicates a user module.

(Default = 0)

The second optional parameter indicates whether a user module will remain open in the WinRunner window or will close automatically after it is loaded: 1 indicates that the module will close automatically; 0 indicates that the module will remain open.

(Default = 0)

c) The unload function removes a loaded module or selected functions from memory.

d) It has the following syntax:

unload ( [ module_name | test_name [ , "function_name" ] ] );


Win Runner Q & A Part 12

Win Runner Q & A Part 12

111. What is the difference between script and compile module?

a) Test script contains the executable file in WinRunner while Compiled Module is used to store reusable functions. Complied modules are not executable.

b) WinRunner performs a pre-compilation automatically when it saves a module assigned a property value of “Compiled Module”.

c) By default, modules containing TSL code have a property value of "main". Main modules are called for execution from within other modules. Main modules are dynamically compiled into machine code only when WinRunner recognizes a "call" statement. Example of a call for the "app_init" script:

call cso_init();

call( "C:\\MyAppFolder\\" & "app_init" );

d) Compiled modules are loaded into memory to be referenced from TSL code in any module. Example of a load statement:

reload (“C:\\MyAppFolder\\" & "flt_lib");

or

load ("C:\\MyAppFolder\\" & "flt_lib");

112. Write and explain various loop command?

a) A for loop instructs WinRunner to execute one or more statements a specified number of times.

It has the following syntax:

for ( [ expression1 ]; [ expression2 ]; [ expression3 ] )statement

i. First, expression1 is executed. Next, expression2 is evaluated. If expression2 is true, statement is executed and expression3 is executed. The cycle is repeated as long as expression2 remains true. If expression2 is false, the for statement terminates and execution passes to the first statement immediately following.

ii. For example, the for loop below selects the file UI_TEST from the File Name list

iii. in the Open window. It selects this file five times and then stops.

set_window ("Open")

for (i=0; i<5;>

list_select_item("File_Name:_1","UI_TEST"); #Item Number2

b) A while loop executes a block of statements for as long as a specified condition is true.

It has the following syntax:

while ( expression )

statement ;

i. While expression is true, the statement is executed. The loop ends when the expression is false. For example, the while statement below performs the same function as the for loop above.

set_window ("Open");

i=0;

while (i<5){

i++;

list_select_item ("File Name:_1", "UI_TEST"); # Item Number 2

}

c) A do/while loop executes a block of statements for as long as a specified condition is true. Unlike the for loop and while loop, a do/while loop tests the conditions at the end of the loop, not at the beginning.

A do/while loop has the following syntax:

do

statement

while (expression);

i. The statement is executed and then the expression is evaluated. If the expression is true, then the cycle is repeated. If the expression is false, the cycle is not repeated.

ii. For example, the do/while statement below opens and closes the Order dialog box of Flight Reservation five times.

set_window ("Flight Reservation");

i=0;

do

{

menu_select_item ("File;Open Order...");

set_window ("Open Order");

button_press ("Cancel");

i++;

}

while (i<5);

113. Write and explain decision making command?

a) You can incorporate decision-making into your test scripts using if/else or switch statements.

i. An if/else statement executes a statement if a condition is true; otherwise, it executes another statement.

It has the following syntax:

if ( expression )

statement1;

[ else

statement2; ]


expression is evaluated. If expression is true, statement1 is executed. If expression1 is false, statement2 is executed.

b) A switch statement enables WinRunner to make a decision based on an expression that can have more than two values.

It has the following syntax:

switch (expression )

{

case case_1: statements

case case_2: statements

case case_n: statements

default: statement(s)

}

The switch statement consecutively evaluates each case expression until one is found that equals the initial expression. If no case is equal to the expression, then the default statements are executed. The default statements are optional.

114. Write and explain switch command?

a) A switch statement enables WinRunner to make a decision based on an expression that can have more than two values.

It has the following syntax:

switch (expression )

{

case case_1: statements

case case_2: statements

case case_n: statements

default: statement(s)

}

b) The switch statement consecutively evaluates each case expression until one is found that equals the initial expression. If no case is equal to the expression, then the default statements are executed. The default statements are optional.

115. How do you write messages to the report?

a) To write message to a report we use the report_msg statement

Syntax: report_msg (message);

116. What is a command to invoke application?

a) Invoke_application is the function used to invoke an application.

Syntax: invoke_application(file, command_option, working_dir, SHOW);

117. What is the purpose of tl_step command?

a) Used to determine whether sections of a test pass or fail.

Syntax: tl_step(step_name, status, description);

118. Which TSL function you will use to compare two files?

a) We can compare 2 files in WinRunner using the file_compare function.

Syntax: file_compare (file1, file2 [, save file]);

119. What is the use of function generator?

a) The Function Generator provides a quick, error-free way to program scripts. You can:

i. Add Context Sensitive functions that perform operations on a GUI object or get information from the application being tested.

ii. Add Standard and Analog functions that perform non-Context Sensitive tasks such as synchronizing test execution or sending user-defined messages to a report.

iii. Add Customization functions that enable you to modify WinRunner to suit your testing environment.

120. What is the use of putting call and call_close statements in the test script?

a) You can use two types of call statements to invoke one test from another:

i. A call statement invokes a test from within another test.

ii. A call_close statement invokes a test from within a script and closes the test when the test is completed.

iii. The call statement has the following syntax:

1. call test_name ( [ parameter1, parameter2, ...parametern ] );

iv. The call_close statement has the following syntax:

1. call_close test_name ( [ parameter1, parameter2, ... parametern ] );

v. The test_name is the name of the test to invoke. The parameters are the parameters defined for the called test.

vi. The parameters are optional. However, when one test calls another, the call statement should designate a value for each parameter defined for the called test. If no parameters are defined for the called test, the call statement must contain an empty set of parentheses.

Win Runner Q & A Part 11

Win Runner Q & A Part 11

101. What are the steps of creating a data driven test?

a) The steps involved in data driven testing are:

i. Creating a test

ii. Converting to a data-driven test and preparing a database

iii. Running the test

iv. Analyzing the test results.

102. Record a data driven test script using data driver wizard?

a) You can use the DataDriver Wizard to convert your entire script or a part of your script into a data-driven test. For example, your test script may include recorded operations, checkpoints, and other statements that do not need to be repeated for multiple sets of data. You need to parameterize only the portion of your test script that you want to run in a loop with multiple sets of data.

To create a data-driven test:

i. If you want to turn only part of your test script into a data-driven test, first select those lines in the test script.

ii. Choose Tools > DataDriver Wizard.

iii. If you want to turn only part of the test into a data-driven test, click Cancel. Select those lines in the test script and reopen the DataDriver Wizard. If you want to turn the entire test into a data-driven test, click Next.

iv. The Use a new or existing Excel table box displays the name of the Excel file that WinRunner creates, which stores the data for the data-driven test. Accept the default data table for this test, enter a different name for the data table, or use

v. The browse button to locate the path of an existing data table. By default, the data table is stored in the test folder.

vi. In the Assign a name to the variable box, enter a variable name with which to refer to the data table, or accept the default name, “table.”

vii. At the beginning of a data-driven test, the Excel data table you selected is assigned as the value of the table variable. Throughout the script, only the table variable name is used. This makes it easy for you to assign a different data table

viii. To the script at a later time without making changes throughout the script.

ix. Choose from among the following options:

1. Add statements to create a data-driven test: Automatically adds statements to run your test in a loop: sets a variable name by which to refer to the data table; adds braces ({and}), a for statement, and a ddt_get_row_count statement to your test script selection to run it in a loop while it reads from the data table; adds ddt_open and ddt_close statements

2. To your test script to open and close the data table, which are necessary in order to iterate rows in the table. Note that you can also add these statements to your test script manually.

3. If you do not choose this option, you will receive a warning that your data-driven test must contain a loop and statements to open and close your datatable.

4. Import data from a database: Imports data from a database. This option adds ddt_update_from_db, and ddt_save statements to your test script after the ddt_open statement.

5. Note that in order to import data from a database, either Microsoft Query or Data Junction must be installed on your machine. You can install Microsoft Query from the custom installation of Microsoft Office. Note that Data Junction is not automatically included in your WinRunner package. To purchase Data Junction, contact your Mercury Interactive representative. For detailed information on working with Data Junction, refer to the documentation in the Data Junction package.

6. Parameterize the test: Replaces fixed values in selected checkpoints and in recorded statements with parameters, using the ddt_val function, and in the data table, adds columns with variable values for the parameters. Line by line: Opens a wizard screen for each line of the selected test script, which enables you to decide whether to parameterize a particular line, and if so, whether to add a new column to the data table or use an existing column when parameterizing data.

7. Automatically: Replaces all data with ddt_val statements and adds new columns to the data table. The first argument of the function is the name of the column in the data table. The replaced data is inserted into the table.

x. The Test script line to parameterize box displays the line of the test script to parameterize. The highlighted value can be replaced by a parameter. The Argument to be replaced box displays the argument (value) that you can replace with a parameter. You can use the arrows to select a different argument to replace.

Choose whether and how to replace the selected data:

1. Do not replace this data: Does not parameterize this data.

2. An existing column: If parameters already exist in the data table for this test, select an existing parameter from the list.

3. A new column: Creates a new column for this parameter in the data table for this test. Adds the selected data to this column of the data table. The default name for the new parameter is the logical name of the object in the selected. TSL statement above. Accept this name or assign a new name.

xi. The final screen of the wizard opens.

1. If you want the data table to open after you close the wizard, select Show data table now.

2. To perform the tasks specified in previous screens and close the wizard, click Finish.

3. To close the wizard without making any changes to the test script, click Cancel.


103. What are the three modes of running the scripts?

a) WinRunner provides three modes in which to run tests—Verify, Debug, and Update. You use each mode during a different phase of the testing process.

i. Verify

1. Use the Verify mode to check your application.

ii. Debug

1. Use the Debug mode to help you identify bugs in a test script.

iii. Update

1. Use the Update mode to update the expected results of a test or to create a new expected results folder.

104. Explain the following TSL functions:

a) Ddt_open

Creates or opens a datatable file so that WinRunner can access it.

Syntax: ddt_open ( data_table_name, mode );

data_table_name The name of the data table. The name may be the table variable name, the Microsoft Excel file or a tabbed text file name, or the full path and file name of the table. The first row in the file contains the names of the parameters. This row is labeled row 0.

mode The mode for opening the data table: DDT_MODE_READ (read-only) or DDT_MODE_READWRITE (read or write).

b) Ddt_save

Saves the information into a data file.

Syntax: dt_save (data_table_name);

data_table_name The name of the data table. The name may be the table variable name, the Microsoft Excel file or a tabbed text file name, or the full path and file name of the table.

c) Ddt_close

Closes a data table file

Syntax: ddt_close ( data_table_name );

data_table_name The name of the data table. The data table is a Microsoft Excel file or a tabbed text file. The first row in the file contains the names of the parameters.

d) Ddt_export

Exports the information of one data table file into a different data table file.

Syntax: ddt_export (data_table_namename1, data_table_namename2);

data_table_namename1 The source data table filename.

data_table_namename2 The destination data table filename.

e) Ddt_show

Shows or hides the table editor of a specified data table.

Syntax: ddt_show (data_table_name [, show_flag]);

data_table_name The name of the data table. The name may be the table variable name, the Microsoft Excel file or a tabbed text file name, or the full path and file name of the table.

show_flag The value indicating whether the editor should be shown (default=1) or hidden (0).

f) Ddt_get_row_count

Retrieves the no. of rows in a data tables

Syntax: ddt_get_row_count (data_table_name, out_rows_count);

data_table_name The name of the data table. The name may be the table variable name, the Microsoft Excel file or a tabbed text file name, or the full path and file name of the table. The first row in the file contains the names of the parameters.

out_rows_count The output variable that stores the total number of rows in the data table.

g) ddt_next_row

Changes the active row in a database to the next row

Syntax: ddt_next_row (data_table_name);

data_table_name The name of the data table. The name may be the table variable name, the Microsoft Excel file or a tabbed text file name, or the full path and file name of the table. The first row in the file contains the names of the parameters.

h) ddt_set_row

Sets the active row in a data table.

Syntax: ddt_set_row (data_table_name, row);

data_table_name The name of the data table. The name may be the table variable name, the Microsoft Excel file or a tabbed text file name, or the full path and file name of the table. The first row in the file contains the names of the parameters. This row is labeled row 0.

row The new active row in the data table.

i) ddt_set_val

Sets a value in the current row of the data table

Syntax: ddt_set_val (data_table_name, parameter, value);

data_table_name The name of the data table. The name may be the table variable name, the Microsoft Excel file or a tabbed text file name, or the full path and file name of the table. The first row in the file contains the names of the parameters. This row is labeled row 0.

parameter The name of the column into which the value will be inserted.

value The value to be written into the table.

j) ddt_set_val_by_row

Sets a value in a specified row of the data table.

Syntax: ddt_set_val_by_row (data_table_name, row, parameter, value);

data_table_name The name of the data table. The name may be the table variable name, the Microsoft Excel file or a tabbed text file name, or the full path and file name of the table. The first row in the file contains the names of the parameters. This row is labeled row 0.

row The row number in the table. It can be any existing row or the current row number plus 1, which will add a new row to the data table.

parameter The name of the column into which the value will be inserted.

value The value to be written into the table.

k) ddt_get_current_row

Retrieves the active row of a data table.

Syntax: ddt_get_current_row ( data_table_name, out_row );

data_table_name The name of the data table. The name may be the table variable name, the Microsoft Excel file or a tabbed text file name, or the full path and file name of the table. The first row in the file contains the names of the parameters. This row is labeled row 0.

out_row The output variable that stores the active row in the data table.

l) ddt_is_parameter

Returns whether a parameter in a datatable is valid

Syntax: ddt_is_parameter (data_table_name, parameter);

data_table_name The name of the data table. The name may be the table variable name, the Microsoft Excel file or a tabbed text file name, or the full path and file name of the table. The first row in the file contains the names of the parameters.

parameter The parameter name to check in the data table.

m) ddt_get_parameters

Returns a list of all parameters in a data table.

Syntax: ddt_get_parameters ( table, params_list, params_num );

table The pathname of the data table.

params_list This out parameter returns the list of all parameters in the data table, separated by tabs.

params_num This out parameter returns the number of parameters in params_list.

n) ddt_val

Returns the value of a parameter in the active roe in a data table.

Syntax: ddt_val (data_table_name, parameter);

data_table_name The name of the data table. The name may be the table variable name, the Microsoft Excel file or a tabbed text file name, or the full path and file name of the table. The first row in the file contains the names of the parameters.

parameter The name of the parameter in the data table.

o) ddt_val_by_row

Returns the value of a parameter in the specified row in a data table.

Syntax: ddt_val_by_row ( data_table_name, row_number, parameter );

data_table_name The name of the data table. The name may be the table variable name, the Microsoft Excel file or a tabbed text file name, or the full path and file name of the table. The first row in the file contains the names of the parameters. This row is labeled row 0.

row_number The number of the row in the data table.

parameter The name of the parameter in the data table.

p) ddt_report_row

Reports the active row in a data table to the test results

Syntax: ddt_report_row (data_table_name);

data_table_name The name of the data table. The name may be the table variable name, the Microsoft Excel file or a tabbed text file name, or the full path and file name of the table. The first row in the file contains the names of the parameters. This row is labeled row 0.

q) ddt_update_from_db

imports data from a database into a data table. It is inserted into your test script when you select the Import data from a database option in the DataDriver Wizard. When you run your test, this function updates the data table with data from the database.

105. How do you handle unexpected events and errors?

a) WinRunner uses exception handling to detect an unexpected event when it occurs and act to recover the test run.

Define Exception Handling

Define Exception

Define Handler Function

WinRunner enables you to handle the following types of exceptions:

Pop-up exceptions: Instruct WinRunner to detect and handle the appearance of a specific window.

TSL exceptions: Instruct WinRunner to detect and handle TSL functions that return a specific error code.

Object exceptions: Instruct WinRunner to detect and handle a change in a property for a specific GUI object.

Web exceptions: When the WebTest add-in is loaded, you can instruct WinRunner to handle unexpected events and errors that occur in your Web site during a test run.

106. How do you handle pop-up exceptions?

a) A pop-up exception Handler handles the pop-up messages that come up during the execution of the script in the AUT. TO handle this type of exception we make WinRunner learn the window and also specify a handler to the exception. It could be

i. Default actions: WinRunner clicks the OK or Cancel button in the pop-up window, or presses Enter on the keyboard. To select a default handler, click the appropriate button in the dialog box.

ii. User-defined handler: If you prefer, specify the name of your own handler. Click User Defined Function Name and type in a name in the User Defined Function Name box.

107. How do you handle TSL exceptions?

a) A TSL exception enables you to detect and respond to a specific error code returned during test execution.

b) Suppose you are running a batch test on an unstable version of your application. If your application crashes, you want WinRunner to recover test execution. A TSL exception can instruct WinRunner to recover test execution by exiting the current test, restarting the application, and continuing with the next test in the batch.

c) The handler function is responsible for recovering test execution. When WinRunner detects a specific error code, it calls the handler function. You implement this function to respond to the unexpected error in the way that meets your specific testing needs.

d) Once you have defined the exception, WinRunner activates handling and adds the exception to the list of default TSL exceptions in the Exceptions dialog box. Default TSL exceptions are defined by the XR_EXCP_TSL configuration parameter in the wrun.ini configuration file.

108. How do you handle object exceptions?

a) During testing, unexpected changes can occur to GUI objects in the application you are testing. These changes are often subtle but they can disrupt the test run and distort results.

b) You could use exception handling to detect a change in property of the GUI object during the test run, and to recover test execution by calling a handler function and continue with the test execution

109. How do you comment your script?

a) We comment a script or line of script by inserting a ‘#’ at the beginning of the line.

110. What is a compile module?

a) A compiled module is a script containing a library of user-defined functions that you want to call frequently from other tests. When you load a compiled module, its functions are automatically compiled and remain in memory. You can call them directly from within any test.

b) Compiled modules can improve the organization and performance of your tests. Since you debug compiled modules before using them, your tests will require less error-checking. In addition, calling a function that is already compiled is significantly faster than interpreting a function in a test script.

Win Runner Q & A Part 10

Win Runner Q & A Part 10

91. How do you convert a database file to a text file?

a) You can use Data Junction to create a conversion file which converts a database to a target text file.

92. How do you parameterize database check points?

a) When you create a standard database checkpoint using ODBC (Microsoft Query), you can add parameters to an SQL statement to parameterize the checkpoint. This is useful if you want to create a database checkpoint with a query in which the SQL statement defining your query changes.

93. How do you create parameterize SQL commands?

a) A parameterized query is a query in which at least one of the fields of the WHERE clause is parameterized, i.e., the value of the field is specified by a question mark symbol ( ? ). For example, the following SQL statement is based on a query on the database in the sample Flight Reservation application:


i. SELECT Flights.Departure, Flights.Flight_Number, Flights.Day_Of_Week FROM Flights Flights WHERE (Flights.Departure=?) AND (Flights.Day_Of_Week=?)

SELECT defines the columns to include in the query.

FROM specifies the path of the database.

WHERE (optional) specifies the conditions, or filters to use in the query.

Departure is the parameter that represents the departure point of a flight.

Day_Of_Week is the parameter that represents the day of the week of a flight.

b) When creating a database checkpoint, you insert a db_check statement into your test script. When you parameterize the SQL statement in your checkpoint, the db_check function has a fourth, optional, argument: the parameter_array argument. A statement similar to the following is inserted into your test script:

db_check("list1.cdl", "dbvf1", NO_LIMIT, dbvf1_params);

The parameter_array argument will contain the values to substitute for the parameters in the parameterized checkpoint.

94. Explain the following commands:

a) db_connect

to connect to a database

db_connect(, );

b) db_execute_query

to execute a query

db_execute_query ( session_name, SQL, record_number );

record_number is the out value.

c) db_get_field_value

returns the value of a single field in the specified row_index and column in the session_name database session.

db_get_field_value ( session_name, row_index, column );

d) db_get_headers

returns the number of column headers in a query and the content of the column headers, concatenated and delimited by tabs.

db_get_headers ( session_name, header_count, header_content );

e) db_get_row

returns the content of the row, concatenated and delimited by tabs.

db_get_row ( session_name, row_index, row_content );

f) db_write_records

writes the record set into a text file delimited by tabs.

db_write_records ( session_name, output_file [ , headers [ , record_limit ] ] );

g) db_get_last_error

returns the last error message of the last ODBC or Data Junction operation in the session_name database session.

db_get_last_error ( session_name, error );

h) db_disconnect

disconnects from the database and ends the database session.

db_disconnect ( session_name );

i) db_dj_convert

runs the djs_file Data Junction export file. When you run this file, the Data Junction Engine converts data from one spoke (source) to another (target). The optional parameters enable you to override the settings in the Data Junction export file.

db_dj_convert ( djs_file [ , output_file [ , headers [ , record_limit ] ] ] );

95. What check points you will use to read and check text on the GUI and explain its syntax?

a) You can use text checkpoints in your test scripts to read and check text in GUI objects and in areas of the screen. While creating a test you point to an object or a window containing text. WinRunner reads the text and writes a TSL statement to the test script. You may then add simple programming elements to your test scripts to verify the contents of the text.

b) You can use a text checkpoint to:

i.Read text from a GUI object or window in your application, using obj_get_text and win_get_text

ii.Search for text in an object or window, using win_find_text and obj_find_text

iii. Move the mouse pointer to text in an object or window, using obj_move_locator_text and win_move_locator_text

iv. Click on text in an object or window, using obj_click_on_text and win_click_on_text

96. Explain Get Text checkpoint from object/window with syntax?

a) We use obj_get_text (, ) function to get the text from an object

b) We use win_get_text (window, out_text [, x1, y1, x2, y2]) function to get the text from a window.

97. Explain Get Text checkpoint from screen area with syntax?

a) We use win_get_text (window, out_text [, x1, y1, x2, y2]) function to get the text from a window.

98. Explain Get Text checkpoint from selection (web only) with syntax?

a) Returns a text string from an object.

web_obj_get_text (object, table_row, table_column, out_text [, text_before, text_after, index]);

i. object The logical name of the object.

ii. table_row If the object is a table, it specifies the location of the row within a table. The string is preceded by the # character.

iii. table_column If the object is a table, it specifies the location of the column within a table. The string is preceded by the # character.

iv. out_text The output variable that stores the text string.

v. text_before Defines the start of the search area for a particular text string.

vi. text_after Defines the end of the search area for a particular text string.

vii. index The occurrence number to locate. (The default parameter number is numbered 1).

99. Explain Get Text checkpoint web text checkpoint with syntax?

a) We use web_obj_text_exists function for web text checkpoints.

web_obj_text_exists ( object, table_row, table_column, text_to_find [, text_before, text_after] );

a. object The logical name of the object to search.

b. table_row If the object is a table, it specifies the location of the row within a table. The string is preceded by the character #.

c. table_column If the object is a table, it specifies the location of the column within a table. The string is preceded by the character #.

d. text_to_find The string that is searched for.

e. text_before Defines the start of the search area for a particular text string.

f. text_after Defines the end of the search area for a particular text string.

100. Which TSL functions you will use for

a) Searching text on the window

i. find_text ( string, out_coord_array, search_area [, string_def ] );

string The string that is searched for. The string must be complete, contain no spaces, and it must be preceded and followed by a space outside the quotation marks. To specify a literal, case-sensitive string, enclose the string in quotation marks. Alternatively, you can specify the name of a string variable. In this case, the string variable can include a regular expression.

out_coord_array The name of the array that stores the screen coordinates of the text (see explanation below).

search_area The area to search, specified as coordinates x1,y1,x2,y2. These define any two diagonal corners of a rectangle. The interpreter searches for the text in the area defined by the rectangle.

string_def Defines the type of search to perform. If no value is specified, (0 or FALSE, the default), the search is for a single complete word only. When 1, or TRUE, is specified, the search is not restricted to a single, complete word.

b) getting the location of the text string

i. win_find_text ( window, string, result_array [, search_area [, string_def ] ] );

window The logical name of the window to search.

string The text to locate. To specify a literal, case sensitive string, enclose the string in quotation marks. Alternatively, you can specify the name of a string variable. The value of the string variable can include a regular expression. The regular expression should not include an exclamation mark (!), however, which is treated as a literal character. For more information regarding Regular Expressions, refer to the "Using Regular Expressions" chapter in your User's Guide.

result_array The name of the output variable that stores the location of the string as a four-element array.

search_area The region of the object to search, relative to the window. This area is defined as a pair of coordinates, with x1,y1,x2,y2 specifying any two diagonally opposite corners of the rectangular search region. If this parameter is not defined, then the entire window is considered the search area.

string_def Defines how the text search is performed. If no string_def is specified, (0 or FALSE, the default parameter), the interpreter searches for a complete word only. If 1, or TRUE, is specified, the search is not restricted to a single, complete word.

c) Moving the pointer to that text string

i. win_move_locator_text (window, string [ ,search_area [ ,string_def ] ] );

window The logical name of the window.

string The text to locate. To specify a literal, case sensitive string, enclose the string in quotation marks. Alternatively, you can specify the name of a string variable. The value of the string variable can include a regular expression (the regular expression need not begin with an exclamation mark).

search_area The region of the object to search, relative to the window. This area is defined as a pair of coordinates, with x1, y1, x2, y2 specifying any two diagonally opposite corners of the rectangular search region. If this parameter is not defined, then the entire window specified is considered the search area.

string_def Defines how the text search is performed. If no string_def is specified, (0 or FALSE, the default parameter), the interpreter searches for a complete word only. If 1, or TRUE, is specified, the search is not restricted to a single, complete word.

d) Comparing the text

i. compare_text (str1, str2 [, chars1, chars2]);

str1, str2 The two strings to be compared.

chars1 One or more characters in the first string.

chars2 One or more characters in the second string. These characters are substituted for those in chars1.

Win Runner Q & A Part 9

Win Runner Q & A Part 9

81. What do you verify with the database check point custom and what command it generates, explain syntax?

a) When you create a custom check on a database, you create a standard database checkpoint in which you can specify which properties to check on a result set.

b) You can create a custom check on a database in order to:

i. check the contents of part or the entire result set

ii. edit the expected results of the contents of the result set

iii. count the rows in the result set

iv. count the columns in the result set

c) You can create a custom check on a database using ODBC, Microsoft Query or Data Junction.

82. What do you verify with the sync point for object/window property and what command it generates, explain syntax?

a) Synchronization compensates for inconsistencies in the performance of your application during a test run. By inserting a synchronization point in your test script, you can instruct WinRunner to suspend the test run and wait for a cue before continuing the test.

b) You can a synchronization point that instructs WinRunner to wait for a specified object or window to appear. For example, you can tell WinRunner to wait for a window to open before performing an operation within that window, or you may want WinRunner to wait for an object to appear in order to perform an operation on that object.

c) You use the obj_exists function to create an object synchronization point, and you use the win_exists function to create a window synchronization point. These functions have the following syntax:

Syntax:

obj_exists ( object [, time ] );

win_exists ( window [, time ] );

83. What do you verify with the sync point for object/window bitmap and what command it generates, explain syntax?

a) You can create a bitmap synchronization point that waits for the bitmap of an object or a window to appear in the application being tested.

b) During a test run, WinRunner suspends test execution until the specified bitmap is redrawn, and then compares the current bitmap with the expected one captured earlier. If the bitmaps match, then WinRunner continues the test.

Syntax:

obj_wait_bitmap ( object, image, time );

win_wait_bitmap ( window, image, time );

84. What do you verify with the sync point for screen area and what command it generates, explain syntax?

a) For screen area verification we actually capture the screen area into a bitmap and verify the application screen area with the bitmap file during execution

Syntax: obj_wait_bitmap(object, image, time, x, y, width, height);

85. How do you edit checklist file and when do you need to edit the checklist file?

a) WinRunner has an edit checklist file option under the create menu. Select the “Edit GUI Checklist” to modify GUI checklist file and “Edit Database Checklist” to edit database checklist file. This brings up a dialog box that gives you option to select the checklist file to modify. There is also an option to select the scope of the checklist file, whether it is Test specific or a shared one. Select the checklist file, click OK which opens up the window to edit the properties of the objects.

86. How do you edit the expected value of an object?

a) We can modify the expected value of the object by executing the script in the Update mode. We can also manually edit the gui*.chk file which contains the expected values which come under the exp folder to change the values.

87. How do you modify the expected results of a GUI checkpoint?

a) We can modify the expected results of a GUI checkpoint be running the script containing the checkpoint in the update mode.

88. How do you handle ActiveX and Visual basic objects?

a) WinRunner provides with add-ins for ActiveX and Visual basic objects. When loading WinRunner, select those add-ins and these add-ins provide with a set of functions to work on ActiveX and VB objects.

89. How do you create ODBC query?

a) We can create ODBC query using the database checkpoint wizard. It provides with option to create an SQL file that uses an ODBC DSN to connect to the database. The SQL File will contain the connection string and the SQL statement.

90. How do you record a data driven test?

a) We can create a data-driven testing using data from a flat file, data table or a database.

i. Using Flat File: we actually store the data to be used in a required format in the file. We access the file using the File manipulation commands, reads data from the file and assign the variables with data.

ii. Data Table: It is an excel file. We can store test data in these files and manipulate them. We use the ‘ddt_*’ functions to manipulate data in the data table.

iii.Database: we store test data in the database and access these data using ‘db_*’ functions.

Win Runner Q & A Part 8

Win Runner Q & A Part 8

71. What is parameterizing?

a) In order for WinRunner to use data to drive the test, you must link the data to the test script which it drives. This is called parameterizing your test. The data is stored in a data table.

72. How do you maintain the document information of the test scripts?

a) Before creating a test, you can document information about the test in the General and Description tabs of the Test Properties dialog box. You can enter the name of the test author, the type of functionality tested, a detailed description of the test, and a reference to the relevant functional specifications document.

73. What do you verify with the GUI checkpoint for single property and what command it generates, explain syntax?

a) You can check a single property of a GUI object. For example, you can check whether a button is enabled or disabled or whether an item in a list is selected. To create a GUI checkpoint for a property value, use the Check Property dialog box to add one of the following functions to the test script:

i. button_check_info

ii. scroll_check_info

iii. edit_check_info

iv. static_check_info

v. list_check_info

vi. win_check_info

vii. obj_check_info

Syntax: button_check_info (button, property, property_value );

edit_check_info ( edit, property, property_value );

74. What do you verify with the GUI checkpoint for object/window and what command it generates, explain syntax?

a) You can create a GUI checkpoint to check a single object in the application being tested. You can either check the object with its default properties or you can specify which properties to check.

b) Creating a GUI Checkpoint using the Default Checks

i. You can create a GUI checkpoint that performs a default check on the property recommended by WinRunner. For example, if you create a GUI checkpoint that checks a push button, the default check verifies that the push button is enabled.

ii. To create a GUI checkpoint using default checks:

1. Choose Create > GUI Checkpoint > For Object/Window, or click the GUI Checkpoint for Object/Window button on the User toolbar. If you are recording in Analog mode, press the CHECK GUI FOR OBJECT/WINDOW softkey in order to avoid extraneous mouse movements. Note that you can press the CHECK GUI FOR OBJECT/WINDOW softkey in Context Sensitive mode as well. The WinRunner window is minimized, the mouse pointer becomes a pointing hand, and a help window opens on the screen.

2. Click an object.

3. WinRunner captures the current value of the property of the GUI object being checked and stores it in the test’s expected results folder. The WinRunner window is restored and a GUI checkpoint is inserted in the test script as an obj_check_gui statement

Syntax: win_check_gui ( window, checklist, expected_results_file, time );

c) Creating a GUI Checkpoint by Specifying which Properties to Check

d) You can specify which properties to check for an object. For example, if you create a checkpoint that checks a push button, you can choose to verify that it is in focus, instead of enabled.

e) To create a GUI checkpoint by specifying which properties to check:

i. Choose Create > GUI Checkpoint > For Object/Window, or click the GUI Checkpoint for Object/Window button on the User toolbar. If you are recording in Analog mode, press the CHECK GUI FOR OBJECT/WINDOW softkey in order to avoid extraneous mouse movements. Note that you can press the CHECK GUI FOR OBJECT/WINDOW softkey in Context Sensitive mode as well. The WinRunner window is minimized, the mouse pointer becomes a pointing hand, and a help window opens on the screen.

ii. Double-click the object or window. The Check GUI dialog box opens.

iii. Click an object name in the Objects pane. The Properties pane lists all the properties for the selected object.

iv. Select the properties you want to check.

1. To edit the expected value of a property, first select it. Next, either click the Edit Expected Value button, or double-click the value in the Expected Value column to edit it.

2. To add a check in which you specify arguments, first select the property for which you want to specify arguments. Next, either click the Specify Arguments button, or double-click in the Arguments column. Note that if an ellipsis (three dots) appears in the Arguments column, then you must specify arguments for a check on this property. (You do not need to specify arguments if a default argument is specified.) When checking standard objects, you only specify arguments for certain properties of edit and static text objects. You also specify arguments for checks on certain properties of nonstandard objects.

3. To change the viewing options for the properties of an object, use the Show Properties buttons.

4. Click OK to close the Check GUI dialog box. WinRunner captures the GUI information and stores it in the test’s expected results folder. The WinRunner window is restored and a GUI checkpoint is inserted in the test script as an obj_check_gui or a win_check_gui statement.

Syntax: win_check_gui ( window, checklist, expected_results_file, time );

obj_check_gui ( object, checklist, expected results file, time );

75. What do you verify with the GUI checkpoint for multiple objects and what command it generates, explain syntax?

a) To create a GUI checkpoint for two or more objects:

i. Choose Create > GUI Checkpoint > For Multiple Objects or click the GUI Checkpoint for Multiple Objects button on the User toolbar. If you are recording in Analog mode, press the CHECK GUI FOR MULTIPLE OBJECTS softkey in order to avoid extraneous mouse movements. The Create GUI Checkpoint dialog box opens.

ii. Click the Add button. The mouse pointer becomes a pointing hand and a help window opens.

iii. To add an object, click it once. If you click a window title bar or menu bar, a help window prompts you to check all the objects in the window.

iv. The pointing hand remains active. You can continue to choose objects by repeating step 3 above for each object you want to check.

v. Click the right mouse button to stop the selection process and to restore the mouse pointer to its original shape. The Create GUI Checkpoint dialog box reopens.

vi. The Objects pane contains the name of the window and objects included in the GUI checkpoint. To specify which objects to check, click an object name in the Objects pane. The Properties pane lists all the properties of the object. The default properties are selected.

1. To edit the expected value of a property, first select it. Next, either click the Edit Expected Value button, or double-click the value in the Expected Value column to edit it.

2. To add a check in which you specify arguments, first select the property for which you want to specify arguments. Next, either click the Specify Arguments button, or double-click in the Arguments column. Note that if an ellipsis appears in the Arguments column, then you must specify arguments for a check on this property. (You do not need to specify arguments if a default argument is specified.) When checking standard objects, you only specify arguments for certain properties of edit and static text objects. You also specify arguments for checks on certain properties of nonstandard objects.

3. To change the viewing options for the properties of an object, use the Show Properties buttons.

vii. To save the checklist and close the Create GUI Checkpoint dialog box, click OK. WinRunner captures the current property values of the selected GUI objects and stores it in the expected results folder. A win_check_gui statement is inserted in the test script.

Syntax: win_check_gui ( window, checklist, expected_results_file, time );

obj_check_gui ( object, checklist, expected results file, time );

76. What information is contained in the checklist file and in which file expected results are stored?

a) The checklist file contains information about the objects and the properties of the object we are verifying.

b) The gui*.chk file contains the expected results which is stored in the exp folder

77. What do you verify with the bitmap check point for object/window and what command it generates, explain syntax?

a) You can check an object, a window, or an area of a screen in your application as a bitmap. While creating a test, you indicate what you want to check. WinRunner captures the specified bitmap, stores it in the expected results folder (exp) of the test, and inserts a checkpoint in the test script. When you run the test, WinRunner compares the bitmap currently displayed in the application being tested with the expected bitmap stored earlier. In the event of a mismatch, WinRunner captures the current actual bitmap and generates a difference bitmap. By comparing the three bitmaps (expected, actual, and difference), you can identify the nature of the discrepancy.

b) When working in Context Sensitive mode, you can capture a bitmap of a window, object, or of a specified area of a screen. WinRunner inserts a checkpoint in the test script in the form of either a win_check_bitmap or obj_check_bitmap statement.

c) Note that when you record a test in Analog mode, you should press the CHECK BITMAP OF WINDOW softkey or the CHECK BITMAP OF SCREEN AREA softkey to create a bitmap checkpoint. This prevents WinRunner from recording extraneous mouse movements. If you are programming a test, you can also use the Analog function check_window to check a bitmap.

d) To capture a window or object as a bitmap:

i. Choose Create > Bitmap Checkpoint > For Object/Window or click the Bitmap Checkpoint for Object/Window button on the User toolbar. Alternatively, if you are recording in Analog mode, press the CHECK BITMAP OF OBJECT/WINDOW softkey. The WinRunner window is minimized, the mouse pointer becomes a pointing hand, and a help window opens.

ii. Point to the object or window and click it. WinRunner captures the bitmap and generates a win_check_bitmap or obj_check_bitmap statement in the script. The TSL statement generated for a window bitmap has the following syntax:

win_check_bitmap ( object, bitmap, time );

iii. For an object bitmap, the syntax is:

obj_check_bitmap ( object, bitmap, time );

iv. For example, when you click the title bar of the main window of the Flight Reservation application, the resulting statement might be:

win_check_bitmap ("Flight Reservation", "Img2", 1);

v. However, if you click the Date of Flight box in the same window, the statement might be:

obj_check_bitmap ("Date of Flight:", "Img1", 1);

Syntax: obj_check_bitmap ( object, bitmap, time [, x, y, width, height] );

78. What do you verify with the bitmap checkpoint for screen area and what command it generates, explain syntax?

a) You can define any rectangular area of the screen and capture it as a bitmap for comparison. The area can be any size: it can be part of a single window, or it can intersect several windows. The rectangle is identified by the coordinates of its upper left and lower right corners, relative to the upper left corner of the window in which the area is located. If the area intersects several windows or is part of a window with no title (for example, a popup window), its coordinates are relative to the entire screen (the root window).

b) To capture an area of the screen as a bitmap:

i. Choose Create > Bitmap Checkpoint > For Screen Area or click the Bitmap Checkpoint for Screen Area button. Alternatively, if you are recording in Analog mode, press the CHECK BITMAP OF SCREEN AREA softkey. The WinRunner window is minimized, the mouse pointer becomes a crosshairs pointer, and a help window opens.

ii. Mark the area to be captured: press the left mouse button and drag the mouse pointer until a rectangle encloses the area; then release the mouse button.

iii. Press the right mouse button to complete the operation. WinRunner captures the area and generates a win_check_bitmap statement in your script.

iv. The win_check_bitmap statement for an area of the screen has the following syntax:

win_check_bitmap ( window, bitmap, time, x, y, width, height );

79. What do you verify with the database checkpoint default and what command it generates, explain syntax?

a) By adding runtime database record checkpoints you can compare the information in your application during a test run with the corresponding record in your database. By adding standard database checkpoints to your test scripts, you can check the contents of databases in different versions of your application.

b) When you create database checkpoints, you define a query on your database, and your database checkpoint checks the values contained in the result set. The result set is set of values retrieved from the results of the query.

c) You can create runtime database record checkpoints in order to compare the values displayed in your application during the test run with the corresponding values in the database. If the comparison does not meet the success criteria you

d) specify for the checkpoint, the checkpoint fails. You can define a successful runtime database record checkpoint as one where one or more matching records were found, exactly one matching record was found, or where no matching records are found.

e) You can create standard database checkpoints to compare the current values of the properties of the result set during the test run to the expected values captured during recording or otherwise set before the test run. If the expected results and the current results do not match, the database checkpoint fails. Standard database checkpoints are useful when the expected results can be established before the test run.

Syntax: db_check(, );

f) You can add a runtime database record checkpoint to your test in order to compare information that appears in your application during a test run with the current value(s) in the corresponding record(s) in your database. You add runtime database record checkpoints by running the Runtime Record Checkpoint wizard. When you are finished, the wizard inserts the appropriate db_record_check statement into your script.

Syntax:

db_record_check(ChecklistFileName,SuccessConditions,RecordNumber );

ChecklistFileName A file created by WinRunner and saved in the test's checklist folder. The file contains information about the data to be captured during the test run and its corresponding field in the database. The file is created based on the information entered in the Runtime Record Verification wizard.

Contains one of the following values:

1. DVR_ONE_OR_MORE_MATCH - The checkpoint passes if one or more matching database records are found.

2. DVR_ONE_MATCH - The checkpoint passes if exactly one matching database record is found.

3. DVR_NO_MATCH - The checkpoint passes if no matching database records are found.

RecordNumber An out parameter returning the number of records in the database.

80. How do you handle dynamically changing area of the window in the bitmap checkpoints?

a) The difference between bitmaps option in the Run Tab of the general options defines the minimum number of pixels that constitute a bitmap mismatch

Win Runner Q & A Part 7

Win Runner Q & A Part 7

61. What is the name of custom class in WinRunner and what methods it applies on the custom objects?

a) WinRunner learns custom class objects under the generic “object” class. WinRunner records operations on custom objects using obj_ statements.

62. In a situation when obligatory and optional both the properties cannot uniquely identify an object what method WinRunner applies?

a) In cases where the obligatory and optional properties do not uniquely identify an object, WinRunner uses a selector to differentiate between them. Two types of selectors are available:

i. A location selector uses the spatial position of objects.

ii. An index selector uses a unique number to identify the object in a window.

63 What is the purpose of different record methods 1) Record 2) Pass up 3) As Object 4) Ignore.

a) Record instructs WinRunner to record all operations performed on a GUI object. This is the default record method for all classes. (The only exception is the static class (static text), for which the default is Pass Up.)

b) Pass Up instructs WinRunner to record an operation performed on this class as an operation performed on the element containing the object. Usually this element is a window, and the operation is recorded as win_mouse_click.

c) As Object instructs WinRunner to record all operations performed on a GUI object as though its class were “object” class.

d) Ignore instructs WinRunner to disregard all operations performed on the class.

64. How do you find out which is the start up file in WinRunner?

a) The test script name in the Startup Test box in the Environment tab in the General Options dialog box is the start up file in WinRunner.

65. What are the virtual objects and how do you learn them?

a) Applications may contain bitmaps that look and behave like GUI objects. WinRunner records operations on these bitmaps using win_mouse_click statements. By defining a bitmap as a virtual object, you can instruct WinRunner to treat it like a GUI object such as a push button, when you record and run tests.

b) Using the Virtual Object wizard, you can assign a bitmap to a standard object class, define the coordinates of that object, and assign it a logical name.

To define a virtual object using the Virtual Object wizard:

i. Choose Tools > Virtual Object Wizard. The Virtual Object wizard opens. Click Next.

ii. In the Class list, select a class for the new virtual object. If rows that are displayed in the window. For a table class, select the number of visible rows and columns. Click Next.

iii. Click Mark Object. Use the crosshairs pointer to select the area of the virtual object. You can use the arrow keys to make precise adjustments to the area you define with the crosshairs. Press Enter or click the right mouse button to display the virtual object’s coordinates in the wizard. If the object marked is visible on the screen, you can click the Highlight button to view it. Click Next.

iv.Assign a logical name to the virtual object. This is the name that appears in the test script when you record on the virtual object. If the object contains text that WinRunner can read, the wizard suggests using this text for the logical name. Otherwise, WinRunner suggests virtual_object, virtual_push_button, virtual_list, etc.

v. You can accept the wizard’s suggestion or type in a different name. WinRunner checks that there are no other objects in the GUI map with the same name before confirming your choice. Click Next.

66.H ow you created you test scripts 1) by recording or 2) programming?

a) Programming. I have done complete programming only, absolutely no recording.

67. What are the two modes of recording?

a) There are 2 modes of recording in WinRunner

i.Context Sensitive recording records the operations you perform on your application by identifying Graphical User Interface (GUI) objects.

ii.Analog recording records keyboard input, mouse clicks, and the precise x- and y-coordinates traveled by the mouse pointer across the screen.

68.