Custom Search

Test case writing :: Test Case Design Examples

Test case writing


Test Case Design Examples 
 
1). How do we write test cases without documents or knowing the requirements?

            We can go to adopt a testing technique called Exploratory Testing. According to James Bach exploratory testing is defined as "an interactive process of concurrent product exploration, test design, and test execution."

2). what are the test cases for one Rupees Coin Box (Telephone box)?
Positive test cases:
TC1: Pick up the Handset
Expected: Should display the message " Insert one rupee coin"  
TC2: Insert the coin 
Expected: Should display the message " Dial the Number"  
TC3: When you get a busy tone, hang-up the receiver
Expected: The inserted one rupee coin comes out of the exit door.
TC4:  Finish off the conversation and hang-up the receiver
Expected: The inserted coin should not come out.
TC5: During the conversation, in case of a local call, (assume the duration is of 60 sec), when 45 as are completed
Expected: It should prompt you to insert another coin to continue by giving beeps.
TC6: In the above scenario, if another coin is inserted
Expected: 60 sec will be added to the counter.
TC7: In the TC5 scenario, if you don't insert one more coin.
Expected: The call gets ended.
TC8: Pick up the receiver. Insert appropriate one rupee coin; Dial the number after hearing the ring tone. Assume it got connected and you are getting the ring tone. Immediately you end up the call.
Expected: The inserted one rupee coin comes out of the exit door.
3). How will you review test cases?
            By following a Test Case Review Checklist, as detailed below

Test Case Preparation checklist:
This is used to ensure Test cases have been prepared as per specifications. For all the test responses the test case preparation review checklist test mgr will assess the impact & document it as an issue to concerned parties for resolution. This can be assessed using weekly status reports or emails.

Context
                              Activity
Yes
No
Comments

Is the approved Test Plan available


Are the resources identified to implement test plan


Are the Base line docs available


Is domain knowledge being imparted to the team members who are working on the application


Have Test cases been developed considering all requirements


Have all the +ve as well as –ve test cases been identified


Have all boundary test cases been covered


Have test cases been written for GUI/Hyperlink testing for Web application


Have test cases been written to check Date Integrity


4) Explain about Use Cases?

In software engineering, a Use Case is,

          1. A technique for capturing the potential requirements of a new system or software change.
          2. Each use case provides one or more scenarios that convey how the system should interact with the end user or another system to achieve a specific business goal.
          3. Use cases typically avoid technical jargon, preferring instead the language of the end user or domain expert.
          4. Use cases are often co-authored by software developers and end users.


5) Write test cases for cell phone
Test Cases for Mobile Phone:
1) Check whether Battery is inserted into mobile properly
2) Check Switch on/Switch off of the Mobile
3) Insert the SIM into the phone n check
4) Add one user with name and phone number in Address book
5) Check the Incoming call
6) Check the outgoing call
7) Send/receive messages for that mobile
8) Check all the numbers/Characters on the phone working fine by clicking on them.
9) Remove the user from phone book and check removed properly with name and phone number
10) Check whether Network working fine.
6) Test cases for coffee machine?
1. Plug the power cable and press the on button. The indicator bulb should glow indicating the machine is on.
2. Whether there are three different buttons Red, Blue and Green.
3. Whether Red indicated Coffee.
4. Whether Blue indicated Tea.
5. Whether Green indicated Milk.
6. Whether each button produces the correct out put (Coffee, Tea or Milk).
7. Whether the desired out put is hot or not (Coffee, Tea or Milk).
8. Whether the quantity is exceeding the specified the limit of a cup.
9. Whether the power is off (including the power indicator) when pressed the off button.
10. Verify the Output without Coffee Mix, Milk, Tea Mix in the machine

7) What are Test cases for date field validation?

 (Third party Calendar controls/date pickers will have a text box attached with a button/icon beside it)

Ans: You can consider the following test cases for a calendar control.

1. Ensure that calendar window is displayed and active, when the calendar is invoked by pressing the calendar icon.  (Once we faced an issue, the calendar window is in minimized state when we invoked the calendar.)

