commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebb (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (COLLECTIONS-374) Bug in class#BeanMap and TransformedBuffer with reproducible JUnit test
Date Sun, 03 Apr 2011 10:24:05 GMT

    [ https://issues.apache.org/jira/browse/COLLECTIONS-374?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13015125#comment-13015125
] 

Sebb commented on COLLECTIONS-374:
----------------------------------

The tool sounds interesting, but at present it is difficult to check what is happening. The
comments on the asserts are OK, but otherwise the tests are hard to understand.

Every class name is given in full, even java.lang.Integer. The testing tool should generate
the necessary imports.

There should be a package clause with the same package as the class under test, and the test
class name should relate to the class under test, e.g. BeanMapAutoTest. Each test class should
only test one target class.

The throws clauses should be "throws Exception" rather than Throwable.

In the test0() method, there appear to be lots of unused variables, and the test target (BeanMap)
has been deprecated (and in fact has since been removed).

In the test1() method, again there are a lot of unused variables. It also looks like the tool
failed to add a test part way through, as there is a comment, but no assertion. This might
explain the unused variables. Ideally every assertion should be in a different method.

> Bug in class#BeanMap and TransformedBuffer with reproducible JUnit test
> -----------------------------------------------------------------------
>
>                 Key: COLLECTIONS-374
>                 URL: https://issues.apache.org/jira/browse/COLLECTIONS-374
>             Project: Commons Collections
>          Issue Type: Bug
>    Affects Versions: 3.2
>         Environment: jdk 1.6.0
>            Reporter: Sai Zhang
>         Attachments: ApacheCommons_Documented_Test.java
>
>
> Hi all:
> (as in the previous post)
> I am writing an automated bug finding tool, and using
> Apache Commons Collections as an experimental subject
> for evaluation.
> The tool creates executable JUnit tests as well as
> explanatory code comments. I attached one bug-revealing
> test as follows. Could you please kindly check it, to
> see if it is a real bug or not?
> Also, it would be tremendous helpful if you could give
> some feedback and suggestion on the generated code comments?
> From the perspective of developers who are relatively familiar
> with the code,
> is the automatically-inferred comment useful in understanding
> the generated test? is the comment helpful in bug fixing?
> Your suggestion will help us improve the tool.
> Please see attachment for the failed test. 
> The comment appears in the form of:
> //Tests pass if .... (it gives some small change to the test which can make the failed
test pass)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message