Tuesday, January 26, 2010

Test cases for ATM Transactions

1. Successful insertion of card
2. Unsuccessful operation duto insertion of wrong angle
3. Unsuccessful operation duto insertion of wrong card(invalid card)
4. Successful entry of PIN number
5. Unsuccessful operation duto of wrong PIN enter 3times
6. Successful selection of languages
7. Successful selection of Acc Type
8. Unsuccessful operation duto of wrong Acc Type
9. Successful Selection of withdraw option
10. Successful entry of amount
here every one discussion about with drawing money, the given question was money transactions .
1.verify ATM card insertion
2.verify card insertion when card in invalid card ( other bank card,scratches on card)
3.verify card insertion with other angles .
4.verify language selection.
5.verify entry of pin number
6.verify operation when you enter wrong pin more than 3 times
7.verify opration with selection of account type.
8.verify operation with selection of wrong account type.
9.verify balance enqiry
10.verify the entered transaction account number
11.verify when entered the transaction accont number is wrong
12. Verify when cancell button click while transfering money.
13.verify after exit


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

Test cases for Telephone

Tc1
Action: check the interface of telephone , here interface means all buttons are available and should place on proper place.
Expected result: Interface of telephone is correct
Tc2
Action: check the functionality of each button like press the button redial
Expected result : all the buttons works properly.
TC 3
Action : check the volume level of phone
Expected result. volume level is available in the phone.
Tc4
Action : randomly enter the long number
Expected result : give some message like no is not valid
TC5
Action: check for the ringer
Expected result : Telephone have ringer tone.
TC6
Action: check for the dial tone
Expected result : telephone have dial tone
TC7:
check for the connection
TC8:
Check at the receiverside he receive the message properly or not.
1. To check connectivity of telephone line or cable
2. To check the modem to determine whether it is functioning or not
3. To check dial tone of the phone
4. To check the keypad while you dial any valid number on the phone
5. To check ring tone with it’s volume levels
6. To check voice of both sides (from and to) of the phone
7. To check display monitor if the phone has
8. To check redial option whether its functioning or not
10. To check the company standard of phone
11. To check the weight and color of the phone
12. To check loud speaker whether it is functioning or notany missing above then you can add any more test cases

Test cases for Electric Bulb

The buld should be of reqd shape and size
- Should be able to be fitted and removed from the holder .
- Should sustain the voltage for which it is designed for
- Should glow on switching on
- Should not glow on switching off
- Should glow with reqd illumination(correct me if wrong)
- Life of the bulb should meet the reqrmt
1) The bulb should be of required shape and size
2) Should be able to be fitted and removed from the holder
3) Should sustain the voltage for which it is designed for
4) Should glow on switching on
5) Should not glow on switching off
6) Should glow with reqd illumination (correct me if wrong)
7) Life of the bulb should meet the requirement
1.Holder and sachet should be present to test the bulb
2.Check electricity connection should be there for that holder.
3.Check whether electricity is passing through that wire or not
1)check the colour appearance of the bulb
2) check the colour of light which it makes (illuminates)
3)check the time it takes to blow
4) check the max life of bulb
5) check if switch on and switch off suddenly what will happen
6) check the power consumption
7) check the initial voltage it takes to blow
8) check if voltage vary suddenly what will happen (increase or decrease)
9) check what will happen when switch on bulb in less voltage
10) check max heat dissipate when bulb is on

Test cases for Elevator (LIFT)