2. Ensure that calendar date is defaulted to system date.

3. Ensure that when a date is selected in the calendar (double click, or some other method), the selected date is displayed in the text box.

They may be many other cases, if the text box is editable or not, purpose of the date field used etc.


8) What can be the possible test cases for the Computer Mouse?

1. To check the mouse company
2. Whether it is a PS/2, USB or serial port mouse or cordless mouse
3. It should be plugged to all the ports of different manufacturers
4. It should be platform independent.
5. Right clicking on the mouse should open the context window.
6. Double clicking on any folder should open up the file
7. Should be able to scroll up and down using the scroll button on the mouse.
8. Should be able to change the functionality of the right and left mouse by changing the settings.
9. Should be able to point to the scrollbar and then drag up and down.
10. Should always point to the right place, where it is intended to point.

9)       What are GUI test cases?

             GUI test cases are designed to conduct Usability Testing to verify User Friendliness of the given application with respect to look & feel, spell mistakes, the alignment & total objects availability and their access with input devices.


10) What is the difference between positive and negative test cases

Positive Testing = (Not showing error when not supposed to) + (Showing error when supposed to) So if either of the situations in parentheses happens you have a positive test in terms of its result - not what the test was hoping to find. The application did what it was supposed to do. Here user tends to put all positive values according to requirements.

Negative Testing = (Showing error when not supposed to) + (Not showing error when supposed to)(Usually these situations crop up during boundary testing or cause-effect testing.) Here if either of the situations in parentheses happens you have a negative test in terms of its result - again, not what the test was hoping to find. The application did what it was not supposed to do. User tends to put negative values, which may crash the application.

For example in Registration Form, for Name field, user should be allowed to enter only alphabets. Here for Positive Testing, tester will enter only alphabets and application should run properly and should accept only alphabets. For Negative Testing, in the same case user tries to enter numbers, special characters and if the case is executed successfully, negative testing is successful.


11) Writing Testcase on Yahoo Mail Page after login
Testcase1: To verify that when we click mail button whether it list all the compose and check mail etc options or not
Description: click on the mail button
Expected result: Clicking of the mail button lists all the options check mail and compose etc
Testcase2:  To verify that when we click check mail option in the mail list whether it takes you to inbox page or not
Description:  click on check mail option
Expected result: check mail option opens the inbox page
Testcase3: To verify that when you click the inbox whether it displays u r received mails or not
Description: click the inbox button
Expected result: It lists all the mails u received in the inbox
Testcase4: To verify when u click the compose option in the mail button whether it takes u to compose page where u can compose and send mails
Description: click on the compose option in the mail button
Expected result: it takes u to compose page
Testcase5: To verify that after writing message when you click on 'Send' whether mail is sent to the address where you specified
Description: give mail id for which you want to send the message in the 'To' field and write the message in compose box and click on send button
Expected result: it sending the mail to the mail id which u are given in the TO field
Testcase6: To verify if you give wrong id whether it gives failure notice or not
Description: Give wrong mail id in compose page in the 'To' field and see what happens
Expected result: In your inbox one failure notice will come
Like this u can write any no of test cases on yahoo mail page
12) What is defect leakage?

Defect Leakage is also referred to as 'Defect Seepage. Defect Seepage is 'How many defects related to one particular phase is not getting captured in the same phase.
For Example: requirements related defects should be captured in Requirements review. Not in unit testing or system testing.

13) Which of the following statements about generating test cases is false?
(a) Test cases may contain multiple valid test conditions
(b) Test cases may contain multiple invalid test conditions
(c) Test cases may contain both valid and invalid test conditions
(d) Test cases may contain more than one step
(e) Test cases should contain expected results

Ans: No Statement is False


