Jump to content
Sign in to follow this  
CheeseMan42

Black Box Testing In Java?

Recommended Posts

This weeks labs for my CS1 class need us to use black box testing. The only problem is our teacher didn't tell us what that is, and I looked in my book, nothing, checked google, couldn't find anything useful. Could someone please tell me what it is?

Share this post


Link to post
Share on other sites

Basically black box is where have a user test the software without knowing what the limits or the constraints of the software is and see if they can break it. http://www.webopedia.com/TERM/B/Black_Box_Testing.html

 

Unlike White box testing where the testing is done by the designer who knows what will break and what will not. Or somebody who has detailed knowledge of the internal workings. http://www.webopedia.com/TERM/W/White_Box_Testing.html

Share this post


Link to post
Share on other sites

that doesnt make much sense then. i have to write a program to black box test another program. i am confused

Share this post


Link to post
Share on other sites

Sorry if this post is short, i just hit the go button on my browser after typing a lengthy reply.

 

Firstly, get your test ready!

No matter what test you do, you need some sort of relavant data to pass into the system, to be prosessed. For a basic example, say the application is a maths programme, it adds 2 whole numbers together and displays the result.

 

Black Box testing.

This test is done where you need no knowlege of how the programme WORKS, just what it is supposed to do. You enter your 2 numbers, you get the result, record it in your test, thats it. Choose a range of results from high numbers, low numbers, negative values, decimals etc. Choose test data even if you know the results!! Put in 2 + 2 just to get some data out of the system!.

 

White Box Testing.

You are looking at how the system works. You enter 2 + 2, you dont care what the result is, you just want to know HOW it comes up with the result. Say you enter 2 + 2, you examine the part of the programme that takes the 2 input fields, and runs the part that add's the 2 values together. The difference between this and black box, is that certain tests you do in black box, may result in correct answer's, but when done in white box testing could result in an error. Remember, you look at the code, and how it works.

 

Sorry, my last reply made more sence to me, this is bordering in jibberish. Still, i hope it helps in some way.

Share this post


Link to post
Share on other sites

after i got to my lab class, the teacher actually explained it all to me, and it made sense to me. he said the exact same thing as you guys did, don't know why i couldn't understand it then

Share this post


Link to post
Share on other sites

Oh yeah, and just remember theachers ALWAYS use odd examples to test the finer points of your code, for example, if there is a chance of a loop running an extra time if you code it wrong, they will use a number that makes it run over.

 

And remember, System.out.print("Java is fun :)");

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...