I create an object named Number , with the function numtowords.
i input '100' as parameter, It will return "one hundred".
However, any simple way to test this object ????
I only know the old way [create a form, textbox, button to test the program]
Any suggestion ?
Thanks 4 1329
Take a look at Nunit for testing functions and libraries.
"Agnes" <ag***@dynamictech.com.hk> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl... I create an object named Number , with the function numtowords. i input '100' as parameter, It will return "one hundred". However, any simple way to test this object ???? I only know the old way [create a form, textbox, button to test the
program] Any suggestion ? Thanks
To test out small functions like these you can download a sniplet comiler from this site http://www.sliver.com/dotnet/SnippetCompiler/
this is very useful. try it out
Regards
Ganesh
"Agnes" wrote: I create an object named Number , with the function numtowords. i input '100' as parameter, It will return "one hundred". However, any simple way to test this object ???? I only know the old way [create a form, textbox, button to test the program] Any suggestion ? Thanks
I would agree with Ray... using NUnit is the best way to test your function.
Look for boundary conditions, likely issues, situations that may vary (white
box) and craft a series of calls. Code the calls in a class flagged with
NUnit attributes. NUnit calls the class, which calls your code. The test
class gets the values back and check for the correct translation. If a
failure is detected, your NUnit class throws an exception, and NUnit itself
catches it to show you how many errors were detected.
It is simple and elegant.
see www.nunit.org
--- Nick
"Agnes" <ag***@dynamictech.com.hk> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl... I create an object named Number , with the function numtowords. i input '100' as parameter, It will return "one hundred". However, any simple way to test this object ???? I only know the old way [create a form, textbox, button to test the
program] Any suggestion ? Thanks
Execute a query that returns a recordset with a known number of records then
assert that the record count is equal to a specific number.
"rodchar" <ro*****@discussions.microsoft.com> wrote in message
news:62**********************************@microsof t.com... Can anyone give me some examples of assertions I can make? Like I have a datalayer project, what are some assertions I can make to test my
datalayer or am I missing the point?
"Nick Malik" wrote:
I would agree with Ray... using NUnit is the best way to test your
function. Look for boundary conditions, likely issues, situations that may vary
(white box) and craft a series of calls. Code the calls in a class flagged
with NUnit attributes. NUnit calls the class, which calls your code. The
test class gets the values back and check for the correct translation. If a failure is detected, your NUnit class throws an exception, and NUnit
itself catches it to show you how many errors were detected.
It is simple and elegant.
see www.nunit.org
--- Nick
"Agnes" <ag***@dynamictech.com.hk> wrote in message news:%2****************@TK2MSFTNGP10.phx.gbl... I create an object named Number , with the function numtowords. i input '100' as parameter, It will return "one hundred". However, any simple way to test this object ???? I only know the old way [create a form, textbox, button to test the program] Any suggestion ? Thanks
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Jussi Mononen |
last post by:
Hi,
I'm having problems to successfully execute the test scripts on a
Compaq host ( OSF1 tr51bdev V5.1 2650 alpha ). Almost all tests end up
with the following error message
"PARI: *** ...
|
by: Andy |
last post by:
How can you unit test nested functions? Or do you have to pull them out to
unit test them, which basically means I will never use nested functions.
Also, same thing with private member functions...
|
by: Cor |
last post by:
Hallo,
I have promised Jay B yesterday to do some tests.
The subject was a string evaluation that Jon had send in. Jay B was in doubt
what was better because there was a discussion in the C#...
|
by: Ben Finney |
last post by:
Howdy all,
Summary: I'm looking for idioms in unit tests for factoring out
repetitive iteration over test data. I explain my current practice,
and why it's unsatisfactory.
When following...
|
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...
|
by: emily224 |
last post by:
Hello,
I have been trying to understand this source code, which I retreived from my online course test. I would like to know how to find the answer for the question on the test. Im sure the answer...
|
by: emily224 |
last post by:
Hello,
I have been trying to understand this source code, which I retreived from my online course test. I would like to know how to find the answer for the question on the test. Im sure the answer...
|
by: istillshine |
last post by:
When I want to test if a function foo in a .c file behaves as
expected, I usually call it in my main.c in the following way.
if (1) { /* test function foo */
z = foo(x, y); /* */...
|
by: istillshine |
last post by:
I have a function foo, shown below. Is it a good idea to test each
argument against my assumption? I think it is safer. However, I
notice that people usually don't test the validity of...
|
by: JanW |
last post by:
Somewhat a C++ beginner, I'm trying to make a general test function
that could test unary operators (or methods) of an object of any class.
Arguments are a member-pointer to the function, a...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
| |