You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "David Van Couvering (JIRA)" <de...@db.apache.org> on 2006/03/14 22:21:39 UTC

[jira] Created: (DERBY-1115) Write a test that ensures that code that translates a message id into a message does so correctly

Write a test that ensures that code that translates a message id into a message does so correctly
-------------------------------------------------------------------------------------------------

         Key: DERBY-1115
         URL: http://issues.apache.org/jira/browse/DERBY-1115
     Project: Derby
        Type: Test
    Reporter: David Van Couvering
    Priority: Minor


After finding, in my and others' code, a number of situations where we used a message id with no matching message, or used the incorrect number of parameters for an internationalized message, I became determined to write a test that tries to track down these bugs, a kind of "i18n lint".  

It's very hard, almost impossible, to test these invocations of message formatting through a normal  unit test, because basically you have to write a full suite of negative tests.

This bug is a placeholder for some work I am doing to accomplish this task using code parsing rather than trying to execute negative tests.



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Re: [jira] Updated: (DERBY-1115) Write a test that ensures that code that translates a message id into a message does so correctly

Posted by "David W. Van Couvering" <Da...@Sun.COM>.
OK, tools/testing it is.  And I *do* think this is an important nightly 
regression test, but I'll leave that to those who do such things (Ole :) ).

David

Andrew McIntyre wrote:
> On 3/14/06, David Van Couvering (JIRA) <de...@db.apache.org> wrote:
> 
>>So, I have this all working (see attached) and I actually already found one
>>bug that way.  Since it depends on UNIX utilities, it can't be part of the standard
>>unit tests, but I'd like to check it in and recommend we use it for nightly
>>regression and release tests.
>>
>>The question is, where to put it?  Where I have it right now is under
>>java/build/i18nTestGen.  It seems a bit odd since it's not actually java code.
>>Is there a better place to put this?  Should it go under tools?
> 
> 
> I'd suggest tools/testing. I think its a good idea to share such
> testing tools that are just intended for use by Derby developers, even
> if they only run on a single platform. Then, people interested in them
> can collaborate on them and use them if they are able.
> 
> In general, having something is 100% better than having nothing. ;-)
> 
> andrew

Re: [jira] Updated: (DERBY-1115) Write a test that ensures that code that translates a message id into a message does so correctly

Posted by Andrew McIntyre <mc...@gmail.com>.
On 3/14/06, David Van Couvering (JIRA) <de...@db.apache.org> wrote:
>
> So, I have this all working (see attached) and I actually already found one
> bug that way.  Since it depends on UNIX utilities, it can't be part of the standard
> unit tests, but I'd like to check it in and recommend we use it for nightly
> regression and release tests.
>
> The question is, where to put it?  Where I have it right now is under
> java/build/i18nTestGen.  It seems a bit odd since it's not actually java code.
> Is there a better place to put this?  Should it go under tools?

I'd suggest tools/testing. I think its a good idea to share such
testing tools that are just intended for use by Derby developers, even
if they only run on a single platform. Then, people interested in them
can collaborate on them and use them if they are able.

In general, having something is 100% better than having nothing. ;-)

andrew

[jira] Updated: (DERBY-1115) Write a test that ensures that code that translates a message id into a message does so correctly

Posted by "David Van Couvering (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1115?page=all ]

David Van Couvering updated DERBY-1115:
---------------------------------------

    Attachment: generateClientMessageTest.sh

What I have done instead is done some ingenuous (IMHO :)) use of grep and sed to *generate* a unit test which basically extracts all (or as many as I could find) uses of message translation in the network client and puts it in a single test file.  I have yet to tackle this for the engine.

So, I have this all working (see attached) and I actually already found one bug that way.  Since it depends on UNIX utilities, it can't be part of the standard unit tests, but I'd like to check it in and recommend we use it for nightly regression and release tests.

The question is, where to put it?  Where I have it right now is under java/build/i18nTestGen.  It seems a bit odd since it's not actually java code.  Is there a better place to put this?  Should it go under tools?  


