You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-dev@db.apache.org by Greg Monroe <Gr...@DukeCE.com> on 2006/11/14 16:06:39 UTC

Some thoughts on new version testing.

In preparation for the first 3.3 RC, I've been running
the test project against several DBs recently: MS SQL, 
different MySQL versions, Derby (JDBC Driver), and a 
quick run at HypersonicSQL.
 
(Quick FYI aside:  Derby has problems with that I'm 
working out)
 
Here's some thoughts that have come out of this process.
 
1) The test-project properties can have a lot of 
different build properties, such as: beans/nobeans;
idBrokerMethod; managers/no manager; and the like.
 
It seems like we should have an agreed upon set of 
test run properties that need to be used against a
database type to say it's truly passed the tests.
In other words, the test-project needs to be run 
several times against a DB with each run having a 
different set of properties, E.g. with Beans, with
Beans/Managers, with native/idBroker methods, 
and the like.
 
There's a lot of combinations, so which ones make 
sense?
 
2) Should there be semi-standardized reporting of 
Test-project runs with new version RCs?  I.e., ask
folks to test it against their DB, and then send 
in a report with OS, JVM, DB Version, JDBC Driver, 
and results of each test run type?
 
3) Should there be a core of required DB's that have 
to be tested and pass before a version is released?  
E.g., MySQL, Derby ('cause we're part of the DB 
project!), Postgres, Oracle, DB2, and MS SQL/Sybase
come to mind.  DB2 is the only one I haven't seen
mentioned here in a while.
 
4) Do we want to "publish" this info anywhere?  E.g.,
in the final version release notes have a list of 
DB versions, JDBC versions that Torque was tested 
against before release.
 
FWIW, if we can decide on the set of test run 
criteria, I'll take a pass at doing an Ant script
to set up the conditions and call Maven to do the
tests against a DB in one step.  (Probably can do
this with a Maven uber project, but I can do it
faster in ant then figuring out the Maven property
inheritance quirks.)
 
Greg Monroe <Mo...@DukeCE.com> (919)680-5050
C&IS Solutions Team Lead
Duke Corporate Education, Inc.
333 Liggett St.
Durham, NC 27701


 

Duke CE Privacy Statement
Please be advised that this e-mail and any files transmitted with it are confidential communication or may otherwise be privileged or confidential and are intended solely for the individual or entity to whom they are addressed.  If you are not the intended recipient you may not rely on the contents of this email or any attachments, and we ask that you  please not read, copy or retransmit this communication, but reply to the sender and destroy the email, its contents, and all copies thereof immediately.  Any unauthorized dissemination, distribution or copying of this communication is strictly prohibited.



RE: Some thoughts on new version testing.

Posted by Greg Monroe <Gr...@DukeCE.com>.
Slipped into denial here... should be:       vvvvv

> Thoughts, gapping holes in my logic (would *not* be the first time..),
> improvements, whatever...                   
                                              

Duke CE Privacy Statement
Please be advised that this e-mail and any files transmitted with it are confidential communication or may otherwise be privileged or confidential and are intended solely for the individual or entity to whom they are addressed.  If you are not the intended recipient you may not rely on the contents of this email or any attachments, and we ask that you  please not read, copy or retransmit this communication, but reply to the sender and destroy the email, its contents, and all copies thereof immediately.  Any unauthorized dissemination, distribution or copying of this communication is strictly prohibited.



---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


RE: Some thoughts on new version testing.

Posted by Thomas Fischer <fi...@seitenbau.net>.
The set of 10-16 tests to be run per db sounds fine to me as a release
test. If you want to create an ant script for this, this would be great.
Can the ant script go into the maven.xml so we do not have additional files
floating round ?

          Thomas

"Greg Monroe" <Gr...@DukeCE.com> schrieb am 15.11.2006 22:16:47:

> Here's some further thoughts on this:
>
> There seems to be three major testing categories here:
>
> DB Specific Tasks (Need to run against major DBs):
>   SQL generation, et. al.
>   A subset of standard code tests like limits, like
>      escaping, booleans, and the like.
>   Autoincrement/idBroker methods.
>   And a general all tests work.
>
> OM Code Generation Variations (DB indendent)
>   Major functional items, like managers, beans, etc.
>   Minor functional items, like add addSaveMethod, etc.
>
> Code Structure Options
>   Package names
>   Object prefixes
>   Timestamping
>
> Code Structure Options
>
> I'll start with Code Structure items.  These can be tested
> for the most part by simply defining non-standard values
> (because we'd know already if the defaults didn't work)
> to these options and verifing that they compile and pass
> the test (mostly just compile).
>
> There is also an secondary test for them in the fact that
> some test case code references the OM classes and won't
> compile if these packages don't match.
>
> These options can be set permanently in the test-project
> project.properties file and never modified.  All test
> run will "validate" them.
>
> Here are the options I'd put in this category.
>
>   torque.targetPackage
>   torque.subpackage.peer
>   torque.subpackage.object
>   torque.subpackage.map
>   torque.subpackage.manager
>   torque.subpackage.bean
>   torque.subpackage.base
>   torque.subpackage.base.bean
>   torque.basePrefix
>   torque.BeanSuffix
>   torque.addTimeStamp (Just to check for compile problems)
>
> DB Specific Tasks
>
> The DB specific stuff can probably be handled by running two
> standard tests against the DB similar to:
>
> Test1:
>   torque.test.base.idMethod = idbroker
>   torque.generateBeans = true;
>   torque.useMangers = false;
>   torque.objectIsCaching = false;
>
> Test2:
>   torque.test.base.idMethod = native
>   torque.generateBeans = false;
>   torque.useMangers = true;
>   torque.objectIsCaching = true;
>
> These should validate the SQL generation and catch any major
> "gotchas" in the DB Adaptor related code.
>
> There will be some minor issues around DB's that don't support
> autogenerated fields and idMethod=native, but they are getting
> fewer.
>
> OM Code Generation
>
> IMHO, there are major functional options, minor functional
> options, and some that probably should be deprecated.
>
> The major options are ones that really effect the code
> generations a great deal and have the most chance of generating
> unusable code.  These are:
>
>   torque.useManagers
>   torque.generateBeans
>   torque.objectIsCaching
>   torque.enableJava5Features
>   torque.complexObjectModel
>   torque.addGetByNameMethod
>
> The minor options are:
>
>   torque.addSaveMethod
>   torque.saveException
>   torque.correctGetters
>
> I'll probably start some controversy by suggesting that IMHO
> the following options should be deprecated and the code
> generated made non-optional in 4.0:
>
>   torque.addGetByNameMethod
>   torque.addSaveMethod
>   torque.complexObjectModel (maybe not?)
>
> Anyway, as to testing... if we drop the minor options from
> the list or just slip them in as a minor variation of the
> major ones.  We could run 64 tests with all variations, but
> a lot of them would fail.
>
> Two of the options are currently required for the test cases
> to succeed.  These are:
>
>   torque.complexObjectModel
>   torque.addGetByNameMethod
>
> If we drop these out and then it becomes a reasonable 16
> combinations of the following:
>
>   torque.useManagers
>   torque.generateBeans
>   torque.objectIsCaching
>   torque.enableJava5Features
>
> We probably can just run 10 if we just run enableJava5 against
> a couple of variations of the the other 3, rather than all
> variations.
>
> So ideally, to up the odds that a release is good, there would
> 10-16 runs to test the OM code variations and 2 x the common
> DBs.  The OM code variations could be wrapped in a small
> Ant script (or shell script / batch file ) to make it easier
> to run.
>
> Thoughts, gapping holes in my logic (would be the first time..),
> improvements, whatever...
>
> Duke CE Privacy Statement
> Please be advised that this e-mail and any files transmitted with it
> are confidential communication or may otherwise be privileged or
> confidential and are intended solely for the individual or entity to
> whom they are addressed.  If you are not the intended recipient you
> may not rely on the contents of this email or any attachments, and
> we ask that you  please not read, copy or retransmit this
> communication, but reply to the sender and destroy the email, its
> contents, and all copies thereof immediately.  Any unauthorized
> dissemination, distribution or copying of this communication is
> strictly prohibited.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-dev-help@db.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


RE: Some thoughts on new version testing.

