Running ActiveTestSuite from command line

"[email protected] [junit]" <[email protected]> 02 May 2017 06:50:42 +0000
Newsgroups gmane.comp.java.junit.user
Message-ID <[email protected]>
--9nlWnTS9ocNmxdhsK3FKVLWiM6a5jwOaA8HvrLV
Content-Type:  text/plain;  charset=utf-8 
Content-Transfer-Encoding: base64

SGkgYWxsLA0KIA0KDQogSSBoYXZlIGEgcmVxdWlyZW1lbnQgdG8gcnVuIHRoZSBzYW1lIHNl
dCBvZiB0ZXN0cyBjb25jdXJyZW50bHkoaW4gc2VwYXJhdGUgdGhyZWFkcyksIGFmdGVyIGRv
aW5nIHNvbWUgZGlnZ2luZyBhYm91dCBJIGNhbWUgYWNyb3NzIEFjdGl2ZVRlc3RTdWl0ZS4g
SSd2ZSBzZWVuIHNvbWUgcG9zdHMgcmUgYW4gZXF1aXZhbGVudCBtZWNoYW5pc20gaW4gSlVu
aXQgNCwgYXMgb2YgeWV0IEkndmUgbm90IHNlZW4gYSBzdWdnZXN0ZWQgb3V0IG9mIHRoZSBi
b3ggc3VwcG9ydGVkIG1lY2hhbmlzbSBmb3IgSlVuaXQgNC4gU28gSSd2ZSBjb250aW51ZWQg
ZG93biB0aGUgcGF0aCBvZiBBY3RpdmVUZXN0U3VpdGUsIEknbSBoYXBweSB0byBiZSB0b2xk
IHRoZXJlIGlzIGEgZGlmZmVyZW50IG1lY2hhbmlzbSBub3cuDQogDQoNCiBTbyB0byB0aGUg
aXNzdWVzIEknbSBoYXZpbmcsIEkgZXZlbnR1YWxseSBnb3QgbXkgdGVzdCBzdWl0ZSBydW5u
aW5nLCBvdXIgY3VzdG9tIGJhc2UgdGVzdCBjbGFzc2VzIG5lZWQgc28gdXBkYXRlcyB0byBi
ZSB0aHJlYWQgc2FmZS4gU28gSSBoYXZlIHR3byBpZGVudGljYWwgdGVzdCBzdWl0ZXMgYWRk
ZWQgdG8gdGhlIEFjdGl2ZVRlc3RTdWl0ZSBhbmQgaXRzIHJ1bm5pbmcgaW4gMzUwMCB0ZXN0
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gZm9yayBiZWhhdmlvdXIgYnV0IHRv
IGJlIGhvbmVzdCB0aGUgZGVmYXVsdCBjb25maWd1cmF0aW9uIGlzIHdoYXQgSSB3YW50LCBp
LmUuIHBhcmFsbGVsIHRocmVhZHMgaW4gdGhlIHNhbWUgSlZNLiBBbnkgaGVscCBtdWNoIGFw
cHJlY2lhdGVkDQogDQoNCiANCiBUaGFua3MuDQogDQoNCg==

--9nlWnTS9ocNmxdhsK3FKVLWiM6a5jwOaA8HvrLV
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 7bit





<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>
<style type="text/css">
<!--
#ygrp-mkp {
  border: 1px solid #d8d8d8;
  font-family: Arial;
  margin: 10px 0;
  padding: 0 10px;
}

#ygrp-mkp hr {
  border: 1px solid #d8d8d8;
}

#ygrp-mkp #hd {
  color: #628c2a;
  font-size: 85%;
  font-weight: 700;
  line-height: 122%;
  margin: 10px 0;
}

#ygrp-mkp #ads {
  margin-bottom: 10px;
}

#ygrp-mkp .ad {
  padding: 0 0;
}

#ygrp-mkp .ad p {
  margin: 0;
}

#ygrp-mkp .ad a {
  color: #0000ff;
  text-decoration: none;
}
-->
</style>
</head>
<body>



<!-- |**|begin egp html banner|**| -->

<br><br>

