11
Created by : Rohan Kachewar Snow Leopard [Automation Framework In Perl and Selenium]

Snow Leopard

Embed Size (px)

DESCRIPTION

Snow Leopard [Automation Framework in Perl using Selinium made by me]

Citation preview

Page 1: Snow Leopard

Created by :

Rohan Kachewar

Snow Leopard [Automation Framework In Perl and

Selenium]

Page 2: Snow Leopard

Framework Components

Test suite

Xml data container

Class

Logs

APPL

Server side logs

Report

Server SideCLI

Log parser

UI

Page 3: Snow Leopard

Overview Selenium is a GUI test automation tool for web applications which has two flavors -

Selenium IDE and Selenium Remote Control (RC). Selenium IDE comes with record and playback facility in form of HTML tables, but that seldom works consistently in automation projects. So, for scripting test cases with Selenium RC, one needs to write a generic layer that supports the test scripts. This automation framework provides this generic, application independent layer, which provides ready to use framework(code) that would help testers to develop the test cases for their Application under test (any web UI) faster with minimum scripting required.

 This test automation framework is developed for Selenium Remote Control V0.9.0. (Herein after, referred to as, ‘Selenium RC’). Currently, the test automation framework for Selenium consists of following major areas/features:

UI for Running, Scheduling tests Multiple selection of test cases to be run and hence dynamic test suite creation Application specific logs Validation module Adding and deleting test cases is easy due to a centralized data XML containing the

configurable parameters. Detailed excel report generation along with mailing module Dashboard data graphs generation

Overview

Page 4: Snow Leopard

UI of Framework

Page 5: Snow Leopard

Test Suite: Will run the test suites given through command

prompt ,along with basic setup and tear down modules.

Framework Explanation

Page 6: Snow Leopard

C lass: We are using object oriented PERL for designing the

framework. In Object Oriented PERL a class is a user written package

containing the reusable methods and variables to be used. So say for example we are executing a player related test case, Then the Class “Player.pm” will contain all the player

related functions and data structures required for running test cases like player creation with freq 29.97hz, player creation with freq 30hz and so on.

Class in turn receives a test case ID from testcase.pl , using which it withdraws the test case data from a global XML data sheet “data.xml”.

Also the class parses the server side logs to get the server side data to verify the test case execution.

Framework Explanation

Page 7: Snow Leopard

XML data container: This is a global test data container. It contains all the data required by a test case against that test Sample: <tcs > <!--Test Case 1: Release_Specific/ 5.14-6.1.0/ Open_GoP_and_Closed_GoP_Config/

Open_GoP_with_Compatible_MIPs/ 29.97Hz_and_59.94Hz/ 59.94Hz_HD_Open_GoP_with_Compatible_MIP-5321_Channel_B_and_QT_Media_Wrapper-->

<tc name="tc1" SM="http://administrator:[email protected]/" media_director="D8_00032" md_ip="10.4.166.79" plname="man1001" mode="Play or Record" freq="Record:59.94 Play:59.94 or 29.97" filesystem="/fs1/clip.dir" video_track="MPEG-2" config="Simple" format="Long GOP" opengop="y" media_port="MIP-5321_11738" control="Manual" tot_audio_channel="default" player_log_file="tc1_player.txt" tc_log_file="C:\\snow_leopard\\tc_log_file\\tc1.txt" bitrate="52" channel="B" wrapper="QuickTime (Reference)" video_definition="default">

</tc>

Framework Explanation

Page 8: Snow Leopard

Server side Logs:This represents the logs of server side utilities

like “player test.exe”The data within these is parsed by the log parser

method within the class and is used to verify the test case has been executed as required or not.

Framework Explanation

Page 9: Snow Leopard

Test Suite Logs and Mail package :These are the test suite logs which will be mailed

nightly.

Framework Explanation

Page 10: Snow Leopard

Application specific logs along with proper tagsi.e. info, warning, critical, failure…etc, and proper time stamp.

20-8-2010 16:19:05 [INFO] Logging Started...20-8-2010 16:19:05 [INFO] Deleted Earlier Test's Player Test Log

File...20-8-2010 16:19:05 [INFO] Opening SM Application...20-8-2010 16:19:33 [INFO] Loaded Config Page...20-8-2010 16:19:35 [INFO] Clicked Player Config Link...20-8-2010 16:20:13 [INFO] Loaded Player List Page...20-8-2010 16:20:23 [INFO] Creating a Player with name man1005...20-8-2010 16:20:28 [INFO] Selected Play or Record mode for

man1005 Player ...20-8-2010 16:20:32 [INFO] Selected Record:59.94 Play:59.94 or

29.97 frequency for man1005 Player …

Test Case Logs:

Page 11: Snow Leopard

Thanks For Reading