Author |
Message |
Flash
Official Dog Handler

Joined: 04 May 2005 Posts: 12820 Location: Arizona USA
|
Posted: Tue 11 Jun 2013, 16:16 Post subject:
Article: The art of the small test program |
|
The art of the small test program
Quote: | By Chip Camden
June 6, 2013, 6:49 PM PDT
Takeaway: When your application fails, Chip Camden suggests creating a Small Test Program because it will help vendors and developers help you. Here’s what is involved in creating such programs. |
|
Back to top
|
|
 |
musher0

Joined: 04 Jan 2009 Posts: 12082 Location: Gatineau (Qc), Canada
|
Posted: Tue 11 Jun 2013, 18:49 Post subject:
|
|
Very interesting... Shouldn't this article also be e-mailed to every Puppy developer?
BFN.
musher0
_________________ musher0
~~~~~~~~~~
"Logical entities must not be multiplied beyond necessity." | |
« Il ne faut pas multiplier les entités logiques sans nécessité. » (Ockham)
|
Back to top
|
|
 |
Flash
Official Dog Handler

Joined: 04 May 2005 Posts: 12820 Location: Arizona USA
|
Posted: Tue 11 Jun 2013, 22:28 Post subject:
|
|
I was hoping to get a discussion started about how developers might write a small test program and make it available with their application program if anyone wanted to use it. Perhaps it could give the app a workout and save the test results in a file that could be sent to the developer. How hard could it be?
|
Back to top
|
|
 |
musher0

Joined: 04 Jan 2009 Posts: 12082 Location: Gatineau (Qc), Canada
|
Posted: Wed 12 Jun 2013, 00:47 Post subject:
|
|
Hi, Flash.
I'm too tired to be brilliant at this time of night!
TWYL.
musher0
_________________ musher0
~~~~~~~~~~
"Logical entities must not be multiplied beyond necessity." | |
« Il ne faut pas multiplier les entités logiques sans nécessité. » (Ockham)
|
Back to top
|
|
 |
amigo
Joined: 02 Apr 2007 Posts: 2641
|
Posted: Thu 13 Jun 2013, 02:27 Post subject:
|
|
"How hard could it be?" Actually, unit tests are at least as hard to write as the code itself -one must really understand what the code is supposed to do and create tests which prove or disprove the assumptions made about the code block.
I'm afraid there aren't more than a couple of folks here who could really do such work -on their own projects, I mean. Writing tests for other people's code means you need to be smarter than the guy who wrote the code. Writing tests for your own code means you only have to be smarter than yourself!
|
Back to top
|
|
 |
Ted Dog

Joined: 13 Sep 2005 Posts: 4013 Location: Heart of Texas
|
Posted: Thu 13 Jun 2013, 07:29 Post subject:
|
|
Peano's Axioms gave me a methodology of program testing which has served me well,
It's related to Number Theory in advanced mathematics, but as its applied to programing test cases, you really only need 6 test cases for each block of linear code, case switch, loop or function call.
|
Back to top
|
|
 |
Karl Godt

Joined: 20 Jun 2010 Posts: 4208 Location: Kiel,Germany
|
Posted: Thu 13 Jun 2013, 07:53 Post subject:
|
|
amigo wrote: | I mean. Writing tests for other people's code means you need to be smarter than the guy who wrote the code. Writing tests for your own code means you only have to be smarter than yourself! |
Think that will be one of the top-10 of wisdom thoughts of the year. My top nr 1 it is !
|
Back to top
|
|
 |
jamesbond
Joined: 26 Feb 2007 Posts: 3146 Location: The Blue Marble
|
Posted: Thu 13 Jun 2013, 10:53 Post subject:
|
|
Flash wrote: | How hard could it be?  | Not that hard if that developer's next meal depends on it.
Ted Dog wrote: | Peano's Axioms gave me a methodology of program testing which has served me well,
It's related to Number Theory in advanced mathematics, but as its applied to programing test cases, you really only need 6 test cases for each block of linear code, case switch, loop or function call. | Ted Dog, you always speak in riddles.
Care to elaborate?
===
Anyway, to put it into the context, the article talks about a "developer-user" making test cases for the "developer-developer". For example, it's for people like a game developer who uses Java and find bugs in Java. The article advises that the game developer create small test cases to demonstrate the bugs and send to that to the developer of Java (Oracle) so that Oracle engineers can or is encouraged to fix that bugs.
It is not talking about the general end-user at all, nor does it encourage developers (of any sort) to ship "unit testing code" with their stuff.
_________________ Fatdog64, Slacko and Puppeee user. Puppy user since 2.13.
Contributed Fatdog64 packages thread.
|
Back to top
|
|
 |
musher0

Joined: 04 Jan 2009 Posts: 12082 Location: Gatineau (Qc), Canada
|
Posted: Thu 13 Jun 2013, 11:28 Post subject:
|
|
One big and quite logical problem is mentioned in the article :
you cannot know what you don't know... (Corollary: if you did, you'd know where to look for the bugs, and there would be no bugs left !)
_________________ musher0
~~~~~~~~~~
"Logical entities must not be multiplied beyond necessity." | |
« Il ne faut pas multiplier les entités logiques sans nécessité. » (Ockham)
|
Back to top
|
|
 |
technosaurus

Joined: 18 May 2008 Posts: 4786 Location: Kingwood, TX
|
Posted: Fri 14 Jun 2013, 06:35 Post subject:
|
|
to write a test you only need to know the desired output for a given input. this requires that you compute the desired output, you could just as easily make the same mistake.... but as long as you double check the common cases and the extremes, you should be fine.
in highly important systems it is common to have multiple algorithms typically written by separate programmers and require agreement between them.
_________________ Check out my github repositories. I may eventually get around to updating my blogspot.
|
Back to top
|
|
 |
jpeps
Joined: 31 May 2008 Posts: 3217
|
Posted: Fri 14 Jun 2013, 13:09 Post subject:
|
|
technosaurus wrote: | to write a test you only need to know the desired output for a given input. this requires that you compute the desired output, you could just as easily make the same mistake.... but as long as you double check the common cases and the extremes, you should be fine.
in highly important systems it is common to have multiple algorithms typically written by separate programmers and require agreement between them. |
Test classes are built in to UI's like Eclipse for Java and Android programming. Often the method tests are written before the actual method is coded. If a test "fails" when it is run, it shows the actual vs desired output. If the method doesn't exist yet, you can right click and it will be automatically inserted into the code. The tests would cover multiple possible user inputs.
I could see how a developer might include a test checklist when asking others to run his app on other hardware. The only way to find unknown foreseen bugs would be to distribute the app to other developers/users prior to releasing it to the public. I think this is standard procedure for professional developers.
|
Back to top
|
|
 |
sunburnt

Joined: 08 Jun 2005 Posts: 5087 Location: Arizona, U.S.A.
|
Posted: Sat 15 Jun 2013, 03:33 Post subject:
|
|
Several apps. I posted here had test apps. ( or example demos.) for them.
And one I`m finishing now is complex enough it required a fully fledged test app. to develop it.
As JamesBond points out, Flash`s article link is involved a bit further, but is still applicable.
|
Back to top
|
|
 |
|