Upload
rakesh-ravindran
View
324
Download
2
Tags:
Embed Size (px)
DESCRIPTION
IDE+RC+GRID components basic description with screen shots
Citation preview
SELENIUM
JavaScript framework that runs in your web browser
Supports Cross Browser Testing. The Selenium tests can be run on multiple browsers.
Allows scripting in several languages like Java, C#, PHP and Python.
Assertion statements provide an efficient way of comparing expected and actual results.
WHAT IS SELENIUM?
SELENIUM IDE
SELENIUM COMPONENT
S
SELENIUM RC
SELENIUM GRID
SELENIUM IDE
Integrated Development Environment for building Selenium test cases.
Operates as a Firefox add-on and provides an interface for developing and running individual test cases or entire test suites.
Selenium-IDE has a recording feature, which will keep account of user actions as they are performed and store them as a reusable script to play back.
It also has a context menu (right-click) integrated with the Firefox browser, which allows the user to pick from a list of assertions and verifications for the selected location.
E Execution Commands
A WALKTHROUGH ON IDE INTERFACE
URL of Application
The list of actions generated in actual test
case(selenese command format)
Log of events executed & errors generated
Record Test Test
Specifies Command
Specifies value to be input
Click on to find the target element
Specifies Target Value {css,xpath,id}
The list of actions
generated in actual test case(html format)
PLAYING THE TEST SUITE WITH TEST RUNNER
SELENIUM-RC(REMOTE CONTROL)
A solution to cross browser testing.
A client/server system, written in Java and so available on all the platforms.
Client libraries for many popular languages.(C#,Java,Php,Phython,Ruby)
Eliminates backdrops faced by Selenium IDE.
A WALKTHROUGH ON SELENIUM-RC
SELENIUM GRID
Selenium-Grid allows the Selenium-RC to scale for test suites to be run in multiple environments.
With Selenium-Grid ,multiple instances of Selenium-RC are running on various operating system and browser configurations, each of these when launched register itself with a hub. When tests are sent to the hub they are then redirected to an available Selenium-RC, which will launch the browser and run the test.
This allows for running tests in parallel, with the entire test suite theoretically taking only as long to run as the longest individual test
A WALKTHROUGH ON SELENIUM GRID
A WALKTHROUGH ON CONTINOUS INTEGRATION WITH HUDSON
RUNNING THE TEST THROUGH ECLIPSE
1>COPY THE CODE THAT WAS FORMATTED IN THE SELENIUM IDE IN THE ECLIPSE IDE SCRIPT TEMPLATE
2>START THE SELENIUM-RC FROM COMMAND PROMPT
3>ONCE THE SERVER IS UP GO TO THE ECLIPSE,RIGHT CLICK ON THE SCRIPT AND SELECT RUN AS JUNIT TEST
4>THE SCRIPT IS RUN SUCCESSFULLY
1
This is where you have copy theJava code that you formatted in the
Selenium IDE
2
3
4
SCRIPT VIEWpackage com.example.tests;
import com.thoughtworks.selenium.*;import org.junit.After;import org.junit.Before;import org.junit.Test;import java.util.regex.Pattern;
public class Untitled extends SeleneseTestCase {@Beforepublic void setUp() throws Exception {
selenium = new DefaultSelenium("localhost", 4444, "*chrome", "http://www.google.co.in/");
selenium.start();}
@Testpublic void testUntitled() throws Exception {
selenium.open("/");selenium.type("id=gbqfq", "q");selenium.click("id=gbqfb");selenium.waitForPageToLoad("30000");
} @After
public void tearDown() throws Exception {selenium.stop();
}}
THANK YOU