A Test Automation Tool For Java Applets - PowerPoint PPT Presentation

1 / 22
About This Presentation
Title:

A Test Automation Tool For Java Applets

Description:

A Test Automation Tool For Java Applets By Matthew Xuereb Testing of Web Applications TATJA Program Demonstration Conclusions Testing of Web Applications 3 main areas ... – PowerPoint PPT presentation

Number of Views:201
Avg rating:3.0/5.0
Slides: 23
Provided by: Matthew801
Category:

less

Transcript and Presenter's Notes

Title: A Test Automation Tool For Java Applets


1
A Test Automation Tool For Java Applets
By Matthew Xuereb
  • Testing of Web Applications
  • TATJA
  • Program Demonstration
  • Conclusions

2
Testing of Web Applications
  • 3 main areas of testing
  • Content Testing
  • Security Testing
  • Functional Testing
  • Each area has testing tools tailor made for it.

Testing of Web Applications 1/7
3
Content Testing
  • Testing of the visible part of the web site
  • Testing Tools
  • W3C Consortium Free Online Tools
  • Markup Validator
  • Link Checker
  • CSS Validator
  • and more

Testing of Web Applications 2/7
4
Security Testing
  • Testing for security threats within the web
    application
  • Testing tools
  • OWASP open source testing tools
  • Commercial tools
  • Acunetix
  • SecurityInnovation
  • SpyDynamics

Testing of Web Applications 3/7
5
Functional Testing
  • Testing of the business logic of the web
    application
  • Testing tools
  • Open source tools
  • Selenium
  • MaxQ
  • Commercial tools
  • iMacros
  • WAPT

Testing of Web Applications 4/7
6
Selenium
  • Pros
  • Executes directly in Web Browser
  • Platform Browser independent
  • Supports a wide range of programming languages
  • Cons
  • Not capable of testing Java Applets

Testing of Web Applications 5/7
7
Testing of Java Applets
  • Tools Available
  • Conventional Java GUI testing tools
  • Are not a web application testing tool
  • Treats a Java Applet as a conventional GUI
    application
  • iMacros
  • Makes use of image recognition technology to
    capture and playback events
  • Can be used to test different types of media
    files (Flash, Shockwave, ActiveX, ) not Java
    Applet specific
  • It is a commercial tool ( 699.00 per license)

Testing of Web Applications 6/7
8
Conclusion (Testing of Web Applications)
  • There are tools to test the different areas of
    Web Applications
  • However there isnt a tool tailor made
    specifically to test Java Applets
  • The aim of this FYP is to develop a test
    automation tool for Java Applets - TATJA

Testing of Web Applications 7/7
9
TATJA
  • A browser and platform independent tool to test
    Java Applets
  • Applets are tested in their actual running
    environment
  • A record/playback testing tool
  • Supports regression testing
  • Does not makes used of any other third party
    scripting languages
  • Is a flexible tool

TATJA 1/12
10
TATJA Overview1/3
  • Activity Diagram

Software Wrapping
TATJA 2/12
11
TATJA Overview2/3
  • TATJA is in itself a Java Applet
  • The Applet to be tested is loaded within TATJA
  • TATJA wraps within it the Applet to be tested
  • TATJA can gain access to each component of the
    Applet to be tested
  • TATJA can be operated in two modes
  • Record Mode
  • Playback Mode

TATJA 3/12
12
TATJA Overview3/3
  • Flexibility
  • The actions that can be performed on the Applets
    components are defined by the user through an XML
    document (TatjaML)
  • Reason
  • To make the tool compatible with all possible
    Java Swing component

TATJA 4/12
13
TATJA Basic Building Blocks
  • User Interface
  • Applet Wrapper
  • Recorder Handler
  • Playback Handler
  • Regression Test Runner
  • Component Identification Mechanism

TATJA 5/12
14
TATJA in Record Mode1/2
  • The user records the test actions on the
    components of the Applet to be tested
  • Test actions includes
  • Button clicks
  • Text input to text fields
  • Mouse clicks
  • The test actions are converted into Java code and
    stored in Java classes.
  • 1 Test Case gt 1 Java Method

TATJA 6/12
15
TATJA in Record Mode2/2
  • Block Diagram
  • When test cases are recorded, they can be
    edited/enhanced by the user manually

TATJA 7/12
16
TATJA in Playback Mode
  • The User loads the Java Class with the test cases
  • Selects the test method and executes it
  • Block Diagram

TATJA 8/12
17
Regression Tests in TATJA1/2
  • The Applet to be tested is wrapped within another
    Applet
  • A Java method that invokes a selection of test
    cases written within this Applet wrapper
  • An HTML document that embeds the Applet to be
    tested is generated
  • A JavaScript call to the Java method listed in
    the second bullet
  • By loading the generated HTML page in a browser,
    the test cases are executed automatically

TATJA 9/12
18
Regression Tests in TATJA2/2
  • Block Diagram

TATJA 10/12
19
The TatjaML Document1/2
  • Has a list of all the actions that can be
    performed on each component
  • An action can be
  • A method call on the component
  • An event
  • Each action includes the information that is
    needed by TATJA to dynamically perform it
  • Which method to invoke
  • Which event listener to create
  • Which event Object to pass
  • and more

TATJA 11/12
20
The TatjaML Document2/2
  • Snippet

ltcomponent name"JButton"gt ltcommandsgt ltisCli
ckable params"" desc"Check if the JButton is
enabled"gt ltreturngtbooleanlt/returngt ltinvoke
method"isEnabled"gt lt/invokegt lt/isClickablegt
lt/commandsgt lteventsgt ltclick params""
desc"Generate a click event on a
JButton"gt ltlistenergtActionListenerlt/listenergt
ltinvoke method"actionPerformed"gt ltpass_object
object"ActionEvent"gt ltparam
type"java.lang.Object"gtlt/paramgt
ltparam type"int"gt3lt/paramgt ltparam
type"java.lang.String"gtgetActionCommandlt/paramgt
lt/pass_objectgt lt/invokegt lt/clickgt
lt/eventsgt lt/componentgt
TATJA 12/12
21
Program Demonstration
Program Demonstration 1/1
22
Conclusions
  • TATJA was tested with existing Java Applets of
    different types on different browsers
  • The desired functionality was obtained and the
    testing tool gave the expected results
  • All objectives set for this project were
    successfully achieved

Conclusions 1/1
Write a Comment
User Comments (0)
About PowerShow.com