Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Re: Has lack of testing of object change affected reliabliity?Re:
Clark F Morris wrote:
> On Sat, 06 Oct 2007 14:46:38 -0600, LX-i <lxi0007@netscape.net> wrote:
> 
>
> Has this affected reliability?

Not negatively.  :)

> I know that operating system changes
> and upgrades are at least partially tested in many IBM z series shops
> to see if they have any effect on applications.  We were more casual
> in the last shop I was a systems programmer (late 1980s, early 1990s)
> because we didn't have a test system (separate computer or LPAR on
> main computer).

Each developer has an instance of Tomcat on their local machine - we'll
do builds there and test, against a common development database.  Each
day, we do a build on the central development machine (also pointed to
the development database), and move that build to a test machine
(pointed at a test database).  Part of Agile development is lots of
communication among the team members - so, if a database change is
needed, this is communicated during the day, and the change scripts are
run on the test database as well.

It's a pretty good system - I've been impressed.

> If a component is changed or extended by whatever
> method, what insures that existing invokers see no change?  If the
> invokers are supposed to see a change what guarantees something
> doesn't break?

Most of our objects have two constructors - one that takes no
parameters, and one that takes a "ReturnObject" (a row from the
database).  The queries are stored separately by name.  So, we'll have a
block of code in a service that says something like...

ReturnObject[] oReturn = getDbLayer().performSelect("module.query_name",
new Object[] { param1, param2 });

OurObject oOurs;

if (ArrayUtils.nullOrEmpty(oReturn)) {
oOurs = new OurObject();
} else {
oOurs = new OurObject(oReturn[0]);
}

So, if we add/remove a property to/from an object/field to the query,
it's picked up automatically.  (Adds are fine - referenced deletions are
caught by the compiler.)  The ReturnObject has methods to get various
types from the database columns that gracefully handle nulls and fields
that don't exists.  (For example, if the query didn't return a field
called "ooga_booga", and you had code that said something like

String oStr = oReturn[0].getString("ooga_booga");

, oStr would be null - it would not throw an exception.)  Of course,
adding methods doesn't break existing ones, and removing methods will
again be caught by the compiler.

Then you take into account unit tests - automated tests that verify each
object.  We have a SQL script that loads data into the database, then
there is Java code that instantiates objects using that code and checks
to see that everything is set as it should.  We can also test the output
of methods that way.  Currently, we run them on our own machine, but by
the end of this month, we'll have a process set up where it will
automatically get the latest code from Subversion, build it, then run
the tests and give us a report of the failures.  It's called "continuous
integration", and it can catch problems introduced by object and method
changes.  It doesn't catch the overall system business rules, but it
ensures we have quality building blocks to start with.

So, I guess the unit tests *may* count as "regression testing."  Of
course, they're only as good as the imagination of the person writing
them - but that's the general rule with any kind of testing.

--
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~
~     / \/ _ o     ~          Live from Albuquerque, NM!          ~
~     _ /\   |     ~                                              ~
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
~ Business E-mail  ~ daniel @ "Business Website" below            ~
~ Business Website ~ http://www.djs-consulting.com                ~
~ Tech Blog        ~ http://www.djs-consulting.com/linux/blog     ~
~ Personal E-mail  ~ "Personal Blog" as e-mail address            ~
~ Personal Blog    ~ http://daniel.summershome.org                ~
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~

GEEKCODE 3.12 GCS/IT d s-:+ a C++ L++ E--- W++ N++ o? K- w$ !O M--
V PS+ PE++ Y? !PGP t+ 5? X+ R* tv b+ DI++ D+ G- e h---- r+++ z++++

"Who is more irrational?  A man who believes in a God he doesn't see,
or a man who's offended by a God he doesn't believe in?" - Brad Stine

Report this thread to moderator Post Follow-up to this message
Old Post
LX-i
10-08-07 08:55 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Cobol archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 06:08 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.