Posted by Greg Monroe <Gr...@DukeCE.com>.
Here's some further thoughts on this:

There seems to be three major testing categories here:

DB Specific Tasks (Need to run against major DBs):
  SQL generation, et. al.
  A subset of standard code tests like limits, like 
     escaping, booleans, and the like.
  Autoincrement/idBroker methods.
  And a general all tests work.

OM Code Generation Variations (DB indendent)
  Major functional items, like managers, beans, etc.
  Minor functional items, like add addSaveMethod, etc.

Code Structure Options
  Package names
  Object prefixes
  Timestamping

Code Structure Options

I'll start with Code Structure items.  These can be tested
for the most part by simply defining non-standard values 
(because we'd know already if the defaults didn't work)
to these options and verifing that they compile and pass 
the test (mostly just compile).  

There is also an secondary test for them in the fact that 
some test case code references the OM classes and won't 
compile if these packages don't match.

These options can be set permanently in the test-project
project.properties file and never modified.  All test 
run will "validate" them.

Here are the options I'd put in this category.  

  torque.targetPackage
  torque.subpackage.peer
  torque.subpackage.object
  torque.subpackage.map
  torque.subpackage.manager
  torque.subpackage.bean
  torque.subpackage.base
  torque.subpackage.base.bean
  torque.basePrefix
  torque.BeanSuffix
  torque.addTimeStamp (Just to check for compile problems)

DB Specific Tasks

The DB specific stuff can probably be handled by running two 
standard tests against the DB similar to:

Test1:  
  torque.test.base.idMethod = idbroker
  torque.generateBeans = true;
  torque.useMangers = false;
  torque.objectIsCaching = false;

Test2:
  torque.test.base.idMethod = native
  torque.generateBeans = false;
  torque.useMangers = true;
  torque.objectIsCaching = true;

These should validate the SQL generation and catch any major
"gotchas" in the DB Adaptor related code.  

There will be some minor issues around DB's that don't support
autogenerated fields and idMethod=native, but they are getting
fewer.  

OM Code Generation 

IMHO, there are major functional options, minor functional 
options, and some that probably should be deprecated.

The major options are ones that really effect the code 
generations a great deal and have the most chance of generating
unusable code.  These are:

  torque.useManagers
  torque.generateBeans
  torque.objectIsCaching
  torque.enableJava5Features
  torque.complexObjectModel
  torque.addGetByNameMethod

The minor options are:

  torque.addSaveMethod
  torque.saveException
  torque.correctGetters

I'll probably start some controversy by suggesting that IMHO 
the following options should be deprecated and the code 
generated made non-optional in 4.0:

  torque.addGetByNameMethod  
  torque.addSaveMethod
  torque.complexObjectModel (maybe not?)

Anyway, as to testing... if we drop the minor options from 
the list or just slip them in as a minor variation of the
major ones.  We could run 64 tests with all variations, but
a lot of them would fail.

Two of the options are currently required for the test cases
to succeed.  These are:

  torque.complexObjectModel
  torque.addGetByNameMethod

If we drop these out and then it becomes a reasonable 16
combinations of the following:

  torque.useManagers
  torque.generateBeans
  torque.objectIsCaching
  torque.enableJava5Features

We probably can just run 10 if we just run enableJava5 against
a couple of variations of the the other 3, rather than all
variations.

So ideally, to up the odds that a release is good, there would 
10-16 runs to test the OM code variations and 2 x the common
DBs.  The OM code variations could be wrapped in a small
Ant script (or shell script / batch file ) to make it easier
to run.  

Thoughts, gapping holes in my logic (would be the first time..),
improvements, whatever...

Duke CE Privacy Statement
Please be advised that this e-mail and any files transmitted with it are confidential communication or may otherwise be privileged or confidential and are intended solely for the individual or entity to whom they are addressed.  If you are not the intended recipient you may not rely on the contents of this email or any attachments, and we ask that you  please not read, copy or retransmit this communication, but reply to the sender and destroy the email, its contents, and all copies thereof immediately.  Any unauthorized dissemination, distribution or copying of this communication is strictly prohibited.



---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Re: Some thoughts on new version testing.

