1 / 21

A Self-Configuring Test Harness for Web Applications

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

ishana
Download Presentation

A Self-Configuring Test Harness for Web Applications

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. A Self-Configuring Test Harness for Web Applications Florida International University School of Computing and Information Sciences 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 Peter J. Clarke Research Mentor REU Summer Program 8/1/2008

  2. Motivation 2 • Many web application technologies • No standard test script language • Complex web applications make testing difficult • Migration of technologies inefficient • Cost of software testing accounts for fifty to seventy-five percent of total development costs

  3. Presentation Content 3 • Motivation • Objectives • Background • Problem Statement • Approach • Implementation • Results • Conclusions / Pending Work • Acknowledgements • Questions

  4. Background 5 • Testing web application is necessary • Complex web applications make testing difficult • Regression testing points to code modification that make previously functional code to fail • Allows the ability to catch errors as they are introduced • Subtle changes in code can introduce errors

  5. Background 6

  6. Literature Review 4 Testing Tools • Ruby on Rails [2] • Released in 2004 • Provides scaffolding, WEBrick, and Rake • Helpful tools are ready for use • PHPUnit [3] • Simple pass/fail reporting • Use with PHPUnit Database Extension • Compare (seeded) database contents with an expected dataset • An Integrated Self-Testing Framework for Autonomic Computing Systems • King, et al • Authors developed integrated testing for autonomic systems

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

  8. Approach 8 • FastBooks.com e-commerce web application • Web Technologies used • Ruby on Rails 1.2 • PHP 5 • Testing Tools • Ruby 1.2 • PHPUnit 3.2.21 • Code Coverage Analysis Tool • RCOV 0.8.0 • Xdebug 2.0.3

  9. Approach 9

  10. Approach 10

  11. Implementation 11 CreateAction Parameters AssertAction Parameters InputAction Parameters TestCase(“TC001_ValidateBook_SunnyDay”) ProcedureEntry(“TC001_PE001”) CreateAction( Dict.ObjectType, “product”, parameters ) ProcedureEntry(“TC001_PE002”) InputAction( Dict.VarType, “price”, parameters ) ProcedureEntry(“TC001_PE003”) AssertAction( Dict.AssertTrue, “valid”, parameters ) Ruby on Rails Model AddCreateSyntax( Dict.ObjectType, “[VarName] = [ClassName].new([ParamList])”) AddInputSyntax( Dict.VarType, “[ObjectName].[VarName] = [VarValue]” ) AddAssertSyntax( Dict.AssertTrue, “assert [ObjectName].[VarName]?” )

  12. Implementation 12 require File.dirname(__FILE__) + '/../test_helper' class ProductTest < Test::Unit::TestCase def test_positive_price product = Product.new(:title => "Book Title", :price => 0.00 ) product.price = 9.99 assert product.valid? end end

  13. Implementation 13 CreateAction Parameters AssertAction Parameters InputAction Parameters TestCase(“TC001_ValidateBook_SunnyDay”) ProcedureEntry(“TC001_PE001”) CreateAction( Dict.ObjectType, “product”, parameters ) ProcedureEntry(“TC001_PE002”) InputAction( Dict.VarType, “price”, parameters ) ProcedureEntry(“TC001_PE003”) AssertAction( Dict.AssertTrue, “valid”, parameters ) PHPUnit Model AddCreateSyntax( Dict.ObjectType, “$this -> [varName] = new [ClassName]([paramList]);” ) AddInputSyntax( Dict.VarType, “$this -> [ObjectName] -> [VarName]( [VarValue] );” ) AddAssertSyntax( Dict.AssertTrue, “$this -> assert( $this -> [ObjectName] -> [varName]( ) );” )

  14. Implementation 14 require once "phpunit.php" require once "product.php" class productTest extends TestCase { function test_positive_price() { $this -> product = new Product(“Book Title", 0.00); $this -> product -> price( 9.99 ); $this -> assert( $this -> product -> valid() ); } }

  15. Implementation 15 Ruby on Rails 1.2 RCOV 0.8.0 PHPUnit 3.2.21 Xdebug 2.0.3

  16. Evaluation 16 • Accurate detection of web technologies by monitor • Correct selection of model for test script generation • Proper syntax of platform specific test script • Successful execution in testing tool

  17. Limitations and Future Work 17 • Test script generation needs improvement • Abstract syntax trees • Increase support for different types of testing • More web technology support • Easier integration of web technology models

  18. Conclusions 18 • Utilize concepts of autonomic computing to reduce human interaction • Automatically test web applications • Determine code coverage • Interpret results • More efficient migration of web application test scripts • Standard test script language • Improve quality of test cases developed

  19. Acknowledgements 19 National Science Foundation, Grant # IIS-0552555, Research Experience for Undergraduates: Autonomic Computing at FIU Florida International University Dr. Masoud Milani Yanelis Hernandez, Tariq M. King Dr. Peter Clarke Dr. Tao Li, Dr. Raju Rangaswami, Dr. Masoud Sadjadi

  20. References 20 • [1] PHPUnit • http://www.phpunit.de/ • [2] PHP • http://www.php.net • [3] Ruby on Rails • http://www.rubyonrails.org/ • [4] Xdebug • http://www.xdebug.org/ • [5] RCOV • http://www.asp.net • [6] Software Debugging, Testing, and Verification • IBM Systems Journal 2002 • [7] An Integrated Self-Testing Framework for Autonomic Computing Systems • Tariq M. King, Alain E. Ramirez, Rodolfo Cruz, Peter J. Clarke

  21. End 21 Questions? Comments?

More Related