Some of the use cases would be:
1) Elevator is capable of moving up and down.
2) It is stopping at each floor.
3) It moves exactly to that floor when corresponding floor no is pressed.
4) It moves up when called from upward and down when called from downward.
5) It waits until 'close' button is pressed.
6) If anyon steps inbetween the door at the time of closing, door should open.
7) No break points exists
8) More usecases for the load that the elevator can carry (if required)
Capacity of the lift
usability (whether its easy to operate or not)
Functionality( whether it functions properly or not)
comfort (whether a person is comfortable in it or not)
height
weight
volume
time it takes to reach every floor
test for maximum capacity of the lift
test for more than max capacity
check the working in case of a power failure
Yes, when a senario is given to us i think it would be most appropriate to ask the Interviewr what is he expecting? This would actually show our attitude towards testing.
The lift could be tested for various issues.
1) Usability:
- whether it can be entered, exited easily
- is the door height appropriate.
- is there enough of space in the lift to accomodate the people as described in its requirements. ex: the lift is designed for 5 ppl & the space in the lift is just enough for 3 ppl to squeeze in.
- are the buttons to present & at visible place.
- How easy is it to operate the lift. etc
2) Functionality:
- Does the lift move on to the right floor. ex. if a person presses 2nd floor he should land on the 2nd floor not on the 4th.
- What speed is the lift moving at.
- Is the landing, taking off appropriate.
- Does it land at the right floor when a lift is called.
- Does it take the weight as per it is designed.
- Does it move as sequenced. ie if a call is made to the lift from the 5th floor while the lift is on the 3rd floor & is already moving downwards towards ground. If the lift would go down or up.
1.Capacity of lift
2.Height of lift
3,Width of lift
4.Security provided(red indicator,alarm)
5.Name of the company.
6.Space provided
7.Number exceeds than specified what security is provided
8.Wheather it comes to ground floor,top floor
9. programming provided by using PLC(top-down or can again come down)
10.If it is empty.
Capacity of the lift
usability (whether its easy to operate or not)
Functionality( whether it functions properly or not)
comfort (whether a person is comfortable in it or not)
height
weight
volume
time it takes to reach every floor
test for maximum capacity of the lift
test for more than max capacity
check the working in case of a power failure

Test cases for Pen

Dimension of the pen,

Color of the pen,

GUI testing: logo of the pen maker,

Load testing

Total length that pen can write,

Strength of the nib,

Usability testing: grip of the pen.

Against the surface it can write.

Hanger provided in the cap,

Integration testing: body of the pen should perfectly fit with the cap of the pen,

Ink in the pen, at what temp does the ink get blocked.
Size of the nib like 0.5mm/0.6mm

Load test: when pen is pressed hard against the hard surface then refill should not come out of the pen from the backside.
check the look appearnce of the pen
check the cap of the pen
check the tip of the pen
Remove the pen body
it should be slick.
it should not be too large.
it should not be too small.
it should not have sharp edges.
it should be light
it should be strong.
it should have protection from ink pour out.
Ink colour should be dark
ballpoint should be strong so it should not break if pen strikes with hard surface.
it should have cap.
pen ink should not contain harmfull chemical.
Ink should not dry if pen is not used for long time.
User inter face :
1. Check look of the pen
2. Check Pen colour As per specification
3. Check whether cap is presented
4. Check whether pen is ball or ink as per specification
5. Check pen size as per specification

functional :
1. Check whether pen is writing
2. check whether pen z writing as per specification (.5,.6)
3. Check whether pen is writing only on papers or something as per specifications

Performence:

Check whether pen is writing in any climate
Check how much of time pen able to write continuosly with out rest on same way

Recovery

1. If pen is fall down then check whether pen able to write
To check the pen company
to check the pen type
to check the pen cap is present or not
to check the pen ink is filled or not
to check the pen writing or not
to check the ink color i.e black ro blue
to check the pen color
to check weather the pen is used to write all types of papers or not
to check the ink capacity of the pen
to check the pen product by fiber or plastic
Functional test cases (here we test the functionality of pen e.g. writing in flow or not etc.)
User-Interface test caes ( look n feel of pen e.g. cap facility, easy to hold, should be attractive etc.)
Stress Testing ( check the temperature dependency e.g can it work if temp is high or low etc.)
Performance Testing
Type of pen (ink,ball,dot etc.).
Able to write (bold/thin)
Grip of the in hand (how comforting is it to hold and write with it?)
Type of ink required (ink,gel, fluid, refillable??)
Color of the ink (red, black etc.).
Does it have a cap to protect the tip of the pen.
Does it have a pocket holding gripe for better carriage.
Kind of surface it can be used upon (hard,soft,glass, etc)
For how long can the pen be able to write non stop
Does the ink leaks in hot conditions or it seizes to flow in cold conditions
What type of body does the pen have (sleek,thick,etc.)
Is the pen branded?
I will intentionaly throw the pen down on floor..to check how much brittle it is ,is it broke down or not.

