JUnit

Comprehensive Selenium integration in Hudson with Selunit 

This example tells you how to integrate Hudson with Selunit. Selunit can be used to execute Selenium tests directly from Selenium IDE in Hudson builds and using Hudson reporting capabilities provided for JUnit, where Selunit transforms Selenium reports to. The goal is to point out a comprehensive solution beginning with a convenient way creating and maintaining tests using Sel IDE, running them concerning multiple browsers/environments and finally monitoring and analyzing reports in Hudson.

More…

By Pavandeep Puddupakkam on November 17, 2011 | Selenium IDE | A comment?
Tags: , , ,

WebDriver 5 Minute Getting Started Guide 

WebDriver is a tool for automating testing web applications, and in particular to verify that they work as expected. It aims to provide a friendly API that’s easy to explore and understand, which will help make your tests easier to read and maintain. It’s not tied to any particular test framework, so it can be used equally well with JUnit, TestNG or from a plain old “main” method. This “Getting Started” guide introduces you to WebDriver’s Java API and helps get you started becoming familiar with it.

More…

Selenium RC with Java and JUnit 

Here is an example of selenium script in Java and executed with NUnit. The results are saved in a text file.

package com.testscripts;
import java.io.*;
import com.thoughtworks.selenium.*;
public class NewTest extends SeleneseTestCase  {
// We create our Selenium test case
public void result(String results){
try {
FileWriter fstream = new FileWriter("C:\\Results.txt",true);
BufferedWriter out = new BufferedWriter(fstream);
out.write(results+"\n");
//Close the output stream
out.close();
} catch (IOException e) {
e.printStackTrace();
}
}
public void setUp() throws Exception {
setUp("http://www.google.com/", "*firefox");
// We instantiate and start the browser
}
public void testNew() throws Exception {
selenium.open("/");
selenium.type("q", "selenium rc");
selenium.click("btnG");
selenium.waitForPageToLoad("30000");
if (selenium.isElementPresent("link=Selenium Remote-Control"))
{
verifyEquals("Selenium Remote-Control", selenium.getText("link=Selenium Remote-Control"));
// These are the real test steps
result("Selenium Remote-Control is Present");
}
else
{ result("Selenium Remote-Control is not Present");}
}
}

Submitted by Pavandeep Puddupakkam

Create a Java Selenium RC test script and executing the script 

Hello All,

In this article I will explain you step-by-step process of how to run Selenium RC application in Java. Before we start writing the script you need to make you have the following installed on you computer.

More…

By Pavandeep Puddupakkam on September 12, 2009 | Selenium RC, Software Testing | 16 comments
Tags: , ,