473,387 Members | 1,650 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Test Cases for Programs

Anyone know how to develop test cases for a program? How do you go about it? Thanks in advance for any help
Aug 29 '07 #1
6 1829
dmjpro
2,476 2GB
Anyone know how to develop test cases for a program? How do you go about it? Thanks in advance for any help

Welcome to TSDN.
You mean the debugging Software?

Kind regards,
Dmjpro.
Aug 29 '07 #2
gpraghuram
1,275 Expert 1GB
Anyone know how to develop test cases for a program? How do you go about it? Thanks in advance for any help
If u want to develop test cases for ur program then u can follow the following way
1)First u have to do white-box testing
2)Then u have to do black-box testing
3)In white-box
3.1)U have to have some boundary test cases
3.2)U have to have some equivalence test cases
3.3)Then comes for-all testing

Hope this helps u
Raghuram
Aug 29 '07 #3
No, I have to develop something called a test case in class for an algorithm I wrote, but I am not sure what it is. I searched the internet for examples and answers to my question, but I do not get much. Also, it is not in my textbook. It is not software that I am looking for though... I am sure of that. thanks
Aug 29 '07 #4
Raghuram,

I am not sure if this answers my question. I am leaving for class shortly, and I am sure the teacher will explain more throughly about Test Classes. He just gave the assignment as we walked out the door the other day, and I am pretty sure it is not graded.

You did give me some insight though on what he might be looking for, and I really appreciate you trying to help! Thanks again -
Aug 29 '07 #5
Ganon11
3,652 Expert 2GB
When I did test cases for my programs, I basically made a list of places where my program depended on user input. Then I decided what possible inputs I could try for each of these spots. Finally, I tried every combination of these inputs to see if the program behaved as I expected it to. (And yes, it was quite a lot of combinations). This will determine whether or not your program will run under a wide variety (if not all) of conditions.
Aug 29 '07 #6
When I did test cases for my programs, I basically made a list of places where my program depended on user input. Then I decided what possible inputs I could try for each of these spots. Finally, I tried every combination of these inputs to see if the program behaved as I expected it to. (And yes, it was quite a lot of combinations). This will determine whether or not your program will run under a wide variety (if not all) of conditions.
Gannon,

I appreciate your help. My group ended up using an if statement to print out the three numbers on the screen that we wanted in a sequence if it matched the expression being checked(x<y<z). This let us see if the numbers were in order. If it did not match the expression, we printed a failure statement onto the screen. We were the only group with a test case, and our teacher approved of it. Thanks Again For Your Help!!!!
Aug 30 '07 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

467
by: mike420 | last post by:
THE GOOD: 1. pickle 2. simplicity and uniformity 3. big library (bigger would be even better) THE BAD:
0
by: Remy Blank | last post by:
Ok, here we go. I added the possibility for tests using the unittest.py framework to be skipped. Basically, I added two methods to TestCase: TestCase.skip(msg): skips unconditionally...
4
by: Edvard Majakari | last post by:
Hi, I just found py.test and converted a large unit test module to py.test format (which is actually almost-no-format-at-all, but I won't get there now). Having 348 test cases in the module and...
162
by: techievasant | last post by:
hello everyone, Iam vasant from India.. I have a test+interview on C /C++ in the coming month so plz help me by giving some resources of FAQS, interview questions, tracky questions, multiple...
27
by: Josh | last post by:
We have a program written in VB6 (over 100,000 lines of code and 230 UI screens) that we want to get out of VB and into a better language. The program is over 10 years old and has already been...
6
by: tommaso.gastaldi | last post by:
In a previous post I have been asking about a way to test Alpha Transparency. Bob and Michael have kindly provided some ideas. Here I would like to share the function I have prepared, for the...
8
by: starffly | last post by:
In my program, the caculated value is supposed to be no more than the constant named MAXINT,otherwise, overflow error will be informed.however, I cannot test if the value exceeds MAXINT within the...
176
by: nw | last post by:
Hi, I previously asked for suggestions on teaching testing in C++. Based on some of the replies I received I decided that best way to proceed would be to teach the students how they might write...
48
by: Ark Khasin | last post by:
Unit testing is an integral component of both "formal" and "agile" models of development. Alas, it involves a significant amount of tedious labor. There are test automation tools out there but...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.