Empty Unit Tests graph

39 views
Skip to first unread message

Lars Stavholm

unread,
Oct 20, 2014, 2:26:22 PM10/20/14
to bit...@googlegroups.com
When running a build recipe including "nosetests --with-xunit" for the tests I get a nosetests.xml which I then transform using "<x:transform.../>" with the transformation stylesheet taken from http://bitten.edgewall.org/attachment/ticket/147/nose2bitten.xslt, which runs nicely, transforming the nosetests.xml into:

<?xml version="1.0"?>
<report category="test">
  <test>
    <duration>18.498</duration>
    <fixture>eqmapi</fixture>
    <name>Search</name>
    <status>success</status>
    <stdout/>
  </test>
</report>

...which I think is what Bitten is looking for.

The report is handed over to the bitten master and subsequently show up (kinda') under the Build Status Test Results tab.

However, the numbers are all 0 (zero) except for the Total count, which is correct, but Failures, Ignores, and Errors are all 0 (zero), which of course makes the graph come out empty.

Any hints?

R
/Lars Stavholm

Simon Cross

unread,
Oct 20, 2014, 5:50:40 PM10/20/14
to bit...@googlegroups.com
Could you send an example record from the transformed XML?

Lars Stavholm

unread,
Oct 21, 2014, 1:51:08 AM10/21/14
to bit...@googlegroups.com
On Monday, October 20, 2014 11:50:40 PM UTC+2, Hodgestar wrote:
Could you send an example record from the transformed XML?

Well, actually, that was included in the original message, but here it is again:

<?xml version="1.0"?>
<report category="test">
   <test>
     <duration>18.498</duration>
     <fixture>eqmapi</fixture>
     <name>Search</name>
     <status>success</status>
     <stdout/>
   </test>
</report>

That's the transformed XML (formatted for human reading).

BTW, I'm running my Trac 1.0.1 on RHEL 6.4 with Bitten from dev trunk, merely a few days old. 
/L 

Lars Stavholm

unread,
Oct 21, 2014, 2:12:52 AM10/21/14
to bit...@googlegroups.com
Actually, that was a snippet (an extract), in reality there's 12 of those, all successful.

Lars Stavholm

unread,
Oct 21, 2014, 2:21:06 AM10/21/14
to bit...@googlegroups.com
Well, as I continue testing and tweaking, I learn more: I made one of the tests fail, and that one show up under the "Test Results" tab, but nothing in the graph, no success:es and no failures, just an empty graph. The y-axis of the graph is however 12 units high, the exact number of test cases.

Simon Cross

unread,
Oct 21, 2014, 3:22:48 PM10/21/14
to bit...@googlegroups.com
The only immediate oddity I can see is the missing <file>...</file>
tag but after looking at the code that doesn't seem that important. Do
the entries in the bitten_report_item table in your database look
sensible?

Lars Stavholm

unread,
Oct 22, 2014, 10:02:01 AM10/22/14
to bit...@googlegroups.com
I cannot find anything strange:

# sqlite3 /var/www/trac/db/trac.db 
SQLite version 3.6.20
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> select * from bitten_report_item;
1|0|status|success
1|0|name|Search
1|0|stdout|
1|0|fixture|eqmapi
1|0|duration|19.325
1|0|type|test
1|1|status|success
1|1|name|test_search_cc_2800044514
1|1|stdout|
1|1|fixture|test.test_eqmapi.TestSAMAPISearch
1|1|duration|5.099
1|1|type|test
1|2|status|success
1|2|name|test_search_cc_2800044532
1|2|stdout|
1|2|fixture|test.test_eqmapi.TestSAMAPISearch
1|2|duration|2.234
1|2|type|test
1|3|status|success
1|3|name|test_search_cc_wildcard_4514
1|3|stdout|
1|3|fixture|test.test_eqmapi.TestSAMAPISearch
1|3|duration|5.666
1|3|type|test
1|4|status|success
1|4|name|test_search_cc_wildcard_4532
1|4|stdout|
1|4|fixture|test.test_eqmapi.TestSAMAPISearch
1|4|duration|5.484
1|4|type|test
1|5|status|success
1|5|name|test_search_one_bams_id
1|5|stdout|
1|5|fixture|test.test_eqmapi.TestSAMAPISearch
1|5|duration|2.058
1|5|type|test
1|6|status|success
1|6|name|test_search_with_wildcard
1|6|stdout|
1|6|fixture|test.test_eqmapi.TestSAMAPISearch
1|6|duration|2.007
1|6|type|test
1|7|status|success
1|7|name|test_pep257
1|7|stdout|
1|7|fixture|test.test_static_analysis.TestStaticAnalysis
1|7|duration|0.016
1|7|type|test
1|8|status|success
1|8|name|test_pep8
1|8|stdout|
1|8|fixture|test.test_static_analysis.TestStaticAnalysis
1|8|duration|0.028
1|8|type|test
1|9|status|success
1|9|name|test_pylint
1|9|stdout|
1|9|fixture|test.test_static_analysis.TestStaticAnalysis
1|9|duration|1.066
1|9|type|test
sqlite> 

And in the Test Results tab it looks OK as well.
I think the problem might be in the presentation layer, i.e. the part that populates the graph.
Everything else seems OK.

Lars Stavholm

unread,
Oct 27, 2014, 1:14:24 PM10/27/14
to bit...@googlegroups.com
Does any one have a working setup with working test/coverage graphs with Bitten 0.7devr1027 and Trac 1.0.1?

Lars Stavholm

unread,
Oct 29, 2014, 7:35:09 AM10/29/14
to bit...@googlegroups.com
Well, as it turns out, I forgot to mention a crucial piece of information: we're using git. So the change id's of git is used on the x-axis of the graph, as subversion change set id's was used originally, and the git change id's are huge hash:es and didn't fit in the visible part of the graph, thus: we got no graphs = empty graphs. Changed  the x-axis ticks to use build number instead (much smaller), and everything is fine, the graphs are showing up. We're going to use this for a while for evaluation. Later on I will submit a patch to the bitten repo.

Simon Cross

unread,
Oct 29, 2014, 5:09:42 PM10/29/14
to bit...@googlegroups.com

Great that you got to the bottom of this. Shout when you have a patch and I'll review.

Reply all
Reply to author
Forward
0 new messages