<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div apple-content-edited="true"><span></span>
</div>
<br><div><div>On 08 May 2012, at 10:49 AM, Jóvan Sean Dippenaar wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Good day<div><br></div><div><div><br></div><div>I must have changed it when debugging "skipped" tests problem, I was experiencing in bamboo.</div><div><br></div><div>Due to observing that the "on_tc_skip" uses " _Tc " ( note small 'c' ), noting that Tc is an atom and TC</div><div>is a record. Hence when debugging "on_tc_fail" I unwittingly removed the underscore for a debug, thinking that it would not conflict. ( the curse of long working hours :) )</div><div><br></div><div><br></div><div><i>A note on skipped test cases in bamboo :</i></div><div><br></div><div>The JUnit parser in bamboo does not acknowledge "skipped" test cases, which unfortunately cause a "false positive" sistuation. </div><div>Changing the "skipped" to "failed", the bamboo junit parser shows the failed test cases. I personally prefer this when for project management reasons.</div><div><br></div><div>I hope is helps anyone integrating into bamboo.</div><div><br></div><div><br></div><div><br></div><div>/ Jovan Sean Dippenaar - Aeonmind Enterprises <br><div apple-content-edited="true"><br></div><div apple-content-edited="true"><br></div>
<br><div>
<span></span></div></div></div></div><span><PastedGraphic-7.pdf></span><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div><div><span></span>
</div>
<br><div><div>On 07 May 2012, at 5:25 PM, Lukas Larsson wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">
<meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type">
<div bgcolor="#FFFFFF" text="#000000">
Hello,<br>
<br>
Thanks for the bug report and provided fix. I'll include it in the
next release. <br>
<br>
I'm a bit uncertain what you mean with the first issue though. The
code is already the way you propose it to be:
<a class="moz-txt-link-freetext" href="https://github.com/erlang/otp/blob/bb1734e95a5f6a7315819c24bc1fdd799534c787/lib/common_test/src/cth_surefire.erl#L86">https://github.com/erlang/otp/blob/bb1734e95a5f6a7315819c24bc1fdd799534c787/lib/common_test/src/cth_surefire.erl#L86</a><br>
<br>
Lukas<br>
<br>
On 05/05/12 14:01, Jóvan Sean Dippenaar wrote:
<blockquote cite="mid:E58097EA-732F-49AB-9A41-6F3F2EF92035@aeonmind.co.za" type="cite">
<pre wrap="">Errors in Common Test 1.6.1 - cth_surefire.erl
cth_surefire.erl has a two errors :
1. " on_tc_fail( TC, Res, State)" should be "on_tc_fail(_Tc, Res, State)", as the TC causes a bad match on inside the function with regards to the TC record.
this causes surefire results to generate .xml which indicate passed tests when in actual fact the tests have failed.
2. failures in "init_per_suite" cause "on_tc_skip" to be called which is correct up until "on_tc_skip" is called for "end_per_suite" as well. This also means that
"post_end_per_suite" is never called, which is the problem. As "post_end_per_suite" takes all test cases results and places in State#state{ test_suites ).
This is important as the xml generation on terminate iterates thru the test suites.
here's a fix :
on_tc_skip(Tc, Res, State) ->
TCs = State#state.test_cases,
[TC | RestTCs ] = TCs,
{CurTC, CurRestTCs} = case TC#testcase.failure of
passed -> {TC, RestTCs};
_OtherFailure ->
Name = atom_to_list(Tc),
NTC = new_tc_rec(Name, State#state{timer = now()}),
{NTC, TCs}
end,
NewTC = CurTC#testcase{
failure = {skipped, lists:flatten(io_lib:format("~p",[Res])) }
},
NewState = State#state{ test_cases = [NewTC | CurRestTCs]},
case Tc of
end_per_suite ->
Suite = get_suite(NewState, TCs),
AltState = NewState#state{ test_cases = [], test_suites = [Suite | NewState#state.test_suites]},
AltState;
_Other ->
NewState
end.
/ Jovan Sean Dippenaar - Aeonmind Enterprises
</pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap=""></pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
erlang-bugs mailing list
<a class="moz-txt-link-abbreviated" href="mailto:erlang-bugs@erlang.org">erlang-bugs@erlang.org</a>
<a class="moz-txt-link-freetext" href="http://erlang.org/mailman/listinfo/erlang-bugs">http://erlang.org/mailman/listinfo/erlang-bugs</a>
</pre>
</blockquote>
</div>
_______________________________________________<br>erlang-bugs mailing list<br><a href="mailto:erlang-bugs@erlang.org">erlang-bugs@erlang.org</a><br><a href="http://erlang.org/mailman/listinfo/erlang-bugs">http://erlang.org/mailman/listinfo/erlang-bugs</a><br></blockquote></div><br></div></div></div>_______________________________________________<br>erlang-bugs mailing list<br><a href="mailto:erlang-bugs@erlang.org">erlang-bugs@erlang.org</a><br>http://erlang.org/mailman/listinfo/erlang-bugs<br></blockquote></div><br></body></html>