> Write a test that ensures that code that translates a message id into a message does so correctly
> -------------------------------------------------------------------------------------------------
>
>          Key: DERBY-1115
>          URL: http://issues.apache.org/jira/browse/DERBY-1115
>      Project: Derby
>         Type: Test
>     Reporter: David Van Couvering
>     Priority: Minor
>  Attachments: README, genClient1.sed, genClient2.sed, generateClientMessageTest.sh
>
> After finding, in my and others' code, a number of situations where we used a message id with no matching message, or used the incorrect number of parameters for an internationalized message, I became determined to write a test that tries to track down these bugs, a kind of "i18n lint".  
> It's very hard, almost impossible, to test these invocations of message formatting through a normal  unit test, because basically you have to write a full suite of negative tests.
> This bug is a placeholder for some work I am doing to accomplish this task using code parsing rather than trying to execute negative tests.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Closed: (DERBY-1115) Write a test that ensures that code that translates a message id into a message does so correctly

Posted by "Kathey Marsden (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-1115?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kathey Marsden closed DERBY-1115.
---------------------------------

    Resolution: Fixed

Closing this as fixed as there was a test written.  That said there are still some problems with the test.  This is filed as DERBY-1567, but there is no need to keep both issues open.


> Write a test that ensures that code that translates a message id into a message does so correctly
> -------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-1115
>                 URL: https://issues.apache.org/jira/browse/DERBY-1115
>             Project: Derby
>          Issue Type: Test
>          Components: Test
>            Reporter: David Van Couvering
>            Priority: Minor
>         Attachments: genClient1.sed, genClient2.sed, generateClientMessageTest.sh, README, TestClientMessages.java
>
>
> After finding, in my and others' code, a number of situations where we used a message id with no matching message, or used the incorrect number of parameters for an internationalized message, I became determined to write a test that tries to track down these bugs, a kind of "i18n lint".  
> It's very hard, almost impossible, to test these invocations of message formatting through a normal  unit test, because basically you have to write a full suite of negative tests.
> This bug is a placeholder for some work I am doing to accomplish this task using code parsing rather than trying to execute negative tests.

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


[jira] Updated: (DERBY-1115) Write a test that ensures that code that translates a message id into a message does so correctly

Posted by "David Van Couvering (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1115?page=all ]

David Van Couvering updated DERBY-1115:
---------------------------------------

    Attachment: TestClientMessages.java

> Write a test that ensures that code that translates a message id into a message does so correctly
> -------------------------------------------------------------------------------------------------
>
>          Key: DERBY-1115
>          URL: http://issues.apache.org/jira/browse/DERBY-1115
>      Project: Derby
>         Type: Test
>     Reporter: David Van Couvering
>     Priority: Minor
>  Attachments: README, TestClientMessages.java, genClient1.sed, genClient2.sed, generateClientMessageTest.sh
>
> After finding, in my and others' code, a number of situations where we used a message id with no matching message, or used the incorrect number of parameters for an internationalized message, I became determined to write a test that tries to track down these bugs, a kind of "i18n lint".  
> It's very hard, almost impossible, to test these invocations of message formatting through a normal  unit test, because basically you have to write a full suite of negative tests.
> This bug is a placeholder for some work I am doing to accomplish this task using code parsing rather than trying to execute negative tests.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (DERBY-1115) Write a test that ensures that code that translates a message id into a message does so correctly

Posted by "David Van Couvering (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1115?page=all ]

David Van Couvering updated DERBY-1115:
---------------------------------------

    Attachment: genClient2.sed

> Write a test that ensures that code that translates a message id into a message does so correctly
> -------------------------------------------------------------------------------------------------
>
>          Key: DERBY-1115
>          URL: http://issues.apache.org/jira/browse/DERBY-1115
>      Project: Derby
>         Type: Test
>     Reporter: David Van Couvering
>     Priority: Minor
>  Attachments: README, genClient1.sed, genClient2.sed, generateClientMessageTest.sh
>
> After finding, in my and others' code, a number of situations where we used a message id with no matching message, or used the incorrect number of parameters for an internationalized message, I became determined to write a test that tries to track down these bugs, a kind of "i18n lint".  
> It's very hard, almost impossible, to test these invocations of message formatting through a normal  unit test, because basically you have to write a full suite of negative tests.
> This bug is a placeholder for some work I am doing to accomplish this task using code parsing rather than trying to execute negative tests.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (DERBY-1115) Write a test that ensures that code that translates a message id into a message does so correctly

Posted by "David Van Couvering (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1115?page=comments#action_12370589 ] 

David Van Couvering commented on DERBY-1115:
--------------------------------------------

 Submitted client-side test, revision 386187. Derbyall passed except for wisconsin.sql, which looks completely unrelated



