Note that there are some explanatory texts on larger screens.

plurals
  1. POTestNG - Exception only when 6 or more tests are defined
    primarykey
    data
    text
    <p>The code below fails, but only if 6 or more Tests are defined. That is, no matter what tests I have. I have tried making 5 duplicate tests, which all passed,and then add another one to see the assertion below fail. <strong>Does anyone have an idea what's going on?</strong></p> <p>I run Spring MVC, TestNG Version 5.8, with a Neo4J database using Spring Data Graph. </p> <pre><code>@ContextConfiguration(locations = {"classpath:application-context-test.xml"}) public class EntityTest extends AbstractTestNGSpringContextTests { @Autowired private GraphDatabaseContext graphDatabaseContext; @BeforeClass protected void setUp() throws Exception { Assert.assertNotNull(graphDatabaseContext); } @Test(groups = {"functest"}) public void testEmployeeCreation() throws Exception { //please note that these methods are _literally_ empty. } @Test(groups = {"functest"}) public void test2EmployeeCreation() throws Exception { } @Test(groups = {"functest"}) public void test3EmployeeCreation() throws Exception { } @Test(groups = {"functest"}) public void test4EmployeeCreation() throws Exception { } @Test(groups = {"functest"}) public void test5EmployeeCreation() throws Exception { } @Test(groups = {"functest"}) public void test6EmployeeCreation() throws Exception { } } </code></pre> <p>testNG.xml:</p> <pre><code>&lt;!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd"&gt; &lt;suite name="Maven Tests" verbose="1" annotations="JDK"&gt; &lt;parameter name="echo.timeout" value="60000"/&gt; &lt;test name="Functional and Check-in Tests"&gt; &lt;groups&gt; &lt;run&gt; &lt;include name="functest"/&gt; &lt;include name="checkintest"/&gt; &lt;/run&gt; &lt;/groups&gt; &lt;classes&gt; &lt;class name="com.noname.entity.EntityTest"/&gt; &lt;/classes&gt; &lt;/test&gt; &lt;/suite&gt; </code></pre> <p>Testlog:</p> <pre><code> java.lang.AssertionError: Expected :true Actual :false at org.testng.Assert.fail(Assert.java:84) at org.testng.Assert.failNotEquals(Assert.java:438) at org.testng.Assert.assertTrue(Assert.java:32) at org.testng.Assert.assertNotNull(Assert.java:352) at org.testng.Assert.assertNotNull(Assert.java:342) at com.noname.entity.EntityTest.setUp(EntityTest.java:25) </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload