Test Cases for Programs

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • CodeTilYaDrop
    New Member
    • Aug 2007
    • 66

    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
  • dmjpro
    Top Contributor
    • Jan 2007
    • 2476

    #2
    Originally posted by CodeTilYaDrop
    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.

    Comment

    • gpraghuram
      Recognized Expert Top Contributor
      • Mar 2007
      • 1275

      #3
      Originally posted by CodeTilYaDrop
      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

      Comment

      • CodeTilYaDrop
        New Member
        • Aug 2007
        • 66

        #4
        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

        Comment

        • CodeTilYaDrop
          New Member
          • Aug 2007
          • 66

          #5
          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 -

          Comment

          • Ganon11
            Recognized Expert Specialist
            • Oct 2006
            • 3651

            #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.

            Comment

            • CodeTilYaDrop
              New Member
              • Aug 2007
              • 66

              #7
              Originally posted by Ganon11
              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!!!!

              Comment

              Working...