14) What is VSS? Explain?
VSS: VSS stands for Visual Source Safe. It is a configuration management tool. It is a virtual library of computer files.
Users can read any of the files in the library at any time, but in order to change them, they must first check the file out. They are then allowed to modify the file and finally check it back in. Only after they check the file in are their changes made available to other users.
Configuration Management:
Definition #1: The process of identifying and defining the configuration items in a software system, controlling the release, versioning and change of these items though out the software system life cycle, recording and reporting the status of configuration items and change requests, and verifying the completeness and correctness of configuration items.
Definition #2: The tracking and control of software development. SCM systems typically offer version control and team programming features. SCM is an acronym for software configuration management, and relates to configuration management (CM).

Configuration Management Tool: A software product providing automatic support for Change, Configuration or versions control.

         15) What is SDLC and briefly discuss the stages in SDLC?

         SDLC or software development life cycle is the whole process of developing software, beginning from Requirement gathering to maintenance. Broadly, the different stages of SDLC can be illustrated as these,
          Gathering information, Analyze, Designing, Coding, Testing, Implementation and Maintenance.
          Where each stage has a well defined procedure so that the developed software meets the customer or clients requirements in the best and most cost effective manner, without erring on the quality of the product


16) Write a test case for telephone?
Test case for telephone: 1. To check connectivity of telephone line or cable 2.To check dial tone of the phone 3. To check the keypads while you dial any valid number on the phone 4. To check ring tone with its volume levels 5.To check voice of both sides (from and to) of the phone 6. To check the display monitor of the phone. 7.To check redial option whether it's functioning or not 8. To check loudspeaker whether it is functioning or not any missing above then you can add any more test cases

17) Design the test cases on sending of the emails?
For testing sending an email you can write test cases for.
1) Performance: By using connections from different ISP's i.e. the speed.
2) If your email id is POP compliant, then check if you can sent it using email clients.
3) If you email can be sent using an attachment.
4) Maximum attachment limit.
5) Maximum mail size.
6) Sending to valid / invalid id's if mail is received / bounced back respectively.
18) What can be the various test cases for a pen?
v      To check the pen type
v      To check the pen cap is present or not
v      To check the pen ink is filled or not
v      To check the pen writing or not
v      To check the ink color i.e black or blue
v      To check the pen color
v      To check weather the pen is used to write all types of papers or not
v      To check the ink capacity of the pen
v      To check the pen product by fiber or plastic

19) Give test case for withdraw module in banking project
Step1: when the balance in the account is nil, try to withdraw some amount (amount>0) should display msg as " insufficient funds in acc"
Step 2: when the account has some balance amount, try to withdraw amount(amount>balance amount in account), should display "insufficient funds in acc"
Step 3: when the account has some balance amount, enter a amount (amount<=balance amount), should withdrawn correct amount from account.
Step 4: when the account has some balance amount, enter the amount as 0, should display msg as withdrawal amount should be > 0 and should be in multiple of hundreds( varies depending on reqs docs).
In the case of Minimum balance mandatory in the Account:
Step 5: When the account has balance amount, try to withdraw whole amount , should display msg as " Minimum balance should be maintained".
Step 6:  When the account has balance amount=minimum balance, try to withdraw any amount , should display msg as " Minimum balance should be maintained".
20) How to write test case of Login window where user name is editable to only upto 8 alpha characters?

1 Enter User Name and press LOGIN Button. User Name= COES. Should Display Warning Message Box "Please Enter User name and Password"

2 Enter Password and press LOGIN Button. Password= COES. Should Display Warning Message Box "Please Enter User name and Password"

3 Enter user Name and Password and press LOGIN Button.  "USER = COES AND Password = XYZ" (Wrong user name & password). Should Display Warning Message Box "Please Enter User name and Password"

6 Enter user Name and Password and press LOGIN Button. "USER ="" "" AND Password = "" """(Blank values). Should Display Warning Message Box "Please Enter User name and Password"

7 Enter User Name and Password and press LOGIN Button. "USER = COES AND Password = COES" (Correct user name & password). Should navigate to next page.

8 Enter User Name and Password and press LOGIN Button "USER = ADMIN AND Password = ADMIN" (Correct user name & password). Should navigate to Maintenance page.


