Pascal Testing-VBForums
Results 1 to 4 of 4

Thread: Pascal Testing

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2011
    Posts
    4

    Pascal Testing

    Hello i am new here and i hope i have placed this in the right part if not forgive me

    I am currently fixing some assignments i have had with in terms of pascal language.I know pascal is very Old language and these days the compiler has problems in terms of running. I am using free compiler since also i am on a mac book/Boot camp

    I have made a program quite basic for the assignment however i am very stuck on Pascal Testing my program.

    you must fully test, evaluate and produce documentation for the solution produced.
    Critically review and test the program against the user requirements. You need to complete black & white box testing and ensure you check every possible outcome.

    What the *** is black box testing and how do i do it? Ive looked around on Google and cant find anything

    Cheers

  2. #2
    PowerPoster
    Join Date
    May 2002
    Posts
    24,079

    Re: Pascal Testing

    black box testing is where you put something in, and you get something out on the other end... you don't care what goes on inside (the black box) ... only the final result.

    in white box testing on the other hand, you open up the box and test values during the processing.

    Think of it like this:
    Black box testing - you turn the key (that's the input) and the engine starts (that's your testable output)
    White box testing - you turn on the key, then open the hood and attach diagnostics tool, perform a tune up, check the timing belt, check spark plugs, etc...

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  3. #3

    Thread Starter
    New Member
    Join Date
    Jul 2011
    Posts
    4

    Re: Pascal Testing

    cheers m8

    So i just bascally write about what i have put into the program then and the logic and what is expected to come out of it? in terms of black box testing

    and white box would be the final solution i guess?

    i throught i had to get some software for pascal to do testing or something daft like that

    cheers mate

  4. #4
    PowerPoster
    Join Date
    May 2002
    Posts
    24,079

    Re: Pascal Testing

    no, you don't have to, testing comes in a number of forms... the term typically used is "testing harness" ... in short it's a dummy app that does nothing but test your unit.

    Let's say you have a class that has one method, for simplicity let's call it Add... and it takes two paramters adds them together and returns a single value.

    so you build a quick little app that has two text boxes, a label and a button. In the button click event you create an instance of the class, get the values from the text boxes and puts the result in the label. This becomes your testing harness.

    black box testing would look something like this:
    Code:
    Method        Input 1     Input 2       Expected Output         Actual Output        Result
    ------------------------------------------------------------------------------------
    Add             1             2               3
    so now you run the mini app, enter 1 and 2 into the text boxes and click the button.
    Your result shows up in the label: 6


    Code:
    Method        Input 1     Input 2       Expected Output         Actual Output        Result
    ------------------------------------------------------------------------------------
    Add             1             2               3                              6                         FAIL
    OKay... it now has failed blackbox testing... so now you go into white box testing to see what goes on inside the function...


    Code:
    Method        Input 1     Input 2       Recvd Input 1     Recvd Input 2    Intended Output      Expected Output         Actual Output        Result
    ------------------------------------------------------------------------------------------------------------------------------------------
    Add             1             2               1                      2
    by now inspecting the values as you go, you find out that you've taken the two inputs and doubled them, so 1 became 2 and 2 became 4 before adding them together, producing 6

    And so on... typically black box testing is the more formal of the two. whitebox testing is used during debugging, when you step through the code, checking values as you go along... it's not something I've seen in a documented fashion (which is why I struggled with the above chart)...

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.