to check weather the pen is used to write all types of papers or not

to check the ink capacity of the pen

to check the pen product by fiber or plastic

Test cases for Calculator

1 Check for the visibiltiy of all buttons (0-9, Backspace, CE, C, M+, MS, MR,MC,1/x,sqrt, .,%, +,-,*,/,=,+/-,
All buttons must be visible
2 Check addition button in calcultor
Click on button '2' then click on addition(+) button press '3' then click on Equal (=) button.
It must display 5.
3 Check substraction button.
Click '6' then click on Substraction(-) button press '3' then click on Equal (=) button.
It must display 3.
Click '3' then click on Substraction(-) button press '6' then Click on Equal(=) button.
It must display -3.
4 Check Multiply(*) button
Click '3' then click on Multiply(*) button press '3' then Click on Equal(=) button.It must display multiplication result as 9.
5 Check Division(/) button.
Click '6' then click on Division(/) button press '2' then Click on Equal(=) button.
It must display division result as 3.
Click '6' then click on Division(/) button press '0' then Click on Equal(=) button.
It must display Error messeage as "Cannot divide by Zero".

6 Check 1/x button function.
Click on '2' then press 1/x button then click on Equal(=) button
It must display "0.5" as rusult because 1 divide by 2 it must display 0.5

Click on '1/x' directly
It must show error message as Cannot divide by zero because it takes 0 as a x value.

7 Check "%" button Function.
check 500*10 then click on "%" button.
It must display 10% value of 500 i.e 50.

8 Check "CE" button functionality
Click '4' and click on "+" button then Click on '2' and then click on CE button
It must Clear the last value we enter so it must clear '2' and if we enter '3' and click on Equal(=) button it must display 7.

9 Check "C" button Functionality.
Click '4' and click on "+" button then Click on '2' and then click on "C" button. It must clear all values.

10 Check MS Button functionality
Click on '4' then click on MS button
It must store '4' in memory and display M as flag in left hand corner label.

11 Check MR Button functionality
Check Flag for Memory button if it shows 'M' then click on MR button.
It must show the memory value.

12 Check MC Button functionality
Click on MC button.
It must clear the value of memory. And Clear the label Flag 'M' to blank.

13 Check M+ Button functionality
Click on '4' then click on MS button then click on '5' and press M+ button.
It must display '9' as result when we click on MR button because it must add the current value '5' into the memory value. i.e '9'.

14 Check Backspace button functionality.
Enter '123456' in calculator and click on backspace button.
It must clear last value enter i.e. 6'

15 Check status of calulator
It must display '0' by default when we open a calulator.

Linux Interview Questions For software testers

1. Q. How do you list files in a directory?
A. ls - list directory contents
ls �l (-l use a long listing format)

2. Q. How do you list all files in a directory, including the hidden files?
A. ls -a (-a, do not hide entries starting with .)

3. Q. How do you find out all processes that are currently running?
A. ps -f (-f does full-format listing.)

4. Q. How do you find out the processes that are currently running or a particular user?
A. ps -au Myname (-u by effective user ID (supports names)) (a - all users)

5. Q. How do you kill a process?
A. kill -9 8 (process_id 8) or kill -9 %7 (job number 7)
kill -9 -1 (Kill all processes you can kill.)
killall - kill processes by name most (useful - killall java)


6. Q. What would you use to view contents of the file?
A. less filename
cat filename
pg filename
pr filename
more filename
most useful is command: tail file_name - you can see the end of the log file.

7. Q. What would you use to edit contents of the file?
A. vi screen editor or jedit, nedit or ex line editor

8. Q. What would you use to view contents of a large error log file?
A. tail -10 file_name ( last 10 rows)

9. Q. How do you log in to a remote Unix box?
A. Using telnet server_name or ssh -l ( ssh - OpenSSH SSH client (remote login program))

10.Q. How do you get help on a UNIX terminal?
A. man command_name
info command_name (more information)

11.Q. How do you list contents of a directory including all of its
subdirectories, providing full details and sorted by modification time?
A. ls -lac
-a all entries
-c by time

12.Q. How do you create a symbolic link to a file (give some reasons of doing so)?
A. ln /../file1 Link_name
Links create pointers to the actual files, without duplicating the contents of
the files. That is, a link is a way of providing another name to the same file.
There are two types of links to a file:Hard link, Symbolic (or soft) link;

13.Q. What is a filesystem?
A. Sum of all directories called file system.
A file system is the primary means of file storage in UNIX.
File systems are made of inodes and superblocks.

14.Q. How do you get its usage (a filesystem)?
A. By storing and manipulate files.

15.Q. How do you check the sizes of all users� home directories (one command)?
A. du -s
df


The du command summarizes disk usage by directory. It recurses through all subdirectories and shows disk usage by each subdirectory with a final total at the end.


Q. in current directory
A. ls -ps (p- directory; s - size)

16.Q. How do you check for processes started by user 'pat'?

A. ps -fu pat (-f -full_format u -user_name )

17.Q. How do you start a job on background?

A. bg %4 (job 4)

18 Q. What utility would you use to replace a string '2001' for '2002' in a text file?

A. Grep, Kde( works on Linux and Unix)

19. Q. What utility would you use to cut off the first column in a text file?
A. awk, kde

20. Q. How to copy file into directory?
A. cp /tmp/file_name . (dot mean in the current directory)

21. Q. How to remove directory with files?
A. rm -rf directory_name

22. Q. What is the difference between internal and external commands?
A. Internal commands are stored in the; same level as the operating system while external
commands are stored on the hard disk among the other utility programs.

23. Q. List the three main parts of an operating system command:
A. The three main parts are the command, options and arguments.

24 Q. What is the difference between an argument and an option (or switch)?
A. An argument is what the command should act on: it could be a filename,
directory or name. An option is specified when you want to request additional
information over and above the basic information each command supplies.

25. Q. What is the purpose of online help?
A. Online help provides information on each operating system command, the
syntax, the options, the arguments with descriptive information.

26. Q. Name two forms of security.
A. Two forms of security are Passwords and File Security with permissions specified.

27. Q. What command do you type to find help about the command who?
A. $ man who

28. Q. What is the difference between home directory and working directory?
A. Home directory is the directory you begin at when you log into the
system. Working directory can be anywhere on the system and it is where you are currently working.

29. Q. Which directory is closer to the top of the file system tree, parent directory or current directory?
A. The parent directory is above the current directory, so it is closer to the root or top of the file system.

30. Q. Given the following pathname:
$ /business/acctg/payable/supplier/april
a) If you were in the directory called acctg, what would be the relative
pathname name for the file called april?
b) What would be the absolute pathname for april?
A.
a) $ payable/supplier/april
b) $ /business/acctg/payable/supplier/april