21) How will we prepare test cases
Test cases are prepared on the basis of Requirement documents. Each company follows their own format. The test cases are 3 types.
1.GUI Test cases
a. Availability b. Alignment C. Look and Feel d. Spell checking
2.Positive test cases
3.Negative test cases
22)What is the Traceability matrix? What is its use?
Traceability Matrix is a document that provides cross-reference between Requirements/ Use Cases with Test Cases and Bugs. This document establishes the Traceability between the requirements and test cases executed in the system testing. It also provides a reference to the specific requirement with reference to a particular bug.
23) Detail on the contents of a Test Case Format as per IEEE 829?
q       Test case id
q       Test case name
q       Feature to be tested
q       Test suite id
q       Priority
q       Test environment
q       Test effort
q       Test duration
q       Precondition
q       Test procedure:
q        
Step No. Actions
Input Reqd.
Expected Actual Results






q       Test case pass or fail criteria 
24) How will you check that your test cases covered all the requirements
By using, Traceability matrix. Traceability matrix means the matrix showing the relationship b/w the requirements & test cases

25) For a triangle (sum of two sides is greater than or equal to the third side), what is the minimal number of test cases required?

The answer is 3
1.      Measure all sides of the triangle. 
2.      Add the minimum and second highest length of the triangle and store the result as Res. 
3.      Compare the Res with the largest side of the triangle.

56 comments:

Unknown said...

Hi
I would like to share News about Gaming Industries. Gaming Industry today is one of the fastest growing entertainment industries. Game testing is a process of quality control of the software used in games.

Anonymous said...

Hi this is Manimaran.. I need negative or test to break test cases for all kinds of calculator

Unknown said...

This is a good article. There are some best practices you need to follow to write proper test cases. Check this link for that:

How to write a good test case?

Unknown said...

Related Links:

Test Case Scenario

Test Case Development (Beginners Guide)

Unknown said...

Nice info about different testing methodologies and techniques.
Keep posting.

Thanks,
Goutham

mohan saravana said...


Hi, probably our entry may be off topic but anyways, I have been surfing around your blog and it looks very professional. It’s obvious you know your topic and you appear fervent about it. I’m developing a fresh blog plus I’m struggling to make it look good, as well as offer the best quality content. I have learned much at your web site and also I anticipate alot more articles and will be coming back soon. Thanks you.







Testing Training with Live Project

Unknown said...

Hi,A Web Design Cochin has been finalized comes the process of programming. At this level features like Login and Shopping cart are inculcated.Thanks......

Unknown said...

Hi, I wish to be a regular contributor of your blog. I have read your blog. Your information is really useful for beginner. I did QTP Training Chennai at Fita training and placement academy which offer best Software Testing Course in Chennai with years of experienced professionals. This is really useful for me to make a bright career.

Kalpesh Ghori said...

all test cases are nice and very clear but i won't the test specification for Simple Calculator

Unknown said...

Thanks for sharing this valuable information to our vision. You have posted a trust worthy blog keep sharing.Nice article i was really impressed by seeing this article, it was very interesting and it is very useful for me..CCNA training in chennai | CCNA training chennai | CCNA course in chennai | CCNA course chennai

DJ said...

Your information about Selenium scripts is really interesting. Also I want to know the latest new techniques which are implemented in selenium. Can you please update it in your website? SAS Training in Chennai

Unknown said...

I have read your blog and I got very useful and knowledgeable information from your blog. It’s really a very nice article Greens Technologies Training In Chennai

Unknown said...

Excellent post, I agree with you 100%! I’m always scouring the oracle for new information and learning whatever I can, and in doing so I sometimes leave comments on blogs.Oracle Training In Chennai

Unknown said...

Oracle Training in chennai | Oracle D2K Training In chennai
This information is impressive; I am inspired with your post writing style & how continuously you describe this topic. After reading your post, thanks for taking the time to discuss this, I feel happy about it and I love learning more about this topic..

Unknown said...

Excellent post. Keep update your blog. Suppose if anyone interested to learn Selenium Training in Chennai, reach us besant technologies. They provide real time training for all trainees.

Mani said...