> Write a test that ensures that code that translates a message id into a message does so correctly
> -------------------------------------------------------------------------------------------------
>
>          Key: DERBY-1115
>          URL: http://issues.apache.org/jira/browse/DERBY-1115
>      Project: Derby
>         Type: Test
>     Reporter: David Van Couvering
>     Priority: Minor
>  Attachments: README, TestClientMessages.java, genClient1.sed, genClient2.sed, generateClientMessageTest.sh
>
> After finding, in my and others' code, a number of situations where we used a message id with no matching message, or used the incorrect number of parameters for an internationalized message, I became determined to write a test that tries to track down these bugs, a kind of "i18n lint".  
> It's very hard, almost impossible, to test these invocations of message formatting through a normal  unit test, because basically you have to write a full suite of negative tests.
> This bug is a placeholder for some work I am doing to accomplish this task using code parsing rather than trying to execute negative tests.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (DERBY-1115) Write a test that ensures that code that translates a message id into a message does so correctly

Posted by "David Van Couvering (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1115?page=all ]

David Van Couvering updated DERBY-1115:
---------------------------------------

    Attachment: README

> Write a test that ensures that code that translates a message id into a message does so correctly
> -------------------------------------------------------------------------------------------------
>
>          Key: DERBY-1115
>          URL: http://issues.apache.org/jira/browse/DERBY-1115
>      Project: Derby
>         Type: Test
>     Reporter: David Van Couvering
>     Priority: Minor
>  Attachments: README, genClient1.sed, genClient2.sed, generateClientMessageTest.sh
>
> After finding, in my and others' code, a number of situations where we used a message id with no matching message, or used the incorrect number of parameters for an internationalized message, I became determined to write a test that tries to track down these bugs, a kind of "i18n lint".  
> It's very hard, almost impossible, to test these invocations of message formatting through a normal  unit test, because basically you have to write a full suite of negative tests.
> This bug is a placeholder for some work I am doing to accomplish this task using code parsing rather than trying to execute negative tests.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (DERBY-1115) Write a test that ensures that code that translates a message id into a message does so correctly

Posted by "Mike Matrigali (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1115?page=all ]

Mike Matrigali updated DERBY-1115:
----------------------------------

    Component: Test

> Write a test that ensures that code that translates a message id into a message does so correctly
> -------------------------------------------------------------------------------------------------
>
>          Key: DERBY-1115
>          URL: http://issues.apache.org/jira/browse/DERBY-1115
>      Project: Derby
>         Type: Test

>   Components: Test
>     Reporter: David Van Couvering
>     Priority: Minor
>  Attachments: README, TestClientMessages.java, genClient1.sed, genClient2.sed, generateClientMessageTest.sh
>
> After finding, in my and others' code, a number of situations where we used a message id with no matching message, or used the incorrect number of parameters for an internationalized message, I became determined to write a test that tries to track down these bugs, a kind of "i18n lint".  
> It's very hard, almost impossible, to test these invocations of message formatting through a normal  unit test, because basically you have to write a full suite of negative tests.
> This bug is a placeholder for some work I am doing to accomplish this task using code parsing rather than trying to execute negative tests.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (DERBY-1115) Write a test that ensures that code that translates a message id into a message does so correctly

Posted by "David Van Couvering (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1115?page=all ]

David Van Couvering updated DERBY-1115:
---------------------------------------

    Attachment: genClient1.sed

> Write a test that ensures that code that translates a message id into a message does so correctly
> -------------------------------------------------------------------------------------------------
>
>          Key: DERBY-1115
>          URL: http://issues.apache.org/jira/browse/DERBY-1115
>      Project: Derby
>         Type: Test
>     Reporter: David Van Couvering
>     Priority: Minor
>  Attachments: README, genClient1.sed, genClient2.sed, generateClientMessageTest.sh
>
> After finding, in my and others' code, a number of situations where we used a message id with no matching message, or used the incorrect number of parameters for an internationalized message, I became determined to write a test that tries to track down these bugs, a kind of "i18n lint".  
> It's very hard, almost impossible, to test these invocations of message formatting through a normal  unit test, because basically you have to write a full suite of negative tests.
> This bug is a placeholder for some work I am doing to accomplish this task using code parsing rather than trying to execute negative tests.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira