| Newsgroups |
gmane.comp.java.junit.user |
| Message-ID |
<[email protected]> |
--------------060508020206030608020606
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
On 6/23/2015 3:44 AM, Paul King [email protected] [junit] wrote:
>
>
> I would guess that he wants the pair testing to help track down
> "global state" problem
> rather than as a permanent measure.
>
yes. i have many tests that use sockets and threads.
i was hoping to get them by using: @RunWith(Suite.class)
@Suite.SuiteClasses({PairsTestCase.class}) public class
RunWithSuiteTextCase {] and some kind of filtering, but i am getting lost.
thanks
>
> On 23/06/2015 7:07 PM, Colin Vipurs [email protected] [junit] wrote:
> > Hi Ray,
> >
> > It sounds like one (or more) of your tests is manipulating global
> state which is affecting one (or more) other tests, hence the reason
> for the failing test passing when run by itself. Rather than
> generating a combination of tests it would be much better to isolate
> the state manipulation so that it can be controlled correctly from
> within the test.
> >
> > On Tue, Jun 23, 2015 at 2:49 AM, Ray Tayek [email protected]
> <mailto:[email protected]> [junit] <[email protected]
> <mailto:[email protected]>> wrote:
> >
> > __
> >
> > using junit 4, i have a test case
> <http://xunitpatterns.com/Testcase%20Class.html> that has n test
> methods <http://xunitpatterns.com/Test%20Method.html>, one of the test
> methods fails when the test case is run. and this failing test method
> succeeds when run by itself.
> >
> > i would like to dynamically (at run time) create a set of test
> suites <http://xunitpatterns.com/Test%20Suite%20Object.html> (or test
> cases), one for each pair of test methods in the test case.
> >
> > so a test case with 3 test methods would generate 3!=6 test suites
> (or test cases).
> >
> > thanks
> >
> > --
> > Honesty is a very expensive gift. So, don't expect it from cheap
> people - Warren Buffett
> > http://tayek.com/
> >
> >
> >
> >
> > --
> > Maybe she awoke to see the roommate's boyfriend swinging from the
> chandelier wearing a boar's head.
> >
> > Something which you, I, and everyone else would call "Tuesday", of
> course.
> >
> >
>
> ---
> This email has been checked for viruses by Avast antivirus software.
> https://www.avast.com/antivirus
>
>
--
Honesty is a very expensive gift. So, don't expect it from cheap people - Warren Buffett
http://tayek.com/
--------------060508020206030608020606
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit
<head>
<style type="text/css">
<!--
/* start of attachment style */
.ygrp-photo-title{
clear: both;
font-size: smaller;
height: 15px;
overflow: hidden;
text-align: center;
width: 75px;
}
div.ygrp-photo{
background-position: center;
background-repeat: no-repeat;
background-color: white;
border: 1px solid black;
height: 62px;
width: 62px;
}
div.photo-title
a,
div.photo-title a:active,
div.photo-title a:hover,
div.photo-title a:visited {
text-decoration: none;
}
div.attach-table div.attach-row {
clear: both;
}
div.attach-table div.attach-row div {
float: left;
/* margin: 2px;*/
}
p {
clear: both;
padding: 15px 0 3px 0;
overflow: hidden;
}
div.ygrp-file {
width: 30px;
valign: middle;
}
div.attach-table div.attach-row div div a {
text-decoration: none;
}
div.attach-table div.attach-row div div span {
font-weight: normal;
}
div.ygrp-file-title {
font-weight: bold;
}
/* end of attachment style */
-->
</style>
</head>
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<!-- |**|begin egp html banner|**| -->
<br><br>
<!-- |**|end egp html banner|**| -->
<div class="moz-cite-prefix">On 6/23/2015 3:44 AM, Paul King
<a class="moz-txt-link-abbreviated" href="mailto:[email protected]">[email protected]</a> [junit] wrote:<br>
</div>
<blockquote cite="mid:[email protected]" type="cite"> <span
style="display:none"> </span>
<div id="ygrp-text">
<p><br>
I would guess that he wants the pair testing to help track
down "global state" problem<br>
rather than as a permanent measure.<br>
</p>
</div>
</div>
</div>
</blockquote>
yes. i have many tests that use sockets and threads.<br>
<br>
i was hoping to get them by using: @RunWith(Suite.class)
@Suite.SuiteClasses({PairsTestCase.class}) public class
RunWithSuiteTextCase {] and some kind of filtering, but i am getting
lost.<br>
<br>
thanks<br>
<br>
<blockquote cite="mid:[email protected]" type="cite">
<div id="ygrp-mlmsg" style="position:relative;">
<div id="ygrp-msg" style="z-index: 1;">
<div id="ygrp-text">
<p>
<br>
On 23/06/2015 7:07 PM, Colin Vipurs <a class="moz-txt-link-abbreviated" href="mailto:[email protected]">[email protected]</a>
[junit] wrote:<br>
> Hi Ray,<br>
><br>
> It sounds like one (or more) of your tests is
manipulating global state which is affecting one (or more)
other tests, hence the reason for the failing test passing
when run by itself. Rather than generating a combination
of tests it would be much better to isolate the state
manipulation so that it can be controlled correctly from
within the test.<br>
><br>
> On Tue, Jun 23, 2015 at 2:49 AM, Ray Tayek
<a class="moz-txt-link-abbreviated" href="mailto:[email protected]">[email protected]</a> <a class="moz-txt-link-rfc2396E" href="mailto:[email protected]"><mailto:[email protected]></a> [junit]
<<a class="moz-txt-link-abbreviated" href="mailto:[email protected]">[email protected]</a>
<a class="moz-txt-link-rfc2396E" href="mailto:[email protected]"><mailto:[email protected]></a>> wrote:<br>
><br>
> __<br>
><br>
> using junit 4, i have a test case
<a class="moz-txt-link-rfc2396E" href="http://xunitpatterns.com/Testcase%20Class.html"><http://xunitpatterns.com/Testcase%20Class.html></a>
that has n test methods
<a class="moz-txt-link-rfc2396E" href="http://xunitpatterns.com/Test%20Method.html"><http://xunitpatterns.com/Test%20Method.html></a>, one
of the test methods fails when the test case is run. and
this failing test method succeeds when run by itself.<br>
><br>
> i would like to dynamically (at run time) create a
set of test suites
<a class="moz-txt-link-rfc2396E" href="http://xunitpatterns.com/Test%20Suite%20Object.html"><http://xunitpatterns.com/Test%20Suite%20Object.html></a>
(or test cases), one for each pair of test methods in the
test case.<br>
><br>
> so a test case with 3 test methods would generate
3!=6 test suites (or test cases).<br>
><br>
> thanks<br>
><br>
> --<br>
> Honesty is a very expensive gift. So, don't expect it
from cheap people - Warren Buffett<br>
> <a class="moz-txt-link-freetext" href="http://tayek.com/">http://tayek.com/</a><br>
><br>
><br>
><br>
><br>
> --<br>
> Maybe she awoke to see the roommate's boyfriend
swinging from the chandelier wearing a boar's head.<br>
><br>
> Something which you, I, and everyone else would call
"Tuesday", of course.<br>
><br>
> <br>
<br>
---<br>
This email has been checked for viruses by Avast antivirus
software.<br>
<a class="moz-txt-link-freetext" href="https://www.avast.com/antivirus">https://www.avast.com/antivirus</a><br>
<br>
</p>
</div>
<!-- end group email -->
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Honesty is a very expensive gift. So, don't expect it from cheap people - Warren Buffett
<a class="moz-txt-link-freetext" href="http://tayek.com/">http://tayek.com/</a></pre>
<!-- |**|begin egp html banner|**| -->
<br>
<br>
<!-- |**|end egp html banner|**| -->
<div width="1" style="color: white; clear: both;"/>__._,_.___</div>
<div id="fromDMARC" style="clear:both; margin-top: 10px;">
<hr style="height:2px ; border-width:0; color:#E3E3E3; background-color:#E3E3E3;">
Posted by: Ray Tayek <[email protected]> <hr style="height:2px ; border-width:0; color:#E3E3E3; background-color:#E3E3E3;">
</div>
<!-- Start Recommendations -->
<!-- End Recommendations -->
<!-- |**|begin egp html banner|**| -->
<img src="http://geo.yahoo.com/serv?s=97476590/grpId=2423328/grpspId=1705006905/msgId=24671/stime=1435111976" width="1" height="1"> <br>
<!-- |**|end egp html banner|**| -->
<!-- |**|begin egp html banner|**| -->
<br>
<!-- |**|begin egp html banner|**| -->
<div id="ygrp-vital" style="background-color: #f2f2f2; font-family: Verdana; font-size: 10px; margin-bottom: 10px; padding: 10px;">
<span id="vithd" style="font-weight: bold; color: #333; text-transform: uppercase; "><a href="https://groups.yahoo.com/neo/groups/junit/info;_ylc=X3oDMTJlcnFzZjM4BF9TAzk3MzU5NzE0BGdycElkAzI0MjMzMjgEZ3Jwc3BJZAMxNzA1MDA2OTA1BHNlYwN2dGwEc2xrA3ZnaHAEc3RpbWUDMTQzNTExMTk3Ng--" style="text-decoration: none;">Visit Your Group</a></span>
<ul style="list-style-type: none; margin: 0; padding: 0; display: inline;">
</ul>
</div>
<div id="ft" style="font-family: Arial; font-size: 11px; margin-top: 5px; padding: 0 2px 0 0; clear: both;">
<a href="https://groups.yahoo.com/neo;_ylc=X3oDMTJkcGQzYmRiBF9TAzk3NDc2NTkwBGdycElkAzI0MjMzMjgEZ3Jwc3BJZAMxNzA1MDA2OTA1BHNlYwNmdHIEc2xrA2dmcARzdGltZQMxNDM1MTExOTc2" style="float: left;"><img src="http://l.yimg.com/ru/static/images/yg/img/email/new_logo/logo-groups-137x15.png" height="15" width="137" alt="Yahoo! Groups" style="border: 0;"/></a>
<div style="color: #747575; float: right;"> • <a href="https://info.yahoo.com/privacy/us/yahoo/groups/details.html" style="text-decoration: none;">Privacy</a> • <a href="mailto:[email protected]?subject=Unsubscribe" style="text-decoration: none;">Unsubscribe</a> • <a href="https://info.yahoo.com/legal/us/yahoo/utos/terms/" style="text-decoration: none;">Terms of Use</a> </div>
</div>
<!-- |**|end egp html banner|**| -->
</div> <!-- ygrp-msg -->
<br>
<!-- |**|end egp html banner|**| -->
<div style="color: white; clear: both;"/>__,_._,___</div>
</body>
</html>
--------------060508020206030608020606--