Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Wed 01 Oct 2014, 07:03
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
Article: The art of the small test program
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [12 Posts]  
Author Message
Flash
Official Dog Handler


Joined: 04 May 2005
Posts: 11081
Location: Arizona USA

PostPosted: 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
View user's profile Send private message 
musher0


Joined: 04 Jan 2009
Posts: 4245
Location: Gatineau (Qc), Canada

PostPosted: Tue 11 Jun 2013, 18:49    Post subject:  

Very interesting... Shouldn't this article also be e-mailed to every Puppy developer? Smile

BFN.

musher0

_________________
"Logical entities must not be multiplied needlessly." / "Il ne faut pas multiplier les êtres logiques inutilement." (Ockham)
Back to top
View user's profile Send private message Visit poster's website 
Flash
Official Dog Handler


Joined: 04 May 2005
Posts: 11081
Location: Arizona USA

PostPosted: 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? Rolling Eyes
Back to top
View user's profile Send private message 
musher0


Joined: 04 Jan 2009
Posts: 4245
Location: Gatineau (Qc), Canada

PostPosted: Wed 12 Jun 2013, 00:47    Post subject:  

Hi, Flash.

I'm too tired to be brilliant at this time of night! Smile
TWYL.

musher0

_________________
"Logical entities must not be multiplied needlessly." / "Il ne faut pas multiplier les êtres logiques inutilement." (Ockham)
Back to top
View user's profile Send private message Visit poster's website 
amigo

Joined: 02 Apr 2007
Posts: 2252

PostPosted: 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
View user's profile Send private message 
Ted Dog


Joined: 13 Sep 2005
Posts: 2339
Location: Heart of Texas

PostPosted: 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
View user's profile Send private message 
Karl Godt


Joined: 20 Jun 2010
Posts: 3972
Location: Kiel,Germany

PostPosted: 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 ! Laughing
Back to top
View user's profile Send private message Visit poster's website 
jamesbond

Joined: 26 Feb 2007
Posts: 2186
Location: The Blue Marble

PostPosted: Thu 13 Jun 2013, 10:53    Post subject:  

Flash wrote:
How hard could it be? Rolling Eyes
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
View user's profile Send private message 
musher0


Joined: 04 Jan 2009
Posts: 4245
Location: Gatineau (Qc), Canada

PostPosted: 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 !)

_________________
"Logical entities must not be multiplied needlessly." / "Il ne faut pas multiplier les êtres logiques inutilement." (Ockham)
Back to top
View user's profile Send private message Visit poster's website 
technosaurus


Joined: 18 May 2008
Posts: 4351

PostPosted: 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.

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
jpeps

Joined: 31 May 2008
Posts: 3220

PostPosted: 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
View user's profile Send private message 
sunburnt


Joined: 08 Jun 2005
Posts: 5032
Location: Arizona, U.S.A.

PostPosted: 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
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [12 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Off-Topic Area » Programming
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0789s ][ Queries: 12 (0.0097s) ][ GZIP on ]