+ All Categories
Home > Technology > Selenium Test Automation - Keytorc Approach

Selenium Test Automation - Keytorc Approach

Date post: 06-May-2015
Category:
Upload: keytorc-software-testing-services
View: 1,466 times
Download: 4 times
Share this document with a friend
Description:
Selenium Test Automation One of the most important success factors in test automation is selection of the right tool. Among a broad range of commercial and free tools Selenium has become one of the mainstream tools in the market. Although it is an open source tool it is very flexible, robust and has a rich feature set especially for regression testing. It also has advanced integration capabilities with other commercial and open source tools and frameworks. As the leading Software Testing company in its region Keytorc has a dedicated team specialized on test automation team with Selenium. For more information about Selenium and test automation please contact with our team: www.keytorc.com http://blogs.keytorc.com/ Selenium ile Test Otomasyonu Test otomasyonunda en önemli başarı faktörlerinden biri doğru test aracını seçmektir. Çok sayıda ticari ve ücretsiz open source aracın olduğu test otomasyon pazarında son birkaç senede Selenium en çok kullanılan araçlardan bir tanesi haline gelmiştir. Ücretsiz olmasına rağmen Selenium esnek, güvenilir ve özellikle regresyon testleri için zengin özelliklere sahip bir otomasyon aracıdır. Selenium’un bir çok farklı test otomasyon aracı ve yazılım geliştirme platformu ile entegrasyon özelliği bulunmaktadır. Yazılım test sektörünün lider firması olan Keytorc’un Selenium konusunda uzmanlaşmış bir ekibi bulunmaktadır. Selenium ile test otomasyonu konusunda daha fazla bilgi almak için test otomasyon uzmanlarımızla iletişime geçebilirsiniz. www.keytorc.com http://blogs.keytorc.com/
19
Test Automation with Selenium
Transcript
Page 1: Selenium Test Automation - Keytorc Approach

Test Automation with

Selenium

Page 2: Selenium Test Automation - Keytorc Approach

Selenium

Selenium automates browsers. That's it. What you do with that power is entirely up to you. Primarily it is for automating web applications for testing purposes, but is certainly not limited to just that. Boring web-based administration tasks can (and should!) also be automated as well. Selenium has the support of some of the largest browser vendors who have taken (or are taking) steps to make Selenium a native part of their browser. It is also the core technology in countless other browser automation tools, APIs and frameworks.

Source: http://www.seleniumhq.org/

Page 3: Selenium Test Automation - Keytorc Approach

Selenium 1.0

Page 4: Selenium Test Automation - Keytorc Approach

Selenium IDE

Start and Stop Recording

Script Editor

Selenium Log

Selenium IDE is a Firefox plugin which records and plays back user interactions with the browser. Use this to either create simple scripts or assist in exploratory testing. It can also export Remote Control or WebDriver scripts, though they tend to be somewhat brittle and should be overhauled into some sort of Page Object-y structure for any kind of resiliency.

Page 5: Selenium Test Automation - Keytorc Approach

Selenium 1.0 – Remote Control

Selenium RC was the main Selenium project for a long time, before the WebDriver/Selenium merge brought up Selenium 2, the newest and more powerful tool. Selenium 1 is still actively supported (mostly in maintenance mode) and provides some features that may not be available in Selenium 2 for a while, including support for several languages (Java, Javascript, Ruby, PHP, Python, Perl and C#) and support for almost every browser out there.

Page 6: Selenium Test Automation - Keytorc Approach

Selenium 1.0 – Grid

Selenium-Grid allows the Selenium RC solution to scale for large test suites and for test suites that must be run in multiple environments. Selenium Grid allows you to run your tests in parallel, that is, different tests can be run at the same time on different remote machines. This additional server piece allows the several Remote Control servers to accessed in parallel by one or more driving processes. You may want to do this if you want to use scale to speed everything up, or because you need to test on Mac and/or Linux, as well as Windows from one driving test-suite.

Page 7: Selenium Test Automation - Keytorc Approach

Selenium 2.0 – WebDriver

The primary new feature in Selenium 2.0 is the integration of the WebDriver API. WebDriver is designed to provide a simpler, more concise programming interface in addition to addressing some limitations in the Selenium-RC API. Selenium WebDriver was developed to better support dynamic web pages where elements of a page may change without the page itself being reloaded. WebDriver’s goal is to supply a well-designed object-oriented API that provides improved support for modern advanced web-app testing problems.

Page 8: Selenium Test Automation - Keytorc Approach

Selenium 1.0 vs. 2.0

Selenium WebDriver makes direct calls to the browser using each browser’s native support for automation.

For those familiar with Selenium-RC, this is quite different from what you are used to. Selenium-RC worked the same way for each supported browser. It ‘injected’ javascript functions into the browser when the browser was loaded and then used its javascript to drive the AUT within the browser. WebDriver does not use this technique. Again, it drives the browser directly using the browser’s built in support for automation.

Page 9: Selenium Test Automation - Keytorc Approach

Selenium WebDriver – Development Environment

IntelliJ, development environment JUnit, unit testing framework Maven, build tool

Page 10: Selenium Test Automation - Keytorc Approach

IntelliJ

IntelliJ IDEA is a Java IDE by JetBrains, available as an Apache 2 Licensed community edition and commercial edition. It is often simply referred to as "IDEA" or "IntelliJ"

Page 11: Selenium Test Automation - Keytorc Approach

IntelliJ

Page 12: Selenium Test Automation - Keytorc Approach

JUnit

JUnit is linked as a JAR at compile-time; the framework resides under package junit.framework for JUnit 3.8 and earlier, and under package org.junit for JUnit 4 and later.

A JUnit test fixture is a Java object. With older versions of JUnit, fixtures had to inherit from junit.framework.TestCase, but the new tests using JUnit 4 should not do this. Test methods must be annotated by the @Test annotation.

JUnit is a unit testing framework for the Java programming language. JUnit has been important in the development of test-driven development, and is one of a family of unit testing frameworks which is collectively known as xUnit that originated with SUnit.

Page 13: Selenium Test Automation - Keytorc Approach

JUnit

Page 14: Selenium Test Automation - Keytorc Approach

JUnit

If you do not use IDE, add a method ‘suite()’, it automatically creates a test suite including all test methods.

Then add a main method and use textui runner run all test cases.

Page 15: Selenium Test Automation - Keytorc Approach

Maven

Maven uses an XML file to describe the software project being built, its dependencies on other external modules and components, the build order, directories, and required plug-ins.

It comes with pre-defined targets for performing certain well-defined tasks such as compilation of code and its packaging.

Maven dynamically downloads Java libraries and Maven plug-ins from one or more repositories such as the Maven 2 Central Repository, and stores them in a local cache.

This local cache of downloaded artifacts can also be updated with artifacts created by local projects. Public repositories can also be updated.

.

Maven is a build automation tool used primarily for Java projects. Maven serves a similar purpose to the Apache Ant tool, but it is based on different concepts and works in a different manner.

Page 16: Selenium Test Automation - Keytorc Approach

Maven

Maven projects are configured using a Project Object Model, which is stored in a pom.xml-file.

This POM only defines a unique identifier for the project (coordinates) and its dependency on the JUnit framework. However, that is already enough for building the project and running the unit tests associated with the project. Maven accomplishes this by embracing the idea of Convention over Configuration, that is, Maven provides default values for the project's configuration.

Page 17: Selenium Test Automation - Keytorc Approach

Maven

The directory structure of a normal idiomatic Maven

project has the following directory entries:

Page 18: Selenium Test Automation - Keytorc Approach

Selenium Webdriver – Getting Started

How to create a simple Selenium Webdriver test using

Java, IntelliJ, Junit and Maven

Page 19: Selenium Test Automation - Keytorc Approach

Bize Ulaşın

www.twitter.com/Keytorc

blogs.keytorc.com

tr.linkedin.com/in/keytorc

Contact

[email protected]

Keytorc Software Testing Services


Recommended