Download Automate Testlink Test Case Result Using Selenium - Software Testing Tutorials graphic type that can be scaled to use with the Silhouette Cameo or Cricut. An SVG's size can be increased or decreased without a loss of quality. All of our downloads include an image, Silhouette file, and SVG file. It should be everything you need for your next project. Our SVG files can be used on adhesive vinyl, heat transfer and t-shirt vinyl, or any other cutting surface
- Junit – 4.11.
- Selenium – standalone server jar.
- Selenium – Java jar & all libs jar.
- Test Link Client API jars. Download.
package TestCaseExecution;
import org.testng.annotations.AfterSuite;
import org.testng.annotations.BeforeSuite;
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 WebDriver driver;
//Enter your project API key here.
public static String DEVKEY="040d169f3f1a2b38ced46c37d073a1c4";
//Enter your Test Link URL here
public static String URL= "www.testlink.com";
//Enter your Test Project Name here
String testProject="Test Project1";
//Enter your Test Plan here
String testPlan="Test Plan";
//Enter your Test build here
String build="Test Build";
@BeforeSuite
public void setUp() throws Exception
{
//Enter the path for your browser exe file here
System.setProperty("webdriver.chrome.driver","D:\\chromedriver.exe");
driver = new ChromeDriver();
}
@Test
public void Test()throws Exception
{
String result = "";
String exception = "";
try
{
driver.manage().window().maximize();
//Enter your applicaton URL.
driver.get("http://gmail.com");
//Enter your user name.
driver.findElement(By.xpath("//input[@id='txtUser']")).sendKeys("Your UserName");
//Enter your pswd.
driver.findElement(By.xpath("//input[@id='txtPass']")).sendKeys("Your pswd");
//Find Xpath of your click button and enter here
driver.findElement(By.xpath("//input[@id='btnLogin']")).click();
driver.switchTo().defaultContent();
result= TestLinkAPIResults.TEST_PASSED;
//Enter your test case ID here
updateTestLinkResult("Test case ID", null, result);
}
catch(Exception e)
{
result = TestLinkAPIResults.TEST_FAILED;
exception = e.getMessage();
updateTestLinkResult("Test case ID", exception, result);
}
}
public void updateTestLinkResult(String testCase, String exception, String result) throws TestLinkAPIException
{
TestLinkAPIClient testlinkAPIClient = new TestLinkAPIClient(DEVKEY,URL);
testlinkAPIClient.reportTestCaseResult(testProject, testPlan, testCase, build, exception, result);
}
@AfterSuite
public void close()
{
driver.quit();
}
}
Download Automate Testlink Test Case Result Using Selenium - Software Testing Tutorials All SVG file downloads also come bundled with DXF, PNG, and EPS file formats. All designs come with a small business commercial license. These SVG cut files are great for use with Silhouette Cameo or Cricut and other Machine Tools.