Open Source Automation tools overview Lior Kinsbruner February 2011 RSA
May 26, 2015
Open Source Automation tools overview
Lior KinsbrunerFebruary 2011
RSA
Table of Contents
• RSA company overview
• Automation Challenges
• RSA In-Use tools
• Introduction to JSYSTEM
• Introduction to Selenium
• Introduction to BadBoy
•Introduction to AutoIT
• Introduction to FIT
• Introduction to JEMMY
• How they all work together?
•Automation process in RSA
• DEMO
• Q&A
2
3
RSA in a nutshell J
RSA, The Security Division of EMC, provides Secure Data, Compliance, SIM, SEM, SIEM, PCI, Consumer Identity, Two-Factor Authentication, Custom Applications, Consulting, Assessment, and other security solutions and services to over 90% of the Fortune 500
qLine of products in IL:q3DSqAAOPqAAHqIDVqFraud ActionqCRE
4
• Time consuming
• Low reliability
• Human resources
• Inconsistent
üSpeed
üRepeatability
üProgramming capabilities
üCoverage
üReliability
üReusability
Why use automation tools?
Challenges
Multiple environments and platforms• OS
• DBs
• Application Servers
Frequent changes in SUT – quick response required!
Working with various technologies• Web Services – SOAP
• Java API
• Web applications
• CLI
5
Guidelines for choosing our automation framework
6
•Data driven capabilities a•Support for Client-Server and Web based applications a•Platform/OS independent a•Reporting capabilities a•Email notification support a•Ease of use a•Documentation a•Forums exposure a•Ease of debugging and logging a•Version control integration a•Cost a
•Disadvantages:
•Requires development skills for framework implementation and structural changes X
•Bug tracking integration support X requires in-house coding
•Product support – Open source tool…you implement your feature requests OR pay for outsourcing to do that for you… X
þ JSystem is a framework for writing and running automated tests. The Jsystem Automation Framework is written in Java and based on open source java projects and custom code.
þ http://www.jsystemtest.org/
Introduction to JSYSTEM
7
8
Automation life cycle
8
Introduction to SELENIUM
9
Web 1.0 Web 2.0
Static content Dynamic content
HTML AJAX, FLEX, FLASH
Company oriented Community oriented
Web forms Web applications
Explorer Firefox, Opera, Chrome
ØWeb testing frameworkØRuns in a browserØHTML & JavascriptØOpen sourceØ:כתובת האתר הרשמיhttp://seleniumhq.orgØEasy record and playback ØIntelligent field selection will use IDs, names, or XPATH as neededØAuto-complete for all common Selenium commands ØDebug and set breakpoints ØSave tests as HTML, Java, Ruby scripts, or any other format
Selenium Features
10
ü Supports a variety of browsers
ü Runs on multiple platforms
ü Supports Flex and Flash
ü Record & Export variety of languages
Selenium Add-ons and Tips
11
Firefox Add-on/s:
• Selenium IDE - http://seleniumhq.org
• XPATH checker - http://slesinsky.org/brian/code/xpath_checker.html
• Firebug & IE Developer toolbar - http://getfirebug.com
• Javascript debugger -https://addons.mozilla.org/en-US/firefox/addon/216
Working with XPATH tips:•Don’t use things that might change:
•Div•Table cells•Language specific elements
•Use IDs•Notice search speed when using long XPATH expressions
Introduction to BadBoy
Freeware tool which helps Web Application automation testing with Record & Replay capabilities.
Some of the tools capabilities:• Reports – Clear display of where failures are as well as values of variables when they occurred
• Log Views – A viewer for log files.
• AJAX Form Population - Form Populators which send DOM events for better AJAX playback
• Error Handlers and Retries - You can configure how Badboy responds to items that fail, including retrying them.
• External JavaScript Files - You can include JScript items that load scripts from external files
• Waitable Assertions - You can configure Assertions to wait a period of time for conditions to become true.
• Manual Review Support – You can add manual review checkpoints to your scripts for pages that should be inspected manually after a script has run
• Documentation Export – You can save a complete outline of your script including documentation in HTML format
12
•Official Web Site: http://www.badboy.com.au/
Introduction to AutoIT
13
AutoIt v3 is a freeware BASIC-like scripting language designed for automating the Windows GUI and general scripting. It uses a combination of simulated keystrokes, mouse movement and window/control manipulation in order to automate tasks
•Easy to learn BASIC-like syntax•Simulate keystrokes and mouse movements•Manipulate windows and processes•Interact with all standard windows controls•Scripts can be compiled into standalone executables•Create Graphical User Interfaces (GUIs)•Regular expressions•Directly call external DLL and Windows API functions•Detailed help file and large community-based support forums•Compatible with Windows 2000 / XP / 2003 / Vista / 2008 / Windows 7 / 2008 R2•Unicode and x64 support
http://www.autoitscript.com/site/autoit/
Introduction to FIT and Fitnesse
14
The fully integrated standalone wiki, and acceptance testing framework
üFitNesse is a wiki, which is a style of web server that allows any visitor to make any edits, including changing existing pages and creating new pages. üIt serves us in :
üDefining Acceptance TestsüRun those tests and see the results
üFIT – is the engine that actually processes each FitNesse test table.üFit provides easy way to write ‘executable’ acceptance tests using simple HTML tables.
•FIT - See it in action soon….•FitNesse (run it using java -jar fitnesse.jar –p 8080)http://localhost:8080/FitTest?test
Introduction to JEMMY
15
JEMMY ààà See it in action J
üFree, open source testing toolkit for Swing/JFC applications, supported by the developers of the NetBeans IDE
JEMMY Main objectives:§Java library used to create UI automated tests§Provides support covering all Swing components§Can be easily extended for custom component support§Two modes of action reproducing (Robot and event dispatching)
§Pre/post verification methods§When test fails? – Jemmy exceptions and timeouts
JEMMY Operators:§Find a window – JFrameOperator, JDialogOperator §Find a component inside container
§by text§By index§by component name§using Component-Chooser
§Interact with component§simulate user actions §call component API
How they all work together?
16
• Test plan and test labs - QC• Execution and Reporting - Jsystem• Defect tracking - JIRA• Continuous Integration
•Hudson - http://hudson-ci.org/•Provides an easy-to-use so-called continuous integration system, making it easier for developers to integrate changes to the project•Monitoring executions of externally-run jobs•Reports build results and sends alerts on failures of build using Email/RSS
•MAVEN - http://maven.apache.org/•Manages a project's build, reporting and documentation•Handle resources repositories and projects dependencies.•Assists with testing•Runs web applications•Produce reports on projects•Any number of other tasks provided by plug-ins.
Automation process in RSA from A-Z
17
18