db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kristian Waagan (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-2460) Create a framework for writing unit tests that will access a private fields of derby classes.
Date Tue, 27 Mar 2007 11:30:35 GMT

    [ https://issues.apache.org/jira/browse/DERBY-2460?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12484432

Kristian Waagan commented on DERBY-2460:

[ snip - comments on Dans and Kristians previous posts ]

js> Kristian, derbynet/testProtocol.java is a good candidate for the first test. However,
I think that writing a dummy test instead with comments and 
explanations which might be used later as a template might be usefull.

I just want to point out that in principle, writing a unit test for a package-private class
is exactly the same as writing a unit test for a public class.
We might just need some extra support for building and compiling the tests due to our jar-file
packaging and build scripts.
In my view, a template would be a template for writing JUnit tests, for which I believe there
is some material already available.

That said, if we are to make a "template test", I think it should be simple and clean - without
any complex JUnit tricks or such.

Does this make any sense, or am I overlooking some issues?
If so, please comment on it.

> Create a framework for writing unit tests that will access a private fields of derby
> ---------------------------------------------------------------------------------------------
>                 Key: DERBY-2460
>                 URL: https://issues.apache.org/jira/browse/DERBY-2460
>             Project: Derby
>          Issue Type: New Feature
>    Affects Versions:
>            Reporter: Julius Stroffek
>            Priority: Minor
>         Attachments: derby-2460-writeup-rev01.txt
> Create a testing framework for writing unit tests that will not test the functionality
but some other properties of the code like DRDA protocol, conditions of B-trees, behavior
of locking, etc. These tests may be written in a same way like the function tests are but
they will not test the public API but some underlaying Derby functions. So, there is a need
for the tests to access some package private properties/methods.
> The discussion about this issue took place on derby-dev couple of months ago.
> Please, see
> http://www.nabble.com/Testing-implementation-of-private-classes-tf2919330.html#a8158779
> for more information.
> Currently, there is an implementation of such a test in org.apache.derby.impl.drda.TestProto.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message