<rss version="2.0" xmlns:a10="http://www.w3.org/2005/Atom"><channel><title>Inflectra Customer Forums: Tests run from TestNG are not recorded in SpiraTest (Thread)</title><description>&#xD;
I have tried integrating manual test cases in SpiraTest with TestNG(WebDriver), the automation script runs fine in the TestNG but the status of the test result is not recorded back in the Spira. There is no error thrown as such either. I  dont have any clue as to how to debug and find what is blocking the status update but no error is generated.  Here is the sample snippet code. Please help me debug the issue.  import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.firefox.FirefoxDriver; import org.openqa.selenium.support.ui.ExpectedConditions; import org.openqa.selenium.support.ui.WebDriverWait; import org.testng.Assert; import org.testng.annotations.Test;  import com.inflectra.spiratest.addons.testnglistener.SpiraTestCase; import com.inflectra.spiratest.addons.testnglistener.SpiraTestConfiguration; import com.inflectra.spiratest.addons.testnglistener.TestRun;   @SpiraTestConfiguration(login = "*****", password = "****", projectId = 000331 , url = "*********", releaseId = -1,testSetId = -1)      @Test(groups={"unittest"}) public class SpiraIntegration {          WebDriver driver = new FirefoxDriver();     String url = "****";     WebDriverWait wait = new WebDriverWait(driver,120);            @Test(groups={"unittest"})   @SpiraTestCase(testCaseId =251477)   public void VerifyLogin() throws IOException {       driver.get(url);       LoginPage oLogin = new LoginPage(driver);           wait.until(ExpectedConditions.presenceOfElementLocated(By.id("screenId")));       oLogin.Login("admin","password");       wait.until(ExpectedConditions.presenceOfElementLocated(By.id("main-content")));       Assert.assertEquals(1, 1);      ScreenShot.TakeScreenShot(driver, "LoginPage");        }   }  &#xD;
&#xD;
</description><language>en-US</language><copyright>(C) Copyright 2006-2026 Inflectra Corporation.</copyright><managingEditor>support@inflectra.com</managingEditor><category domain="http://www.dmoz.org">/Computers/Software/Project_Management/</category><category domain="http://www.dmoz.org">/Computers/Software/Quality_Assurance/</category><generator>KronoDesk</generator><a10:contributor><a10:email>support@inflectra.com</a10:email></a10:contributor><a10:id>http://www.inflectra.com/kronodesk/forums/threads</a10:id><ttl>120</ttl><link>/Support/Forum/spiratest/issues-questions/1123.aspx</link><item><guid isPermaLink="false">threadId=1123</guid><author>kashi V anaganti (kashi.anaanti@gmail.com)</author><category domain="http://www.inflectra.com/kronodesk/thread/tag">testng</category><title>Tests run from TestNG are not recorded in SpiraTest</title><description>&#xD;
I have tried integrating manual test cases in SpiraTest with TestNG(WebDriver), the automation script runs fine in the TestNG but the status of the test result is not recorded back in the Spira. There is no error thrown as such either. I  dont have any clue as to how to debug and find what is blocking the status update but no error is generated.  Here is the sample snippet code. Please help me debug the issue.  import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.firefox.FirefoxDriver; import org.openqa.selenium.support.ui.ExpectedConditions; import org.openqa.selenium.support.ui.WebDriverWait; import org.testng.Assert; import org.testng.annotations.Test;  import com.inflectra.spiratest.addons.testnglistener.SpiraTestCase; import com.inflectra.spiratest.addons.testnglistener.SpiraTestConfiguration; import com.inflectra.spiratest.addons.testnglistener.TestRun;   @SpiraTestConfiguration(login = "*****", password = "****", projectId = 000331 , url = "*********", releaseId = -1,testSetId = -1)      @Test(groups={"unittest"}) public class SpiraIntegration {          WebDriver driver = new FirefoxDriver();     String url = "****";     WebDriverWait wait = new WebDriverWait(driver,120);            @Test(groups={"unittest"})   @SpiraTestCase(testCaseId =251477)   public void VerifyLogin() throws IOException {       driver.get(url);       LoginPage oLogin = new LoginPage(driver);           wait.until(ExpectedConditions.presenceOfElementLocated(By.id("screenId")));       oLogin.Login("admin","password");       wait.until(ExpectedConditions.presenceOfElementLocated(By.id("main-content")));       Assert.assertEquals(1, 1);      ScreenShot.TakeScreenShot(driver, "LoginPage");        }   }  &#xD;
&#xD;
</description><pubDate>Wed, 07 Jan 2015 08:12:09 -0500</pubDate><a10:updated>2015-10-22T17:12:03-04:00</a10:updated><link>/Support/Forum/spiratest/issues-questions/1123.aspx</link></item><item><guid isPermaLink="false">messageId=1996</guid><author>Jim R (donotreply5@kronodesk.net)</author><title>&#xD;
Hi Kashi  The code looks correct, most likely you need to add the TestNG listener via. either the </title><description>&#xD;
Hi Kashi  The code looks correct, most likely you need to add the TestNG listener via. either the TestNG XML file or the command-line. Have you done that?  If you need more specific help, I'd log a  support ticket .  Regards Jim &#xD;
&#xD;
</description><pubDate>Fri, 09 Jan 2015 15:55:50 -0500</pubDate><a10:updated>2015-01-09T15:55:50-05:00</a10:updated><link>/Support/Forum/spiratest/issues-questions/1123.aspx#reply1996</link></item><item><guid isPermaLink="false">messageId=1998</guid><author>kashi V anaganti (kashi.anaanti@gmail.com)</author><title>&#xD;
&#xD;
&#xD;
Thank  you Jim for your reply. I have not added the listener to the TestNG via xml or commandl</title><description>&#xD;
&#xD;
&#xD;
Thank  you Jim for your reply. I have not added the listener to the TestNG via xml or commandline, I just added it as an external library to my TestNG tests. Please suggest me how to add it via xml.</description><pubDate>Mon, 12 Jan 2015 02:00:07 -0500</pubDate><a10:updated>2015-01-12T02:00:07-05:00</a10:updated><link>/Support/Forum/spiratest/issues-questions/1123.aspx#reply1998</link></item><item><guid isPermaLink="false">messageId=2373</guid><author>Akmaize Antoaroo (muhammud.antoaroo@rubric-consulting.com)</author><title>&#xD;
Hi Jim ,  I am also facing the same problem..I have already generated the TestNG xml but I wanted </title><description>&#xD;
Hi Jim ,  I am also facing the same problem..I have already generated the TestNG xml but I wanted to know how to include the  TestNG listener in the xml file.        &#xD;
        &#xD;
             It will be kind f you if you could help me out.  Best Regards, Akmaize   </description><pubDate>Thu, 15 Oct 2015 10:23:35 -0400</pubDate><a10:updated>2015-10-15T10:23:35-04:00</a10:updated><link>/Support/Forum/spiratest/issues-questions/1123.aspx#reply2373</link></item><item><guid isPermaLink="false">messageId=2374</guid><author>Akmaize Antoaroo (muhammud.antoaroo@rubric-consulting.com)</author><title>&#xD;
 Hi Jim ,    I am also facing the same problem..I have already generated the TestNG xml but I want</title><description>&#xD;
 Hi Jim ,    I am also facing the same problem..I have already generated the TestNG xml but I wanted to know how to include the   TestNG listener in the xml file.                             It will be kind f you if you could help me out.  Best Regards, Akmaize   &#xD;
&#xD;
</description><pubDate>Fri, 16 Oct 2015 05:09:40 -0400</pubDate><a10:updated>2015-10-16T05:09:40-04:00</a10:updated><link>/Support/Forum/spiratest/issues-questions/1123.aspx#reply2374</link></item><item><guid isPermaLink="false">messageId=2387</guid><author>Kat A (elise.brooks@inflectra.com)</author><title> Hi Akmaize,     In general, see  Chapter 4 of the   Automated Testing Integration Guide  for instru</title><description> Hi Akmaize,     In general, see  Chapter 4 of the   Automated Testing Integration Guide  for instructions on setting up the integration. There is also a sample test fixture SimpleText.java provided with the SpiraTest listener installation.    &#xD;
 To answer your specific question, include the listener as follows:                           &#xD;
&#xD;
 Please log a  Help Desk ticket  if you are still having trouble.     Regards,  Elise </description><pubDate>Thu, 22 Oct 2015 17:12:03 -0400</pubDate><a10:updated>2015-10-22T17:12:03-04:00</a10:updated><link>/Support/Forum/spiratest/issues-questions/1123.aspx#reply2387</link></item></channel></rss>