Geeks Talk

Prepare for your Next Interview




How to write testcases for n factorial.

This is a discussion on How to write testcases for n factorial. within the Test Cases forums, part of the Software Testing category; Can anyone tell me how to write test cases for n factorial (n!)?...


Go Back   Geeks Talk > Software Testing > Test Cases

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 05-09-2007
Junior Member
 
Join Date: Jul 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
yammy is on a distinguished road
How to write testcases for n factorial.

Can anyone tell me how to write test cases for n factorial (n!)?

Last edited by jainbrijesh : 05-10-2007 at 01:37 AM.
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 05-10-2007
Expert Member
 
Join Date: Sep 2006
Location: Bengalooru (Formerly called Bangalore), India
Posts: 486
Thanks: 2
Thanked 28 Times in 27 Posts
kalayama is on a distinguished road
Re: How to write testcases for n factorial.

I am a developer. So test cases might be different than a testers point of view. But anyway here are the test cases that I would do.

1) Check the core functionality- by giving few values for n ( that are acceptable or between the range).
2)Check boundary conditions like n=0 and n=max. (due to limitations on storage, developer must have placed an upper bound on "n").
3)Try giving negative conditions to check if all exceptions are handled.
Like Making n -ve or giving very high value for n (out of range).

I would call is test complete- once I am done with all these.

Cheers!
Kalayama
__________________
[COLOR="Blue"][SIZE="2"]"If you are not living on the edge of your life, you are wasting space"[/SIZE][/COLOR]

Someone says "Impossible is nothing". The man next him says "Let me see you licking your elbow tip!"

Last edited by jainbrijesh : 05-10-2007 at 10:29 AM.
Reply With Quote
The Following 2 Users Say Thank You to kalayama For This Useful Post:
  #3 (permalink)  
Old 05-10-2007
Moderator
 
Join Date: Sep 2006
Location: Delhi (India)
Posts: 866
Thanks: 12
Thanked 81 Times in 65 Posts
jainbrijesh is on a distinguished road
Re: How to write testcases for n factorial.

very good answer kalayama.

More test cases depends on application interface.

One more test case is , yes we have the boundation on "n", but still allowed value of "n" can generate the value that can't be hold by memory registers because "n!" is multiplication of numbers keeping decreasing by 1.

test by giving decimal numbers.
Even by alphabets and special characters also.
also use +x, where x can any positive integer.See, whether it is accepted or not.etc.
__________________
Brijesh Jain
brijesh.tester@yahoo.co.in
http://softwaretestingexpertise.blogspot.com
Reply With Quote
The Following User Says Thank You to jainbrijesh For This Useful Post:
  #4 (permalink)  
Old 05-10-2007
Expert Member
 
Join Date: Sep 2006
Location: Bengalooru (Formerly called Bangalore), India
Posts: 486
Thanks: 2
Thanked 28 Times in 27 Posts
kalayama is on a distinguished road
Re: How to write testcases for n factorial.

Well yes! As Brijesh pointed out , we can give blizzare values like alphabets and decimals... Hmmm... I missed that. Ofcourse Brijesh is a testing professional.

And well, No wonder I am not a test engineer

Cheers!
Kalayama
__________________
[COLOR="Blue"][SIZE="2"]"If you are not living on the edge of your life, you are wasting space"[/SIZE][/COLOR]

Someone says "Impossible is nothing". The man next him says "Let me see you licking your elbow tip!"

Last edited by kalayama : 05-10-2007 at 12:28 PM. Reason: Post didn't appear complete...
Reply With Quote
The Following User Says Thank You to kalayama For This Useful Post:
  #5 (permalink)  
Old 06-20-2007
Junior Member
 
Join Date: Sep 2006
Location: India
Posts: 26
Thanks: 5
Thanked 1 Time in 1 Post
sumath_620 is on a distinguished road
Re: How to write testcases for n factorial.

Quote:
Originally Posted by jainbrijesh View Post
very good answer kalayama.

More test cases depends on application interface.

One more test case is , yes we have the boundation on "n", but still allowed value of "n" can generate the value that can't be hold by memory registers because "n!" is multiplication of numbers keeping decreasing by 1.

test by giving decimal numbers.
Even by alphabets and special characters also.
also use +x, where x can any positive integer.See, whether it is accepted or not.etc.
how a tester have to practice on testcases?how he will be perfect in writing a testcase?
Reply With Quote
  #6 (permalink)  
Old 06-21-2007
Moderator
 
Join Date: Sep 2006
Location: Delhi (India)
Posts: 866
Thanks: 12
Thanked 81 Times in 65 Posts
jainbrijesh is on a distinguished road
Re: How to write testcases for n factorial.

