Selenium integration with Testlink

Asked

Viewed 106 times

1

I’m having a problem integrating Selenium with Testlink, because when using Try/catch with Assertionerror in my test method, when the test fails the testlink result is shown correctly (in red color)but in junit it is presented as success(bar in the color green).

If I use Try/catch with Exception in my test method, the correct test status is shown in junit (red bar for failure), but in testlink only the success status (green color) is shown, even if the test fails.

How could I solve this problem?

@Test
public void VerificaTituloGoogle() throws Exception {
    try {
        dr = new FirefoxDriver();
        dr.get("http://www.google.com");
        dr.manage().window().maximize();

        Assert.assertEquals("Googless", dr.getTitle())
    TestLinkIntegration.updateResults("VerificaTituloGoogle", null, TestLinkAPIResults.TEST_PASSED);
    //resultado = TestLinkAPIResults.TEST_PASSED;
}catch(AssertionError ea) {
    TestLinkIntegration.updateResults("VerificaTituloGoogle",ea.getMessage(), TestLinkAPIResults.TEST_FAILED);
      } 
}
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.