Marlabs Test Digest Feb 2014
Upcoming SlideShare
Loading in...5
×
 

Marlabs Test Digest Feb 2014

on

  • 48 views

In this issue, the focus is on Test Automation. We have an informative article on Automation of Rich internet applications using Selenium. Rich and Interactive content has been one of the growing ...

In this issue, the focus is on Test Automation. We have an informative article on Automation of Rich internet applications using Selenium. Rich and Interactive content has been one of the growing trends in the Software world and like any other new technology trend, it comes with it’s own set of challenges apart from benefits. One of the challenges is Test Automation and the ability of tools to achieve this in the tradition-al way.
Apart from that we have included references and links to articles on Test Automation. We hope that going through them will enrich your knowledge of Test Automation and provide new insights.

Statistics

Views

Total Views
48
Views on SlideShare
47
Embed Views
1

Actions

Likes
0
Downloads
0
Comments
0

1 Embed 1

http://www.slideee.com 1

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Marlabs Test Digest Feb 2014 Marlabs Test Digest Feb 2014 Document Transcript

  • February 2014 Marlab’s I N S I D E T H I S I S S U E : FlashFlex Auto- mation Testing 2 Quality News & Views 7 Cartoon Space 7 Volume VI From the Editor … Welcome to yet another edition of Test digest !!! Thank you for the support and constructive feed- back that we have been receiving. In this issue, the focus is on Test Automation. We have an informative article on Automation of Rich internet applications using Selenium. Rich and Interactive content has been one of the growing trends in the Software world and like any other new technology trend, it comes with it’s own set of challenges apart from benefits. One of the challenges is Test Automation and the ability of tools to achieve this in the tradition- al way. Apart from that we have included references and links to articles on Test Automation. We hope that going through them will enrich your knowledge of Test Automation and provide new insights. Happy Reading !!!
  • T E S T D I G E S T © 2 0 1 4 M A R L A B S S O F T W A R E P V T L T D P A G E 2 Automating Flash/Flex components, which are used for animation, vid- eo, and interactive content in web pages poses few challenges. We cannot directly use Eclipse IDE with Selenium library for Flash/Flex automation. But Selenium sup- ports Flash/Flex automation using ‘Adobe Flash Builder’ tool. This is a licensed tool & trial version is available for 45 days. Objective of this article is to implement automation for Flash/Flex ap- plication. Here we will be automating the below YouTube player. Any online available Flash/Flex application cannot be automated using ‘Adobe Flash Builder’ with ‘Selenium’. The reason being, we will not be able to identi- fy the objects of Flash/Flex application available online. Hence access to ‘Source code of Flash/Flex application‘ or ‘Application Action Script API Reference document‘ is required for automation. Here, for the ‘YouTube’ application, Google Developers has published the ‘YouTube Action Script 3.0 Player API Reference’. Below is the URL for Action Script API Refer- ence document : https://developers.google.com/youtube/flash_api_reference Vijaya Kumar Rangaiah
  • Flash Builder Premium can be downloaded from the below URL https://creative.adobe.com/products/flash-builder Download the ‘Flash Builder Premium’ in required language support & platform for ‘Windows’ or ‘Mac’ OS version. Install the downloaded version, in- stalled version looks similar to open source ‘Eclipse IDE’ tool. Adobe Flash Builder (previously known as Adobe Flex Builder) is an integrated development environment (IDE) built on the Eclipse platform that speeds development of rich Internet applications (RIAs) and cross-platform desk- top applications, particularly for the Adobe Flash platform. Adobe Flash Builder 4 is available in three editions: Standard, Premium and Educational. Flash-Selenium components for automation can be downloaded from below URL http://code.google.com/p/flash-selenium/downloads/list Download the required Flash component, based on which Scripting language you will be using for automation (Java, C #, PHP, Ruby etc.). We will be using Java for automation script, which can be downloaded from below URL : http://flash-selenium.googlecode.com/files/ flash-selenium.jar P A G E 3T E S T D I G E S T © 2 0 1 4 M A R L A B S S O F T W A R E P V T L T D IDEviewofAdobeFlashBuilder continuation of ‘FlashFlex Automation ..’
  • P A G E 4T E S T D I G E S T © 2 0 1 4 M A R L A B S S O F T W A R E P V T L T D Create a New Java Project in ‘Flash Builder’ & configure the Java build path with ‘selenium-server-standalone-2.24.1.jar’ & ‘flash- selenium.jar’ Copy & paste the below java code to New Java Project Created, which is written using JUnit using Selenium RC & Selenium WebDriver for testing the YouTube Flash Application. /* Automation of Youtube - Player Application using Selenium WebDriver */ package flash.test; import org.junit.*; import com.thoughtworks.selenium.DefaultSelenium; import com.thoughtworks.selenium.FlashSelenium; import com.thoughtworks.selenium.Selenium; public class Flash_youtube { private final static String URL = "http://www.youtube.com/ watch?v=efRNKkmWdc0"; private Selenium selenium; private FlashSelenium flashApp; @Before public void setUp() throws Exception { private WebDriver wd; Thread.sleep(10000L); flashApp = new FlashSelenium(selenium, "movie_player"); wd = new FirefoxDriver(); flashApp = new FlashSelenium(wd, "movie_player"); wd.get(URL); } @After public void tearDown() throws Exception { wd.quit(); } @Test continuation of ‘FlashFlex Automation ..’ Innovation distinguishes between a leader and a follower -- Steve Jobs
  • P A G E 5T E S T D I G E S T © 2 0 1 4 M A R L A B S S O F T W A R E P V T L T D public void verifyFlexAppSumIsCorrect() throws Exception { // wait till video load – buffering (3) while (Integer.parseInt(flashApp.call("getPlayerState")) == 3){ Thread.sleep(1000); } // Play the video for 10 seconds Thread.sleep(5000); flashApp.call("pauseVideo"); //Pause the Video System.out.println("After pauseVideo"); Thread.sleep(5000); flashApp.call("playVideo"); //Play the Video Thread.sleep(5000); System.out.println("After playVideo"); flashApp.call("seekTo","140","true"); //Seek to 140 sec Thread.sleep(5000); System.out.println("After seekTo"); flashApp.call("mute"); //Mute the Video Thread.sleep(5000); flashApp.call("setVolume","80"); //Set the Volume to 80% Thread.sleep(50000); } } In the HTML source code, ‘Flash/Flex component’ will be added to the web page. Providing the Selenium & Flash/Flex instance to FlashSelenium object : flashApp = new FlashSelenium(selenium, “movie_player”); ‘movie_Player’ is the tag id of Flash/Flex component of Embed or Object tag. Note: Embed or Object tag is used in the HTML code to add the Flash/Flex component in the web page. Embed or Object tag id & Selenium object instance must be passed to ‘FlashSelenium’ API. Below is the <embed> tag, which is renders the movie (ads) : We will not able to get any id, Xpath, CSS values for any of the events like ‘Play’, ‘Pause’, ‘Mute’, ‘seekTo bar’, etc. Hence the Parameters ‘pauseVideo’, ‘playVideo’, ‘seekTo’, ‘mute’, ‘setVolume’ are called in method flashApp.call(Parameters). Provided in YouTube API reference document. Run ‘Flash_youtube.java’ as Junit Test. YouTube Play, Pause, SeekTo, Mute, SetVolume functions are executed. Advantage of using ‘Adobe Flash Builder’ tool:  It support Java projects  Flexibility to port the Java frameworks for Flash/Flex automation. continuation of ‘FlashFlex Automation ..’
  • P A G E 6 Testing Silverlight 4 Applications With TestComplete How you can perform functional testing of Silverlight applications with TestComplete http://support.smartbear.com/screencasts/testcomplete/testing-silverlight-4-apps/ Automation using FlexMonkey This video walks through the basics of using the open source FlexMonkey automated testing tool for Flex apps http://www.youtube.com/watch?v=2TOSYw1531E Webinars >> Flash/Flex Test Automation with the Ranorex Automation Framework How to perform Flex Automation using Ranorex Automation Framework and its tools http://www.ranorex.com/Documentation/Ranorex-Tutorial.pdf Functional UI testing of Adobe Flex RIA : A brief Some highlights of Funtional testing of Flex RIA using QTP, Selenium, Ranorex, FlexMonkey http://faratasystems.com/wordpress/wp-content/themes/faratacms/presentations/Functional-UI-testing-of-Adobe-Flex-RIA.pdf Selenium Tutorial for Beginners Selenium Tutorial for Beginners http://www.pushtotest.com/selenium-tutorial-for-beginners-blog.html Comparative Analysis of Various Automated Test Tools for Flex Application This a comparison study of automated testing frameworks for Rich Internet Applications (RIA) made using Flex framework http://www.rimtengg.com/iscet/proceedings/pdfs/misc/102.pdf Flash Automation Testing with FlexMonkey This article talks about the automation testing using FlexMonkey http://www.gorillalogic.com/node/350 eBooks , Whitepapers & Columns >> T E S T D I G E S T © 2 0 1 4 M A R L A B S S O F T W A R E P V T L T D Flash and Flex UI Testing with TestComplete How you can perform functional testing of Adobe Flash and Flex applications with TestComplete http://support.smartbear.com/screencasts/testcomplete/testing-flash-overview/ Making Selenium a scriptless test execution engine Selenium & Scriptless test execution http://www.techgig.com/expert-speak/Making-Selenium-a-scriptless-test-execution-engine-469 RajeshSundararajan. MuraliDubutavalu. VaraprasadaraoYarra.