db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Manish Khettry (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-3050) Convert groupBy.sql tests to JUnit and include them in GroupByTest.java
Date Fri, 07 Sep 2007 17:10:30 GMT

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

Manish Khettry commented on DERBY-3050:
---------------------------------------

A few thoughts on the test case.

1. The testcase creates and drops the fixtures (tables t1,t2) that it needs If the test fails,
the tables will not be dropped causing potential problems if others add more tests to this
suite. It may be better to move the table creation to a setUp method or better still to a
oneTimeSetup or atleast dropping the tables in a finally block.

2. Do you think its worth the effort to break up the new test case testGroupBy into smaller
test cases? There are several advantages to small test cases-- for one, if you encounter a
failure, it does not hide other problems down the test case. Second it can quickly clue you
to the nature of the failure. The comments in the test provide a handy way to split up the
test case; i.e.     

        // ?s in group by
        // group by on long varchar type
        // having clause cannot contain column references which 
        // are not grouping columns

If a test case called testParamInGroupBy fails, the person investigating the failure has a
*lot* more to go by then a failure in testGroupBy.



> Convert groupBy.sql tests to JUnit and include them in GroupByTest.java
> -----------------------------------------------------------------------
>
>                 Key: DERBY-3050
>                 URL: https://issues.apache.org/jira/browse/DERBY-3050
>             Project: Derby
>          Issue Type: Sub-task
>          Components: Test
>    Affects Versions: 10.4.0.0
>            Reporter: Bryan Pendleton
>            Assignee: Bryan Pendleton
>            Priority: Minor
>         Attachments: convertToJUnit.diff, convertToJUnit.stat
>
>
> There are currently 3 sets of GROUP BY tests:
>  - GroupByExpressionTest.java
>  - GroupByTest.java
>  - groupBy.sql
> The first two tests are JUnit tests; the groupBy.sql tests are old-style harness tests,
> although they are now run in the JUnit framework using the LangScripts technique.
> This sub-task proposes to convert the groupBy.sql tests to JUnit tests, and to include
> them directly into GroupByTest.java.
> The DERBY-2151 conversion tool can be used to assist in the conversion process.

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


Mime
View raw message