Mantis Bugtracker          
testlink.org

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0008638TestLinkAPI - RESTpublic2019-04-18 09:362019-04-18 14:03
Reporterprabhatranjan2206 
Assigned Tofman 
PriorityurgentSeverityfeature requestReproducibilitysometimes
StatusclosedResolutionunable to reproduce 
PlatformOSOS Version
Product Version1.9.19 (2019 Q1) 
Fixed in Version 
Summary0008638: How to indicate that the test case and each test steps have passed or not?
DescriptionUnable to locate the the test step result for every test step and only it will reflect on whole some the test suite is passed or fail. I cannot update individually each test step as passed or failed

Code:

To validate gmail verification.

 package com.prabhat.demotestng;

import org.testng.annotations.Test;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;
import testlink.api.java.client.TestLinkAPIClient;
import testlink.api.java.client.TestLinkAPIException;
import testlink.api.java.client.TestLinkAPIResults;
public class TestLink
{
    public static String DEVKEY="1f2acd018abc020729b20b457360bdba";
    public static String URL="http://localhost/testlink/lib/api/xmlrpc/v1/xmlrpc.php"; [^]

    public static void reportResult(String TestProject,String TestPlan,String Testcase,String Build,String Notes,String Result) throws TestLinkAPIException
    {
        TestLinkAPIClient api=new TestLinkAPIClient(DEVKEY, URL);
        api.reportTestCaseResult(TestProject, TestPlan, Testcase, Build, Notes, Result);
    }

    @Test
    public void Test1()throws Exception
    {
        TestLink a=new TestLink();
        System.setProperty("webdriver.chrome.driver", "C:\\Users\\windev\\Desktop\\selenium\\chromedriver.exe");
        WebDriver driver=new ChromeDriver();
        WebDriverWait wait=new WebDriverWait(driver, 600);
        String testProject="WebAutomation";
        String password= "example@248";
        String testPlan="WebAutomation Test Plan";
        String testCase="Gmail Login Test Cases";
        String build="Gmail Login";
        String notes=null;
        String result=null;
        String executionnotes=null;
        String executionresult=null;
        try
        {
            driver.manage().window().maximize();
            driver.get("https://accounts.google.com/ServiceLogin?service=mail&passive=true&rm=false&continue=https://mail.google.com/mail/&ss=1&scc=1&ltmpl=default&ltmplcache=2&emr=1" [^]);
            driver.findElement(By.xpath(".//*[@id='identifierId']")).sendKeys("example@gmail.com");
            Thread.sleep(2000);
            driver.findElement(By.id("identifierNext")).click();
            Thread.sleep(2000);
            driver.findElement(By.xpath(".//*[@id='password']/div[1]/div/div[1]/input")).sendKeys(password);
            Thread.sleep(2000);
            driver.findElement(By.id("passwordNext")).click();
            Thread.sleep(2000);
            driver.switchTo().defaultContent();
            //wait.until(ExpectedConditions.visibilityOfElementLocated(By.linkText("+Testlink")));
            result= TestLinkAPIResults.TEST_PASSED;
            notes="Executed successfully";
        }

        catch(Exception e)
        {
            result=TestLinkAPIResults.TEST_FAILED;
            notes="Execution failed";
        }
    
        finally
        {
            a.reportResult(testProject, testPlan, testCase, build, notes, result);
            driver.quit();
        }
    }
}
TagsNo tags attached.
Database (MySQL,Postgres,etc)MySQL
BrowserChrome
PHP Version
TestCaseID
QA Team - Task Workflow StatusTBD
Attached Files

- Relationships

-  Notes
(0028736)
fman (administrator)
2019-04-18 14:03

how to questions => forum

- Issue History
Date Modified Username Field Change
2019-04-18 09:36 prabhatranjan2206 New Issue
2019-04-18 14:03 fman Note Added: 0028736
2019-04-18 14:03 fman QA Team - Task Workflow Status => TBD
2019-04-18 14:03 fman Status new => closed
2019-04-18 14:03 fman Assigned To => fman
2019-04-18 14:03 fman Resolution open => unable to reproduce



Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker