Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "A Self-Configuring Test Harness for Web Applications Jairo Pava School of Computing and Information Sciences Florida International University Courtney."— Presentation transcript:

1 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 8/1/2008 REU Summer Program Florida International University School of Computing and Information Sciences Yanelis Hernandez PhD Student Peter J. Clarke Research Mentor

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

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

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 Test Case Components ID A name given to each test case Purpose The aspect of the application that will be tested Setup Creation testing environment(will not interfere with real settings) Input Show how the application interacts with the Setup data Expected output If the output is what was expected, the test passes Background 6

6 Literature Review 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 4 Testing Tools

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

8 Approach 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 8

9 Approach 9

10 10

11 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]?” ) ClassNameProduct ParamList“Book Title”, 0.00 CreateAction Parameters ObjectNameproduct AssertAction Parameters Implementation InputAction Parameters ObjectNameproduct VarValue9.99 11

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 Implementation 12

13 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]( ) );” ) Implementation 13 ClassNameProduct ParamList“Book Title”, 0.00 CreateAction Parameters ObjectNameproduct AssertAction ParametersInputAction Parameters ObjectNameproduct VarValue9.99

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() ); } Implementation 14

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

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 Evaluation 16

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 Limitations and Future Work 17

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 Conclusions 18

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

20 References [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 20

21 Questions? Comments? End 21


Download ppt "A Self-Configuring Test Harness for Web Applications Jairo Pava School of Computing and Information Sciences Florida International University Courtney."

Similar presentations


Ads by Google