Wonderful post. I am learning so many things from your blog.keep posting.
ETL Testing Online Training
Hadoop online Training
Informatica Online Training

aravindsai said...


Wonderful post. I am learning so many things from your blog.keep posting.
Abinitio Online Training
Hadoop Online Training
Cognos Online Training

Anonymous said...

Really amazing blog and thanks for sharing..


QTP Tutorial

Peter Johnson said...

Awe! What An Blog Very Helpful and interesting Really A great center for acquiring knowledge.Very Helpful Post And Explained Very Clearly About All the things.Very Helpful. Coming To Our Self We Provide Restaurant Equipment Parts .Really Thankfull For the blogger providing such a great information.Thank you. Have a Nice Day

Unknown said...

Thanks For Sharing Valuable Information, Very Useful For U digital transformation consulting

mathimathi said...

Amazing...The information and the pics.Looking forward to future posts.
SEO Training in Chennai |
SEO Training |
SEO Course in Chennai

mathimathi said...

Wow! What an article.. and beautiful photos! And just at the right time!
ccna Training in Chennai |
ccna course in Chennai |
ccna Training institute in Chennai

Sai Elakiyaa said...

I have been searching for quite some time for information on this topic and no doubt your website saved my time and I got my desired information. Your post has been very helpful. Thanks.
Selenium training in Chennai
Selenium Courses in Chennai
ios developer training in chennai
Best ios Training institute in Chennai
iOS Course Chennai
JAVA Training Institutes in Chennai
Java Courses in Chennai

Vicky Ram said...

I am happy to find this post Very useful for me, as it contains lot of information

Guest posting sites
Education

Unknown said...

feeling so good to read your information's in the blog.
thanks for sharing your ideas with us and add more info.
angularjs training center in bangalore
Best AngularJS Training Institute in Anna nagar
AngularJS Certification Training in T nagar

LindaJasmine said...

Awesome Post. I was searching for such a information for a while. Thanks for Posting. Pls keep on writing.
Informatica Training in Chennai
Informatica Training center Chennai
Informatica Training Institute in Chennai
Best Informatica Training in Chennai
Informatica Course in Chennai
Informatica Training center in Chennai
Informatica Training chennai


Anjali Siva said...

Thanks for sharing this test case design examples admin. It is helpful, keep sharing more like this.
DevOps certification
DevOps Training in Chennai
DevOps Training institutes in Chennai
DevOps Training in Tambaram
Data Science Training in Chennai
Blue Prism Training Institutes in Chennai
RPA Training in Chennai

Anbarasan14 said...

Thanks for your contribution in sharing such a useful information. Waiting for your further updates.

IELTS Tambaram
IELTS Coaching in Chennai Tambaram
IELTS Classes near me
IELTS Velachery
IELTS Training in Chennai Velachery
IELTS Training in Velachery
IELTS Coaching Centre in Velachery

swetha singh said...

Such an excellent and interesting blog, Do post like this more with more information, This was very useful, Thank you.
airport ground staff training courses in chennai
airport ground staff training in chennai
ground staff training in chennai

rupa said...

This information is impressive. I am inspired with your post writing style & how continuously you describe this topic. Eagerly waiting for your new blog keep doing more.
Android Training in Bangalore
Android Institute in Bangalore
Android Coaching in Bangalore
Angularjs Classes in Bangalore
Angularjs Coaching in Bangalore

LindaJasmine said...

Awesome Post. It was a pleasure reading your article. Thanks for sharing.

Pega training in chennai
Pega course in chennai
Pega training institutes in chennai
Pega course
Pega training
Pega certification training
Pega developer training

Anjali Siva said...

Thanks for sharing this interview questions, it is really helpful.
UiPath Training in Chennai
UiPath Training in Tambaram
AWS course in Chennai
Robotics Process Automation Training in Chennai
ccna course in Chennai
Angularjs Training in Chennai

karthick said...

Its a good post and keep posting good article.its very interesting to read.

Data Science Course in Chennai

LindaJasmine said...

Awesome Writing. Wonderful Post. Thanks for sharing.
Blockchain certification
Blockchain course
Blockchain courses in Chennai
Blockchain Training Chennai
Blockchain Training in Anna Nagar
Blockchain Training in T Nagar
Blockchain Training in OMR


Mr. Yansh said...

This information really amazing thanks for share this article thank you..

hindi paheliyan

nowfirstviral said...

Amazing Work

안전토토사이트

Unknown said...


Thanks for sharing this article. Really helpful for me.
www.Geonewstv.com
Free Forex Signals
Daily Bitcoin Predictions

Advancewishes2019-20 said...

Sach janiye
Mrinalini Sarabhai
Sandeep Maheshwari
dr sarvepalli radhakrishnan
Arun Gawli
Rani Padmini
Sushruta
Harshavardhana
Nanaji Deshmukh
Tansen

shri said...

very nice.....
internship in chennai for ece students
internships in chennai for cse students 2019
Inplant training in chennai
internship for eee students
free internship in chennai
eee internship in chennai
internship for ece students in chennai
inplant training in bangalore for cse
inplant training in bangalore
ccna training in chennai

arun said...

good
iot training in chennai
internship for mca students in chennai
internships for cse 3rd year students in hyderabad
information technology projects list 2018
ethical hacking course in chennai
ece internships in bangalore
internship for computer science students
internships in chennai for cse students
internship in chennai for cse 2019
internship for ece students in bangalore

Susmita Sen said...

Superb! Your blog is incredible. I am delighted with it. Thanks for sharing with me more information.
CCC Paper

subha said...

Fabulous post, you have denoted out some fantastic points, I likewise think this s a very wonderful website. I will visit again for more quality contents and also, recommend this site to all. Thanks. great work guys
Ai & Artificial Intelligence Course in Chennai
PHP Training in Chennai
Ethical Hacking Course in Chennai Blue Prism Training in Chennai
UiPath Training in Chennai

Devi said...

Excellent post, it will be definitely helpful for many people. Keep posting more like this.. oracle training in chennai

Muthu Vel said...
This comment has been removed by the author.
suresh said...

This information is impressive; I am inspired with your post writing style & how continuously you describe this topic. After reading your post, thanks for taking the time to discuss this, I feel happy about it and I love learning more about this topic.

DevOps Training in Chennai

DevOps Course in Chennai

Jaya said...



Nice blog! Thanks for sharing this valuable information
Data Science Courses in Bangalore
Data science course in Pune
Data science course in hyderabad
Data science course in delhi

Free CSEET Online Classes said...

It's been our pleasure to inform you that our institution is offering a great deal by giving CS executive classes and a free CSEET class only for those who are interested in gaining knowledge. So what are you waiting for contact us or visit our website at https://uniqueacademyforcommerce.com/

kishor said...

nices information thanku so much is information
kishorsasemahal
backlinks-strategies
paidboom hosting

subhagruha said...

Excellent blog. Lots of useful information here, thanks for your effort!
Real Estate plots in Vizag

Perfumes Dubai said...

this is the one i am searching in google to read, if you wish to buy oud perfumes in dubai check our website. we are the best perfumes seller and manufacturer in UAE.

Mrbk30 said...

Very Informative blog thank you for sharing. Keep sharing.

Best software training institute in Chennai. Make your career development the best by learning software courses.

uipath training in chennai
devops training in chennai
cloud computing courses in chennai

Block said...

Some us know all relating to the compelling medium you present
powerful steps on this blog and therefore strongly encourage
contribution from other ones on this subject while our own child is
truly discovering a great deal. Have fun with the remaining portion of
the year.
oracle dba course in chennai
java course in chennai
node js training institute in chennai

Unknown said...

Know the Latest Smartphone Price with MobileErBazaar.com totaly free

Some Peopole are want to know Vivo V23e price of bangladesh it's easy to know

VIPTHANOSS said...

link zupee game

SwarnApp said...

Very Informative post.
Jewellery Software
Jewellery Software

SwarnApp said...

Really amazing blog and thanks for sharing..
Jewellery ERP Software Dubai
Jewellery ERP Software Dubai