31. Q. Suppose your directory had the following files:
help. 1 help.2 help.3 help.4 help.O1 help.O2
aid.O1 aid.O2 aid.O3 back. 1 back.2 back.3
a) What is the command to list all files ending in 2?
b) What is the command to list all files starting in aid?
c) What is the command to list all "help" files with one character extension?
A.
a) ls *2
b) ls aid.*
c) ls help.?

32. Q. What are two subtle differences in using the more and the pg commands?
A. With the more command you display another screenful by pressing
the spacebar, with pg you press the return key.
The more command returns you automatically to the UNIX
shell when completed, while pg waits until you press return.

33. Q. When is it better to use the more command rather than cat command?
A. It is sometimes better to use the more command when you are viewing
a file that will display over one screen.

34. Q. What are two functions the move mv command can carry out?
A. The mv command moves files and can also be used to rename a file or directory.

35. Q. Name two methods you could use to rename a file.
A. Two methods that could be used:
a. use the mv command
b. copy the file and give it a new name and then remove the original file if no longer needed.

36. The soccer league consists of boy and girl teams. The boy file names begin
with B, the girl teams begin with G. All of these files are in one directory
called "soccer", which is your current directory:
Bteam.abc Bteam.OOl Bteam.OO2 Bteam.OO4
Gteam.win Gteam.OOl Gteam.OO2 Gteam.OO3
Write the commands to do the following:
a) rename the file Bteam.abc to Bteam.OO3.
b) erase the file Gteam. win after you have viewed the contents of the file
c) make a directory for the boy team files called "boys", and one for the girl team files
called" girls"
d) move all the boy teams into the "boys" directory
e) move all the girl teams into the "girls" directory
f) make a new file called Gteam.OO4 that is identical to Gteam.OOl
g) make a new file called Gteam.OO5 that is identical to Bteam.OO2
A.
a) mv Bteam.abc Bteam.OO3.
b) cat Gteam.win -or- more Gteam.win
rm Gteam. win
c) mkdir boys
mkdir girls
d) mv Bteam* boys
e) mv Gteam* girls
f) cd girls
cp Gteam.OO1 Gteam.OO4
g) There are several ways to do this. Remember that we are currently in the directory
/soccer/girls.
cp ../boys/Bteam.OO2 Gteam.OO5
or
cd ../boys
cp Bteam.OO2 ../girls/Gteam.OO5


37. Q. Draw a picture of the final directory structure for the "soccer"
directory, showing all the files and directories.


38. Q. What metacharacter is used to do the following:
1.1 Move up one level higher in the directory tree structure
1.2 Specify all the files ending in .txt
1.3 Specify one character
1.4 Redirect input from a file
1.5 Redirect the output and append it to a file
A.
1. 1.1 double-dot or ..
1.2 asterisk or *
1.3 question or ?
1.4 double greater than sign: >>
1.5 the less than sign or <

39. Q. List all the files beginning with A
A. To list all the files beginning with A command: ls A*


40. Q. Which of the quoting or escape characters allows the dollar sign ($) to retain its special meaning?
A. The double quote (") allows the dollar sign ($) to retain its special meaning.
Both the backslash (\) and single quote (') would remove the special meaning of the dollar sign.

41. Q. What is a faster way to do the same command?
mv fileO.txt newdir
mv filel.txt newdir
mv file2.txt newdir
mv file3.txt newdir
A. A shortcut method would be: mv file?.txt newdir


42. Q. List two ways to create a new file:
A.
a. Copy a file to make a new file.
b. Use the output operator e.g. ls -l > newfile.txt

43. Q. What is the difference between > and >> operators?
A. The operator > either overwrites the existing file (WITHOUT WARNING) or creates a new file.
The operator >> either adds the new contents to the end of an existing file or creates a new file.

44. Write the command to do the following:
44.1 Redirect the output from the directory listing to a printer.
44.2 Add the file efg.txt to the end of the file abc.txt.
44.3 The file testdata feeds information into the file called program
44.4 Observe the contents of the file called xyz.txt using MORE.
44.5 Observe a directory listing that is four screens long.
A.
44.1 ls > lpr
44.2 cat efg.txt >> abc.txt
44.3 program < testdata
44.4 more < xyz.txt
44.5 ls > dirsave | more



45. Q. How do you estimate file space usage
A. Use du command (Summarize disk usage of each FILE, recursively for
directories.) Good to use arguments du -hs
(-h, --human-readable print sizes in human readable format (e.g., 1K 234M 2G)
(-s, --summarize display only a total for each argument)

46. Q. How can you see all mounted drives?
A. mount -l

47. Q. How can you find a path to the file in the system?
A. locate file_name (locate - list files in databases that match a pattern)

48. Q. What Linux HotKeys do you know?
A. Ctrl-Alt-F1 Exit to command prompt
Ctrl-Alt-F7 or F8 Takes you back to KDE desktop from command prompt
Crtl-Alt-Backspace Restart XWindows
Ctrl-Alt-D Show desktop

49. Q. What can you tell about the tar Command?
A. The tar program is an immensely useful archiving utility. It can combine an entire directory tree into one large file suitable for transferring or compression.

50. Q. What types of files you know?
A. Files come in eight flavors:
Normal files
Directories
Hard links
Symbolic links
Sockets
Named pipes
Character devices
Block devices

51. Q. How to copy files from on PC to another on the same network
A. Use the following command:scp yur_file you_login@your_IP
example: copy .conf file from your PC to alex computer-
scp /etc/X11/xorg.conf alex@10.0.10.169:

52. Q. Please describe information below:

-rw-rw-r-- 1 dotpc dotpc 102 Jul 18 2003 file.buf
drwxr-xr-x 9 dotpc dotpc 4096 Oct 21 09:34 bin
lrwxrwxrwx 1 dotpc dotpc 20 Mar 21 15:00 client -> client-2.9.5
drwxrwxr-x 11 dotpc dotpc 4096 Sep 2 2005 client-2.8.9
drwxrwxr-x 7 dotpc dotpc 4096 Dec 14 12:13 data
drwxr-xr-x 12 dotpc dotpc 4096 Oct 21 09:41 docs
drwxr-xr-x 5 dotpc dotpc 4096 Dec 7 14:22 etc
drwxr-xr-x 11 dotpc dotpc 4096 Mar 21 15:54 client-2.9.5
-rw-r--r-- 1 dotpc dotpc 644836 Mar 22 09:53 client-2.9.5.tar.gz

A. This is a result of command $ls -l
we have two files, 6 directories and one link to client-2.9.5 directory.
There is number of files in every directory, size and data of last change.


53. Q. If you would like to run two commands in sequence what operators you can use?

A. ; or && the difference is:
if you separate commands with ; second command will be run automatically.
if you separate commands with && second command will be run only in the case
the first was run successfully.

54. Q. How you will uncompress the file?
A. Use tar command (The GNU version of the tar archiving utility):
tar -zxvf file_name.tar.gz

55. Q.How do you execute a program or script, my_script in your current directoty?
A. ./my_script

56. Q.How to find current time configuration in the file my_new.cfg
A. grep time my_new.cfg
Grep searches the named input files (or standard input if
no files are named, or the file name - is given) for lines
containing a match to the given pattern.

Q. What does grep() stand for?
A. General Regular Expression Parser.

57. Q. What does the top command display?
A. Top provides an ongoing look at processor activity in real
time. It displays a listing of the most CPU-intensive
tasks on the system, and can provide an interactive inter­
face for manipulating processes. (q is to quit)

58. Q. How can you find configuration on linux?
A. by using /sin/ifconfig
If no arguments are given, ifconfig displays the status of the cur-
rently active interfaces. If a single interface argument is given, it displays the status of the given interface only; if a single -a argu-
ment is given, it displays the status of all interfaces, even those
that are down. Otherwise, it configures an interface.

59. Q. How to find difference in two configuration files on the same server?
A. Use diff command that is compare files line by line
diff -u /usr/home/my_project1/etc/ABC.conf /usr/home/my_project2/etc/ABC.conf

60. Q. What is the best way to see the end of a logfile.log file?
A. Use tail command - output the last part of files
tail -n file_name ( the last N lines, instead of the last 10 as default)

61. Q. Please write a loop for removing all files in the current directory that contains a word 'log'
A. for i in *log*; do rm $i; done

62. Question: How to switch to a previously used directory?
Answer: cd -


1. Q.How many VI editor modes do you know?
A.Three modes -
Command mode: letters or sequence of letters interactively command vi.
Insert mode: Text is inserted.
Command line mode: enter this mode by typing ":" and entry command line at the foot of the screen.

2. Q. How can you terminate VI session?
A.
Use command: ZZ that is save changes and quit.
Use command line: ":wq" that is write changes and quit.
Use command line: ":q!" to ignore changes and quit.

3. Q. How can you copy lines into the buffer in command mode?
A.
yy - copy a single line defined by current cursor position
3yy - copy 3 lines. Current line and two lines below it.