190 likes | 204 Views
Develop a dynamic test harness that generates and executes platform-specific test scripts for web applications.
E N D
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 Southern Illinois University Yanelis Hernandez PhD Student REU Summer Program 07/14/2008
Motivation 2 • Many web application technologies • Complex web applications make testing difficult • No standard test script language • Migration of technologies inefficient • Cost of software testing accounts for fifty to seventy-five percent of total development costs [1]
Presentation Content 3 • Motivation • Objectives • Literature Review • Progress Made • Implementation • Pending Work
Objectives 4 • Extend Previous Work by Hernandez, et al. [2] • Implement concept of platform independent model • Include more web technologies • Create Self-Configuring Algorithm • Dynamic selection of test suites • Automatic execution of platform specific test scripts • Implementation • Design and test web applications • Deliverables • Technical Report • ACM SAC 2009 • ACMSE 2009
Literature Review - Technologies 5 Dynamic Web Development Technologies: • Ruby on Rails [4] • Released in 2004 • Provides scaffolding, WEBrick, and Rake • Helpful tools are ready for use • PHP [7] • PHP: Hypertext Preprocessor • HTML-embedded scripting language • Widely-used; installed on more than 20 million websites • ASP.NET [8] • Developed by Microsoft • Part of the .NET Framework • Write in Visual Basic, C#, JScript .NET, or J#
Literature Review – Testing Tools 6 Unit Testing: Creating programs that test the validity of parts (units) of the website. • Ruby on Rails [4] • Built in unit tests– Test::Unit library • Generates a test infrastructure upon project creation • PHPUnit [3] • Simple pass/fail reporting • Use with PHPUnit Database Extension • Compare (seeded) database contents with an expected dataset • NUnitASP [6] • Tester objects represent web page elements • Example– “label” or “link” • Clean test scripts
Literature Review – Code Coverage Tools 7 Code Coverage Testing:These tools are able to test test scripts for the amount of code they cover! • RCov [9] • Gives summary and per-file coverage reports • Well supported and documented • Xdebug [7] • PHPUnit extension • Code executed green; executable code that was not executed red; • “dead code” orange • NCover [10] • Save coverage data as XML file • Offers client support via subscription
Problem Statement 8 To develop a web application test harness that dynamically configures its test suite to generate and execute platform specific test scripts.
Current State 9 Web Application
Knowledge 10 • 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
MAPE Policy Generation 11 • 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
Monitor Output 13 <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>
Implementation 14 • 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
Test Script Comparison 15 Ruby on Rails PHP
Pending Work 16 • 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
References 17 • [1] Software Debugging, Testing, and Verification • IBM Systems Journal 2002 • [2] A Meta-Model to Support Regression Testing of Web Applications • Yanelis Hernandez, Tariq M. King, Jairo Pava, Peter J Clarke • International SEKE Conference April 2008 • [3] PHPUnit • http://www.phpunit.de/ • [4] Ruby on Rails • http://www.rubyonrails.org/ • [5] Xdebug • http://www.xdebug.org/ • [6] NUnitASP • http://nunitasp.sourceforge.net/
References 17 • [7] PHP • http://www.php.net/ • [8] ASP .NET • http://www.asp.net/ • [9] RCOV • http://www.asp.net/ • [10] NCover • http://ncover.org
End 18 Questions? Comments?