Note that there are some explanatory texts on larger screens.

plurals
  1. POTestNG xml and Testlink Java API
    text
    copied!<p>im having the following problem, Im running all my test on jenkins and im getting like 10 failures out of 22 tests i have currently. These tests are linked to Testlink to report it's result.</p> <p>When i run these tests individually they run perfectly either they fail or the pass but when i run 2 difrent classes. Here is were the problems start, some test cases fail because they fail to find the buildplan meaning that the cant find the testcase to were report the result. And im 100% sure that the parameters im passing them is correct, becuase i ran them individually.</p> <p>Here is an example of the testng.xml and it's format.</p> <p></p> <pre><code>&lt;parameter name="nombrePlan" value="test1" /&gt; &lt;parameter name="nombreBuild" value="test1build" /&gt; &lt;parameter name="nomTL_1" value="1"/&gt; &lt;parameter name="nomTL_2" value="2"/&gt; &lt;parameter name="nomTL_3" value="3"/&gt; &lt;test name="Test1"&gt; &lt;classes&gt; &lt;class name="com.example.testClass1"&gt; &lt;methods&gt; &lt;include name ="test1" /&gt; &lt;include name ="test2" /&gt; &lt;include name ="test3" /&gt; &lt;/methods&gt; &lt;/class&gt; &lt;/classes&gt; &lt;/test&gt; &lt;parameter name="nombrePlan" value="test2" /&gt; &lt;parameter name="nombreBuild" value="test2build" /&gt; &lt;parameter name="nomTL_4" value="4" /&gt; &lt;parameter name="nomTL_5" value="5" /&gt; &lt;parameter name="nomTL_6" value="6" /&gt; &lt;parameter name="nomTL_7" value="7"/&gt; &lt;parameter name="nomTL_8" value="8"/&gt; &lt;test name="test2"&gt; &lt;classes&gt; &lt;class name="com.example.testClass2"&gt; &lt;methods&gt; &lt;include name="test4" /&gt; &lt;include name="test5" /&gt; &lt;include name="test6" /&gt; &lt;include name="test7"/&gt; &lt;include name="test8"/&gt; &lt;/methods&gt; &lt;/class&gt; &lt;/classes&gt; &lt;/test&gt; </code></pre> <p> </p> <p>This is and example of a test:</p> <pre><code>@Parameters({"nombrePlan", "nombreBuild", "nomTL_1"}) @Test public void checkMenuElements (String nombrePlan, String nombreBuild, String nomTL_1) throws Exception { String resultado = null; String nota = null; try { Class abc = new Class(driver); abc.navigateToAbc(); Test test1 = new Test(driver); test1.checkMenuElements(); resultado = TestLinkAPIResults.TEST_PASSED; }catch(AssertionError a){ resultado = TestLinkAPIResults.TEST_FAILED; nota = a.getMessage(); }catch (Exception e) { resultado = TestLinkAPIResults.TEST_FAILED; nota = e.getMessage(); } finally { ResultadoExecucao.reportTestCaseResult(PROJETO, nombrePlan, nomTL_1, nombreBuild, nota, resultado); } } </code></pre> <p>Any help would be appreciated. </p>
 

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