Posted by Thomas Fischer <tf...@apache.org>.
On Tue, 14 Nov 2006, Greg Monroe wrote:

> ...
> 1) The test-project properties can have a lot of
> different build properties, such as: beans/nobeans;
> idBrokerMethod; managers/no manager; and the like.
>
> It seems like we should have an agreed upon set of
> test run properties that need to be used against a
> database type to say it's truly passed the tests.
> In other words, the test-project needs to be run
> several times against a DB with each run having a
> different set of properties, E.g. with Beans, with
> Beans/Managers, with native/idBroker methods,
> and the like.
>
> There's a lot of combinations, so which ones make
> sense?

Probably most of the combinations make sense. However, I'm rather sure 
that most of the combinations need not be run against a particular 
database; any db will do. The Beans stuff falls into this category, and 
I'd guess also the managers (Thomas V, correct me if I'm wrong). Plus we 
could test the enableJava5Features setting. Other properties like setting 
complexObjectModel=false, correctGetters, subpackageXXX etc can probably 
not be tested by the test project (at least not in its current state).


> 2) Should there be semi-standardized reporting of
> Test-project runs with new version RCs?  I.e., ask
> folks to test it against their DB, and then send
> in a report with OS, JVM, DB Version, JDBC Driver,
> and results of each test run type?

Yes, that is the intent of the test project. However, if I remember 
correctly, some people have had difficulties setting up the test project 
(e.g. you need to install maven first). So, I'd guess it will always be 
the Torque developers which will do most of the testing.

And I'd not rely too much on the test project. It is grown much better in 
the last two years, but test coverage is still not very good. We will 
probably also have to rely on bug reports by users as in the past.

> 3) Should there be a core of required DB's that have
> to be tested and pass before a version is released?
> E.g., MySQL, Derby ('cause we're part of the DB
> project!), Postgres, Oracle, DB2, and MS SQL/Sybase
> come to mind.  DB2 is the only one I haven't seen
> mentioned here in a while.

I'd guess no current Torque developer has a DB2 installation ready. After 
a quick research, there is a free edition (called Express-C) of DB2, which 
I'll try to install in the next few days.
Personally, I'm currently testing against Mysql, Postgresql, Derby, 
Hsqldb, Oracle, and Firebird.

>
> 4) Do we want to "publish" this info anywhere?  E.g.,
> in the final version release notes have a list of
> DB versions, JDBC versions that Torque was tested
> against before release.

Hm, we might update the supported databases page
http://db.apache.org/torque/releases/torque-3.2/docs-all-components/supported-databases.html
to display that information.

>
> FWIW, if we can decide on the set of test run
> criteria, I'll take a pass at doing an Ant script
> to set up the conditions and call Maven to do the
> tests against a DB in one step.  (Probably can do
> this with a Maven uber project, but I can do it
> faster in ant then figuring out the Maven property
> inheritance quirks.)

