New and Improved 3.13 Beta. Highlights: Shareable filters and dashboards and lots of other goodies. Any feedback can be raised as JIRA issues in the JIRA project.
Issue Details (XML | Word | Printable)

Key: BAM-1065
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Mark Chaimungkalanont [Atlassian]
Reporter: Ryan Bohn
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Bamboo

Bamboo reports twice as many unit test

Created: 23/Mar/07 01:23 PM   Updated: 30/May/07 09:51 PM
Component/s: Dashboard, User Interface
Affects Version/s: 1.0.2
Fix Version/s: 1.1.2

Time Tracking:
Not Specified

File Attachments: 1. Text File bamboo.log (114 kB)

Image Attachments:

1. builder.jpg
(95 kB)

Internal Priority: 3. Medium
Participants: Ajay Sridhar [Atlassian], Edwin Wong [Atlassian], Mark Chaimungkalanont [Atlassian] and Ryan Bohn
Since last comment: 1 year, 12 weeks, 6 days ago
Internal Work Bucket: Confirmed
Number of comments: 7
Labels:


 Description  « Hide
Bamboo reports that it executed twice as many unit tests than actually exist in the project. Eclipse and Hudson both report 459 unit tests, while Bamboo reports 918 tests executed.

 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Ajay Sridhar [Atlassian] added a comment - 25/Mar/07 07:23 PM
Hi Ryan,

This issue sounds very similar to
http://jira.atlassian.com/browse/BAM-495

This is actually a Maven 2 bug (see http://jira.codehaus.org/browse/MSUREFIRE-114), where the surefire plugin produces unit tests that are cumulative. So it looks like your have exponentially more tests.

If this is not the case, then can you please give me a little more information on your builder and system environment along with an output of Bamboo-atlassian.log

Cheers,
Ajay


Ryan Bohn added a comment - 26/Mar/07 01:07 PM
We are using the Ant builder, not Maven. I have attached a screenshot of our builder config.

Bamboo is running on a Red Hat ES3 server.

I have attached the bamboo.log, which is a capture of a single builder. When I run the following command on the log file, I get a total of 486 tests run.

cat bamboo.log | grep "Tests run:" | awk '{print $11}' | sed 's/,//g' | perl -e 'foreach ( <STDIN> ) { $sum += $_; } print "$sum\n";

However, the interface is reporting that 972 tests were ran.


Ryan Bohn added a comment - 26/Mar/07 01:48 PM
I have discovered the cause of the issue. Our test target in ant outputs both <batchtest and <junitreport to the same directory. The batchtest tag outputs an xml file per test and the junitreport outputs a single xml file with a summary of all the tests. Bamboo was reading both the individual test xml files and the merged xml file, which accounts for counting the unit tests twice.

I'm not sure if this is still a bug with Bamboo or not. We are using Hudson side-by-side with Bamboo and Hudson reported the correct number of unit tests with the same junit test output configuration. I could be convinced, however, that this is not a bug.


Edwin Wong [Atlassian] added a comment - 26/Mar/07 09:57 PM
Hi Ryan,

In Bamboo, you can specify which directory to read for Bamboo to pick up the unit tests from. To change this, you can go to the Build Configuration tab under a plan, and then select the Builder Configuration sub-tab. There, under "Where should Bamboo look for the test result files?", you can pick a directory where Bamboo will look for your test xml files. The default directory is "*/test-reports/.xml" which tells Bamboo to look for xml files in all directories called test-reports - which I think, may be the reason why you are seeing duplicate tests.

Please let us know how you go.

Regards,
Edwin


Ryan Bohn added a comment - 27/Mar/07 09:22 AM
Edwin,

I apologize if I was not clear in my previous comment. My report directory is set to */build/logs/test/.xml . Our ant build was producing 1 xml per unit test to that directory. The ant build also produced a single xml file containing all the unit tests. This caused bamboo to count the unit tests twice. We ended up just not producing the merged xml file and the problem has gone away. It is interesting to note that Hudson had the same configuration as bamboo, but it was smart enough to count the right number of unit tests.


Edwin Wong [Atlassian] added a comment - 30/Mar/07 02:42 AM
Ryan,

Thanks for the comment and clearing this up.

With the duplication, that's something we can probably put in a duplication check for test cases with the identical test suite name and test case name. We'll get onto that.

Cheers,
Edwin


Mark Chaimungkalanont [Atlassian] added a comment - 30/May/07 09:51 PM
This should now be sorted for 1.1.2