Quote:
Originally Posted by sumath_620 View Post
how a tester have to practice on testcases?how he will be perfect in writing a testcase?
See, test case writing is [creativity+experience]. As you say "how he will be perfect in writing a testcase?" I want to tell only one thing "No one is perfect and nothing is perfect", I am still doing my practice on writing test cases.
__________________
Brijesh Jain
brijesh.tester@yahoo.co.in
http://softwaretestingexpertise.blogspot.com
Reply With Quote
  #7 (permalink)  
Old 06-21-2007
Junior Member
 
Join Date: Sep 2006
Location: India
Posts: 26
Thanks: 5
Thanked 1 Time in 1 Post
sumath_620 is on a distinguished road
Re: How to write testcases for n factorial.

Quote:
Originally Posted by jainbrijesh View Post
See, test case writing is [creativity+experience]. As you say "how he will be perfect in writing a testcase?" I want to tell only one thing "No one is perfect and nothing is perfect", I am still doing my practice on writing test cases.

"I am still doing my practice on writing test cases." so how ur practicing is there any methods or ideas u want to give on writing testcases?
Reply With Quote
  #8 (permalink)  
Old 06-21-2007
Moderator
 
Join Date: Sep 2006
Location: Delhi (India)
Posts: 866
Thanks: 12
Thanked 81 Times in 65 Posts
jainbrijesh is on a distinguished road
Re: How to write testcases for n factorial.

use testing techniques, Test as new application as you can (whenever you have time), like newly launched websites etc.
__________________
Brijesh Jain
brijesh.tester@yahoo.co.in
http://softwaretestingexpertise.blogspot.com
Reply With Quote
  #9 (permalink)  
Old 07-29-2007
Junior Member
 
Join Date: Jul 2007
Location: india
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
siyaa is on a distinguished road
Re: How to write testcases for n factorial.

apart from writing testcases for userinterface
i dont have any idea about wrinitg testcases for an applications
like for security,integation,etc plz help
Reply With Quote
  #10 (permalink)  
Old 12-10-2007
Junior Member
 
Join Date: Dec 2007
Location: Bangalore
Posts: 4
Thanks: 0
Thanked 2 Times in 1 Post
sachin_prasi is on a distinguished road
Re: How to write testcases for n factorial.

How to write test case for date format mm/dd/yyyy? what are the attributes should be considered here?
Reply With Quote
  #11 (permalink)  
Old 12-10-2007
Expert Member
 
Join Date: Oct 2007
Location: Mumbai
Posts: 347
Thanks: 4
Thanked 54 Times in 44 Posts
bizzzzzare is on a distinguished road
Smile Re: How to write testcases for n factorial.

Hi Sachin,

Whenever writing testcases for Date format fields, keep in mind 2 things -
1) Testing the specified format of date itself
2) Testing other input values apart from Date and Time type

While testing Date formats say for instance mm/dd/yyyy, we could check -
Format Validations

1) See if date is entered as specified, system should accept and proceed ahead
2) Try changing to format to either dd/mm/yyyy or yyyy/mm/dd. Be careful while checking for dd/mm/yyyy that we enter dates greater than 12.
3) Try entering dates as mm/dd/yy.... Check if year can be entered as just 2 places
4) Try changing the date seperator. Use '.' or '-' instead of '/'
5) Try reversing the slashes
6) Try entering Alphanumeric or alpahbetic characters

Functional Validations
1) Check if Leap year validation of Feb is maintained.
2) Check if Feb can be entered with 29 days in a normal year
3) Try entering Long range of futuristic or backward dates to ascertain the boundaries of Date value.

Cheers....
__________________
Regards,

V.Umesh Krishnan
QA Consultant
Reply With Quote
Reply

  Geeks Talk > Software Testing > Test Cases


Thread Tools
Display Modes


Similar Threads

Thread Thread Starter Forum Replies Last Post
Export 'All testcases at a time' from Mercury Quality Center Geek_Guest Quality Center 5 09-23-2008 04:36 PM
Distinguishing mixed testcases JobHelper Test Cases 4 10-29-2007 06:32 AM
How RTM is maintained when we write the negative testcases Geek_Guest Test Cases 3 06-04-2007 08:19 AM
Modified factorial problem smart_coder Brainteasers 3 01-29-2007 11:02 AM
Browse Button Testcases bharathi_ark Test Cases 1 12-16-2006 07:07 AM


All times are GMT -4. The time now is 01:21 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Copyright © 2008 GeekInterview.com. All Rights Reserved