Selenium RC not passing the test results to Spira

Wednesday, June 4, 2014
Avatar
From selenium RC the test results are not passing to Spira. As per below mentioned document section 5.2 i have created folder structer and script:

package com.inflectra.spiratest.addons.testnglistener.samples;
import com.inflectra.spiratest.addons.testnglistener.*;
import org.testng.annotations.*;
import static org.testng.AssertJUnit.*; 
import com.thoughtworks.selenium.*;
@SpiraTestConfiguration(
url="https://spiraurl",
login="user",
password="password",
projectId=6,
releaseId=10,
testSetId=268,
runner=RunnerName.Selenium
@Test(groups={"seleniumtest"}) 
public class finaltest 
 private Selenium selenium; 
 
 @BeforeClass 
 public void setUp() 
 { 
 //Instantiate the selenium Java proxy 
 String url = "http://www.google.com"; 
 selenium = new DefaultSelenium("localhost", 4444, "*iexplore", url); 
 selenium.start(); 
 } 
 
 @AfterClass 
 protected void tearDown() 
 { 
 selenium.stop(); 
 } 
 
 // Sample test that searches on Google, passes correctly 
 @Test(groups={"seleniumtest"}) 
 @SpiraTestCase(testCaseId=11) 
 public void testGoogle() 
 { 
 //Opens up Google 
 selenium.open("http://www.google.com/webhp?hl=en"); 
 
 //Verifies that the title matches 
 assertEquals("Google", selenium.getTitle()); 
 selenium.type("q", "Selenium OpenQA"); 
 
 //Verifies that it can find the Selenium website 
 assertEquals("Selenium OpenQA", selenium.getValue("q")); 
 selenium.click("btnG"); 
 selenium.waitForPageToLoad("5000"); 
 assertEquals("Selenium OpenQA - Google Search", selenium.getTitle()); 
 } 
}

script is running properly but the results are not getting updated

Could anyone help on this?
5 Replies
Friday, June 6, 2014
Avatar
re: tamilselvan.kanagasa Wednesday, June 4, 2014
Hi Tamilselvan

You need to make sure that you have included the SpiraTest listener Java class as a listener in the TestNG configuration.

If you need help on doing that, send us a help desk ticket.

Regards

Adam

Friday, June 6, 2014
Avatar
re: inflectra.david Thursday, June 5, 2014
Hi Adam,

As mentioned included the SpiraTest listener Java class as a listener in the TestNG configuration. I just downloaded the SpiraTest TestNG Listener compressed archive (.zip) from download add-ons page and executed the selenium Test.java using seleniumtests.xml under samples folder. In SeleniumTest.java file i have modified the spira configuration(url, user, login, etc) as per my credentials. I have created the sample test case in spira for this. But the results are not getting updated into spira. And also i have added the class path for TestNGListener.jar file as mentioned in the document https://www.inflectra.com/Documents/SpiraTest-Team%20Automated%20Testing%20Integration%20Guide.pdf


Please let me know any other setup needs to be done in spira side as well in TestNG folder structure/configuration.

Here i attached the project explore screenshot for your reference, could you please look into this issue.



Friday, June 6, 2014
Avatar
re: tamilselvan.kanagasa Friday, June 6, 2014




Friday, June 6, 2014
Avatar
re: tamilselvan.kanagasa Friday, June 6, 2014
In Spira the Selenium RC automation engine is active only.
Monday, November 27, 2017
Avatar
re: tamilselvan.kanagasa Friday, June 6, 2014

For those having the same problem, here was the solution

Thanks for sending the XML file, it does not include the necessary listener.

As described in (http://testng.org/doc/documentation-main.html#listeners-testng-xml) please add the following to the XML file:

  <listeners>
    <listener class-name="com.inflectra.spiratest.addons.testnglistener.SpiraTestListener" />

  </listeners>

Regards

Adam

 

Spira Helps You Deliver Quality Software, Faster and With Lower Risk

And if you have any questions, please email or call us at +1 (202) 558-6885

 

Statistics
  • Started: Wednesday, June 4, 2014
  • Last Reply: Monday, November 27, 2017
  • Replies: 5
  • Views: 4769