Inflectra Customer Forums: Tests run from TestNG are not recorded in SpiraTest (Thread) 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"); } } en-US(C) Copyright 2006-2024 Inflectra Corporation.support@inflectra.com/Computers/Software/Project_Management//Computers/Software/Quality_Assurance/KronoDesksupport@inflectra.comhttp://www.inflectra.com/kronodesk/forums/threads120/Support/Forum/spiratest/issues-questions/1123.aspxthreadId=1123kashi V anaganti (kashi.anaanti@gmail.com)Tests run from TestNG are not recorded in SpiraTest 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"); } } Wed, 07 Jan 2015 08:12:09 -05002015-10-22T17:12:03-04:00/Support/Forum/spiratest/issues-questions/1123.aspxmessageId=1996Jim R (donotreply5@kronodesk.net) Hi Kashi The code looks correct, most likely you need to add the TestNG listener via. either the 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 Fri, 09 Jan 2015 15:55:50 -05002015-01-09T15:55:50-05:00/Support/Forum/spiratest/issues-questions/1123.aspx#reply1996messageId=1998kashi V anaganti (kashi.anaanti@gmail.com) Thank you Jim for your reply. I have not added the listener to the TestNG via xml or commandl 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.Mon, 12 Jan 2015 02:00:07 -05002015-01-12T02:00:07-05:00/Support/Forum/spiratest/issues-questions/1123.aspx#reply1998messageId=2373Akmaize Antoaroo (muhammud.antoaroo@rubric-consulting.com) Hi Jim , I am also facing the same problem..I have already generated the TestNG xml but I wanted 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 Thu, 15 Oct 2015 10:23:35 -04002015-10-15T10:23:35-04:00/Support/Forum/spiratest/issues-questions/1123.aspx#reply2373messageId=2374Akmaize Antoaroo (muhammud.antoaroo@rubric-consulting.com) Hi Jim , I am also facing the same problem..I have already generated the TestNG xml but I want 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 Fri, 16 Oct 2015 05:09:40 -04002015-10-16T05:09:40-04:00/Support/Forum/spiratest/issues-questions/1123.aspx#reply2374messageId=2387Kat A (support2@inflectra.com) Hi Akmaize, In general, see Chapter 4 of the Automated Testing Integration Guide for instru 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. To answer your specific question, include the listener as follows: Please log a Help Desk ticket if you are still having trouble. Regards, Elise Thu, 22 Oct 2015 17:12:03 -04002015-10-22T17:12:03-04:00/Support/Forum/spiratest/issues-questions/1123.aspx#reply2387