19
A Self-Configuring Test Harness for Web Applications Jairo Pava School of Computing and Information Sciences Florida International University Courtney Enoex School of Applied Sciences and Arts Southern Illinois University 07/14/2008 REU Summer Program Florida International University School of Computing and Information Sciences Yanelis Hernandez PhD Student

A Self-Configuring Test Harness for Web Applications

  • Upload
    danyl

  • View
    22

  • Download
    1

Embed Size (px)

DESCRIPTION

Florida International University. School of Computing and Information Sciences. A Self-Configuring Test Harness for Web Applications. Jairo Pava School of Computing and Information Sciences Florida International University. Courtney Enoex School of Applied Sciences and Arts - PowerPoint PPT Presentation

Citation preview

Page 1: A Self-Configuring Test Harness for Web Applications

A Self-Configuring Test Harness for Web Applications

Jairo PavaSchool of Computing and

Information SciencesFlorida International University

Courtney EnoexSchool of Applied Sciences and

ArtsSouthern Illinois University

07/14/2008REU Summer Program

Florida International University School of Computing and Information Sciences

Yanelis HernandezPhD Student

Page 2: A Self-Configuring Test Harness for Web Applications

Motivation 2

• ManyMany web application technologies

• ComplexComplex web applications make testing difficult

• NoNo standard test script language

• MigrationMigration of technologies inefficient

• CostCost of software testing accounts for fifty to seventy-five percent of total development costs [1]

Page 3: A Self-Configuring Test Harness for Web Applications

Presentation Content 3

• Motivation

• Objectives

• Literature Review

• Progress Made

•Implementation

• Pending Work

Page 4: A Self-Configuring Test Harness for Web Applications

Objectives 4

• Extend Previous Work by Hernandez, et al.Extend Previous Work by Hernandez, et al. [2]• Implement concept of platform independent model• Include more web technologies

• Create Self-Configuring AlgorithmCreate Self-Configuring Algorithm• Dynamic selection of test suites• Automatic execution of platform specific test scripts

• ImplementationImplementation• Design and test web applications

• DeliverablesDeliverables• Technical Report• ACM SAC 2009• ACMSE 2009

Page 5: A Self-Configuring Test Harness for Web Applications

Literature Review - Technologies 5

Ruby on Rails [4]Ruby on Rails [4]• Released in 2004• Provides scaffolding, WEBrick, and Rake

• Helpful tools are ready for use

PHP [7]PHP [7]• PHP: Hypertext Preprocessor• HTML-embedded scripting language• Widely-used; installed on more than 20 million websites

ASP.NET [8]ASP.NET [8]• Developed by Microsoft• Part of the .NET Framework

• Write in Visual Basic, C#, JScript .NET, or J#

Dynamic Web Development Technologies:Dynamic Web Development Technologies:

Page 6: A Self-Configuring Test Harness for Web Applications

6Literature Review – Testing Tools

Ruby on Rails [4]Ruby on Rails [4]• Built in unit tests– Test::Unit library• Generates a test infrastructure upon project creation

PHPUnit [3]PHPUnit [3]• Simple pass/fail reporting• Use with PHPUnit Database Extension

• Compare (seeded) database contents with an expected dataset

NUnitASP [6]NUnitASP [6]• Tester objects represent web page elements

• Example– “label” or “link”• Clean test scripts

Unit Testing:Unit Testing: Creating programs that test the validity of parts (units) of the website.

Page 7: A Self-Configuring Test Harness for Web Applications

7Literature Review – Code Coverage Tools

RCov [9]RCov [9]• Gives summary and per-file coverage reports • Well supported and documented

Xdebug [7]Xdebug [7]• PHPUnit extension• Code executed green; executable code that was not executed red; “dead code” orange

NCover [10]NCover [10]• Save coverage data as XML file• Offers client support via subscription

Code Coverage Testing:Code Coverage Testing: These tools are able to test test scripts for the amount of code they cover!

Page 8: A Self-Configuring Test Harness for Web Applications

Problem Statement 8

To develop a web application test harness that dynamically configures its test suite to generate and execute platform specific test scripts.

Page 9: A Self-Configuring Test Harness for Web Applications

Current State

Web Application

9

Page 10: A Self-Configuring Test Harness for Web Applications

Knowledge

• Facilitates the exchange and archival of management information

• Extends flexibility of test harness

• Goal Policies•User defined

• Models• PIM• PSM

• Test Scripts • PI• PS

• Test Results• Pass/Fail• Code Coverage Analysis

• Runtime Policies• Generated by MAPE

10

Page 11: A Self-Configuring Test Harness for Web Applications

• Monitor• Outline a profile for every web page in the web application • Identify unfulfilled policies

• Analyzer• Identify and locate appropriate platform specific model for test script generation• Generate test report

•Planner• Generate and keep track of platform specific test scripts

•Executor• Execute tests and track code coverage

MAPE Policy Generation 11

Page 12: A Self-Configuring Test Harness for Web Applications

Autonomic Manager 12

Page 13: A Self-Configuring Test Harness for Web Applications

<webpage id=“wp001”><lname>Category</lname> <pname>C:\...\category.php</pname><url>Http://…/category.php</url><technologies>

<client id=“cst001">HTML</client> <server id=“sst001">PHP</server>

</technologies> </webpage>

Monitor Output 13

Page 14: A Self-Configuring Test Harness for Web Applications

Implementation

• FastBooks.com e-commerce web application

• Web Technologies used• Ruby on Rails 1.2• PHP 5

• Testing Tools• Ruby 1.8• PHPUnit 3.3

• Code Coverage Analysis Tool• RCOV 1.0.8• Xdebug 2.0

14

Page 15: A Self-Configuring Test Harness for Web Applications

Ruby on Rails

PHP

Test Script Comparison 15

Page 16: A Self-Configuring Test Harness for Web Applications

Pending Work

• Planner• Platform Independent Model• Platform Specific Models

• Ruby on Rails• PHP• ASP.NET

• Executor• Automatic test script execution with code coverage analysis• Perform action based on test result and user defined policy

16

Page 17: A Self-Configuring Test Harness for Web Applications

References

•[1] Software Debugging, Testing, and VerificationIBM Systems Journal 2002

•[2] A Meta-Model to Support Regression Testing of Web ApplicationsYanelis Hernandez, Tariq M. King, Jairo Pava, Peter J ClarkeInternational SEKE Conference April 2008

•[3] PHPUnithttp://www.phpunit.de/

•[4] Ruby on Railshttp://www.rubyonrails.org/

•[5] Xdebughttp://www.xdebug.org/

•[6] NUnitASPhttp://nunitasp.sourceforge.net/

17

Page 18: A Self-Configuring Test Harness for Web Applications

References

•[7] PHPhttp://www.php.net/

•[8] ASP .NEThttp://www.asp.net/

•[9] RCOVhttp://www.asp.net/

•[10] NCoverhttp://ncover.org

17

Page 19: A Self-Configuring Test Harness for Web Applications

Questions?

Comments?

End 18