If you want to do that- great ! However, I'd not put too much effort in 
this. Personally, I'd like to switch the build process to maven 2 in 4.0
(of course that's open to discussion !!!), so the effort might get lost.

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Re: Unsubscribe-torque=froud10@earthlink.net

Posted by froud khodai <fr...@earthlink.net>.
On Nov 14, 2006, at 07:06, Greg Monroe wrote:

> In preparation for the first 3.3 RC, I've been running
> the test project against several DBs recently: MS SQL,
> different MySQL versions, Derby (JDBC Driver), and a
> quick run at HypersonicSQL.
>
> (Quick FYI aside:  Derby has problems with that I'm
> working out)
>
> Here's some thoughts that have come out of this process.
>
> 1) The test-project properties can have a lot of
> different build properties, such as: beans/nobeans;
> idBrokerMethod; managers/no manager; and the like.
>
> It seems like we should have an agreed upon set of
> test run properties that need to be used against a
> database type to say it's truly passed the tests.
> In other words, the test-project needs to be run
> several times against a DB with each run having a
> different set of properties, E.g. with Beans, with
> Beans/Managers, with native/idBroker methods,
> and the like.
>
> There's a lot of combinations, so which ones make
> sense?
>
> 2) Should there be semi-standardized reporting of
> Test-project runs with new version RCs?  I.e., ask
> folks to test it against their DB, and then send
> in a report with OS, JVM, DB Version, JDBC Driver,
> and results of each test run type?
>
> 3) Should there be a core of required DB's that have
> to be tested and pass before a version is released?
> E.g., MySQL, Derby ('cause we're part of the DB
> project!), Postgres, Oracle, DB2, and MS SQL/Sybase
> come to mind.  DB2 is the only one I haven't seen
> mentioned here in a while.
>
> 4) Do we want to "publish" this info anywhere?  E.g.,
> in the final version release notes have a list of
> DB versions, JDBC versions that Torque was tested
> against before release.
>
> FWIW, if we can decide on the set of test run
> criteria, I'll take a pass at doing an Ant script
> to set up the conditions and call Maven to do the
> tests against a DB in one step.  (Probably can do
> this with a Maven uber project, but I can do it
> faster in ant then figuring out the Maven property
> inheritance quirks.)
>
> Greg Monroe <Mo...@DukeCE.com> (919)680-5050
> C&IS Solutions Team Lead
> Duke Corporate Education, Inc.
> 333 Liggett St.
> Durham, NC 27701
>
>
>
>
> Duke CE Privacy Statement
> Please be advised that this e-mail and any files transmitted with it 
> are confidential communication or may otherwise be privileged or 
> confidential and are intended solely for the individual or entity to 
> whom they are addressed.  If you are not the intended recipient you 
> may not rely on the contents of this email or any attachments, and we 
> ask that you  please not read, copy or retransmit this communication, 
> but reply to the sender and destroy the email, its contents, and all 
> copies thereof immediately.  Any unauthorized dissemination, 
> distribution or copying of this communication is strictly prohibited.
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


RE: Some thoughts on new version testing (derby aside)

Posted by Greg Monroe <Gr...@DukeCE.com>.
Thanks for the heads up on that... I've been working my 
way down the test structure starting with getting all the
test tables to create correctly.  Haven't gotten to the
actual test case problems yet.

FYI - I've got a way to impliment BINARY and VARBINARY
using the funky (but SQL92 standard way) of 
VARCHAR / CHAR (n) FOR BIT DATA format. This probably 
will be needed for DB2 as well.  The TINYINT and BIT
mappings needed some tweaking as well.

Plus some minor test-schema changes to keep Derby (and 
any other "identity" DB adaptors happy.

> -----Original Message-----
> From: Thomas Fischer [mailto:fischer@seitenbau.net] 
> Sent: Tuesday, November 14, 2006 10:31 AM
> To: Apache Torque Developers List
> Subject: Re: Some thoughts on new version testing (derby aside)
> 
> > (Quick FYI aside:  Derby has problems with that I'm
> > working out)
> 
> Torque does not yet work with Derby's net driver. This is due 
> to a problem
> of village with the result of ResultSetMetaData.isReadOnly() 
> in the derby
> driver, see http://issues.apache.org/jira/browse/DERBY-142.
> If you use the embedded driver, this should work (at least it 
> works for
> me).
> 
> I'll answer the rest of the mail today evening.
> 
>    Thomas
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-dev-help@db.apache.org
> 
> 

Duke CE Privacy Statement
Please be advised that this e-mail and any files transmitted with it are confidential communication or may otherwise be privileged or confidential and are intended solely for the individual or entity to whom they are addressed.  If you are not the intended recipient you may not rely on the contents of this email or any attachments, and we ask that you  please not read, copy or retransmit this communication, but reply to the sender and destroy the email, its contents, and all copies thereof immediately.  Any unauthorized dissemination, distribution or copying of this communication is strictly prohibited.



---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Re: Some thoughts on new version testing (derby aside)

Posted by Thomas Fischer <fi...@seitenbau.net>.
> (Quick FYI aside:  Derby has problems with that I'm
> working out)

Torque does not yet work with Derby's net driver. This is due to a problem
of village with the result of ResultSetMetaData.isReadOnly() in the derby
driver, see http://issues.apache.org/jira/browse/DERBY-142.
If you use the embedded driver, this should work (at least it works for
me).

I'll answer the rest of the mail today evening.

   Thomas


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org