<!-- |**|end egp html banner|**| -->


<p>Hi all,</p><p><br></p><p>I have a requirement to run the same set of tests concurrently(in separate threads), after doing some digging about I came across ActiveTestSuite. I&#39;ve seen some posts re an equivalent mechanism in JUnit 4, as of yet I&#39;ve not seen a suggested out of the box supported mechanism for JUnit 4. So I&#39;ve continued down the path of ActiveTestSuite, I&#39;m happy to be told there is a different mechanism now.</p><p><br></p><p>So to the issues I&#39;m having, I eventually got my test suite running, our custom base test classes need so updates to be thread safe. So I have two identical test suites added to the ActiveTestSuite and its running in 3500 tests successfully in Eclipse. The issue arrises when I try to execute the test suite on the command line. Unfort
 unately(for me) the test execution must be done via Gradle, I&#39;m relatively new to Gradle, so I&#39;m not sure if the issue I&#39;m having is solely a Gradle JUnit integration issue or if there is a general issue with running the test suite from the command line. I haven&#39;t came across any real examples of it being used from the command line.</p><p><br></p><p>So the types of errors I&#39;m getting seem to be unexpected JUnit lifecycle errors:</p><p><br></p><p><br></p><p><span style="font-style:italic;">&nbsp; &nbsp; java.lang.AssertionError: Unexpected start event for test_insert_positiveFlow_allFields(my.test.MemberTest)</span></p><p><span style="font-style:italic;">&nbsp; &nbsp; <span class="Apple-tab-span" style="white-space:pre;">	</span>at org.gradle.api.internal.tasks.testing
 .junit.JUnitTestEventAdapter.testStarted(JUnitTestEventAdapter.java:56)</span></p><p><span style="font-style:italic;">&nbsp; &nbsp; <span class="Apple-tab-span" style="white-space:pre;">	</span>at org.junit.runner.notification.RunNotifier$3.notifyListener(RunNotifier.java:87</span>)</p><p><br></p><p><br></p><p>and&nbsp;</p><p><br></p><p><span style="font-style:italic;">&nbsp; &nbsp; java.lang.AssertionError</span></p><p><span style="font-style:italic;">&nbsp; &nbsp; <span class="Apple-tab-span" style="white-space:pre;">	</span>at org.gradle.api.internal.tasks.testing.processors.TestOutputRedirector.setOutputOwner(TestOutputRedirector.java:49)</span></p><p><span style="font-style:italic;">&nbsp; &nbsp; <span class="Apple-tab-span" style="white-space:pre;">	</span>at org.gradle.api.interna
 l.tasks.testing.processors.CaptureTestOutputTestResultProcessor.completed(CaptureTestOutputTestResultProcessor.java:80)</span></p><p><span style="font-style:italic;">&nbsp; &nbsp; <span class="Apple-tab-span" style="white-space:pre;">	</span>at org.gradle.api.internal.tasks.testing.results.AttachParentTestResultProcessor.completed(AttachParentTestResultProcessor.java:56)</span></p><p><span style="font-style:italic;">&nbsp; &nbsp; <span class="Apple-tab-span" style="white-space:pre;">	</span>at org.gradle.api.internal.tasks.testing.results.AttachParentTestResultProcessor.completed(AttachParentTestResultProcessor.java:56)</span></p><p><span style="font-style:italic;">&nbsp; &nbsp; <span class="Apple-tab-span" style="white-space:pre;">	</span>at org.gradle.api.internal.tasks.testing.junit.T
 estClassExecutionEventGenerator.completed(TestClassExecutionEventGenerator.java:83)</span></p><p><br></p><p>There are other similar unexpected event assertions thrown during the test execution. I&#39;ve dug about a bit and can&#39;t see any examples of the ActiveTestSuite and Gradle(or Ant etc....) with respect to this type of issue.&nbsp;</p><p><br></p><p>The task I&#39;ve declared is:</p><p><br></p><p><span style="font-style:italic;">&nbsp; &nbsp; task parallelTestSuite(type: Test){</span></p><p><span style="font-style:italic;"><br></span></p><p><span style="font-style:italic;">&nbsp; &nbsp; &nbsp; &nbsp; //gradle.startParameter.continueOnFailure = true</span></p><p><span style="font-style:italic;">&nbsp; &nbsp; &nbsp; &nbsp; scanForTestClasses = false</span></p><p><span style="font-st
 yle:italic;">&nbsp; &nbsp; &nbsp; &nbsp; includes = [&#39;**/*MyActiveTestSuite.class&#39;]</span></p><p><span style="font-style:italic;">&nbsp; &nbsp; &nbsp; <span class="Apple-tab-span" style="white-space:pre;">	</span></span></p><p><span style="font-style:italic;">&nbsp; &nbsp; <span class="Apple-tab-span" style="white-space:pre;">	</span>environment &quot;SERVER_DIR&quot;, &quot;.&quot;</span></p><p><span style="font-style:italic;">&nbsp; &nbsp; <span class="Apple-tab-span" style="white-space:pre;">	</span>maxHeapSize = &quot;1024m&quot;</span></p><p><span style="font-style:italic;"><br></span></p><p><span style="font-style:italic;">&nbsp; &nbsp; <span class="Apple-tab-span" style="white-space:pre;">	</span>workingDir &quot;../../&quot;</span></p><p><span style="font-style:italic;">&
 nbsp; &nbsp; <span class="Apple-tab-span" style="white-space:pre;">	</span>afterTest { desc, result -&gt;</span></p><p><span style="font-style:italic;">&nbsp; &nbsp; <span class="Apple-tab-span" style="white-space:pre;">		</span>println &quot;Executing test ${desc.name} [${desc.className}] with result: ${result.resultType}&quot;</span></p><p><span style="font-style:italic;">&nbsp; &nbsp; <span class="Apple-tab-span" style="white-space:pre;">	</span>}</span></p><p><span style="font-style:italic;"><br></span></p><p><span style="font-style:italic;">&nbsp; &nbsp; }</span></p><p><br></p><p>I&#39;ve tried setting the fork behaviour but to be honest the default configuration is what I want, i.e. parallel threads in the same JVM. Any help much appreciated</p><p><br></p><p><span></span></p><p>Tha
 nks.</p><p><span><br class="yui-cursor"></span></p>



<!-- |**|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: [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=24765/stime=1493718732" 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=X3oDMTJlZ2g2YW5oBF9TAzk3MzU5NzE0BGdycElkAzI0MjMzMjgEZ3Jwc3BJZAMxNzA1MDA2OTA1BHNlYwN2dGwEc2xrA3ZnaHAEc3RpbWUDMTQ5MzcxODczMg--" style="text-decoration: none;">Visit Your Group</a></span>

     <ul style="list-style-type: none; margin: 0; padding: 0; display: inline;">
            <li style="border-right: 1px solid #000; font-weight: 700; display: inline; padding: 0 5px; margin-left: 0;">
      <span class="cat"><a href="https://groups.yahoo.com/neo/groups/junit/members/all;_ylc=X3oDMTJmYjRzOWZ1BF9TAzk3MzU5NzE0BGdycElkAzI0MjMzMjgEZ3Jwc3BJZAMxNzA1MDA2OTA1BHNlYwN2dGwEc2xrA3ZtYnJzBHN0aW1lAzE0OTM3MTg3MzI-" style="text-decoration: none;">New Members</a></span>
      <span class="ct" style="color: #ff7900;">2</span>
    </li>
                                              </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=X3oDMTJkajBqZ2xuBF9TAzk3NDc2NTkwBGdycElkAzI0MjMzMjgEZ3Jwc3BJZAMxNzA1MDA2OTA1BHNlYwNmdHIEc2xrA2dmcARzdGltZQMxNDkzNzE4NzMy" 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;"> &bull; <a href="https://info.yahoo.com/privacy/us/yahoo/groups/details.html" style="text-decoration: none;">Privacy</a> &bull; <a href="mailto:[email protected]?subject=Unsubscribe" style="text-decoration: none;">Unsubscribe</a> &bull; <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>

--9nlWnTS9ocNmxdhsK3FKVLWiM6a5jwOaA8HvrLV--