370 likes | 379 Views
Software Testing Methods and Tools. Ahmad A. Saifan Yarmouk University. Outlines. Mutation testing Web applications Mobile agent systems Android applications Other domains… Test Case Reduction Data mining techniques. Mutation Testing- Phase 1 Mutant Generation.
E N D
Software Testing Methods and Tools Ahmad A. Saifan Yarmouk University
Outlines • Mutation testing • Web applications • Mobile agent systems • Android applications • Other domains… • Test Case Reduction • Data mining techniques
Mutation Testing: Phase 2Test Execution Test Suite Test cases applied to the mutant program -Killed mutant -Survived mutant
Testing Web Applications • A web application is a software that can be used through the web, where users can access, using Hypertext Transfer Protocol (HTTP) requests, via a graphical users' interface running in their computers. • Challenges and Limitations in Web Applications : • Web application control flow depends on: • user input: • user location : • The browser interaction when user clicks backward, forward or brows new links within the web page makes it complex to build control flow. • The different technologies that are integrated, within a web page, make it difficult to analyze and model. • These technologies include client-side technologies: (HTML, cascade style sheet), server-side technologies:(PHP, Perl, XML, SQL: Structure Query Language, SSL).
MahmoudBani Ata, 2015, master thesis, Investigating the Ability of Testing Web Applications Based on Traditional Software Testing Techniques Testing Web applications • Graph coverage • Mutation testing • Input space partition • generate a large number of tests • Not effective without strong automation
:Testing Web applicationsGraph coverage -1284 prime paths - 196790 test paths
Testing Web applicationsGraph coverage How many test paths can be generated from this graph?
Testing Web applicationsGraph coverage What about this graph?
Testing Web applicationsGraph coverage • Test paths minimization techniques ? • Automatically generate the prime paths?
Testing Web applications: Mutation Testing • Mutation Operators: • SQL data retrieving • data manipulation • Domain name and IP address look up • internet protocol and service information • HTTP • connection to server and to database.
Testing Web applications: Mutation Testing Mutation Operator- Examples Original Code Mutant Code ∆ SELECT * FROM ‘department’ where ‘deptid’ = 1; • AWCS- Add WHERE Clause to select statement SELECT * FROM ‘department’ ; • CIPA: Change the IP address parameter of the function gethostbyaddr Original Code Mutant Code $ip = gethostbyaddr(87.236.233.10) Echo $ip // yuccweb.yu.edu.jo ∆ $ip = gethostbyaddr(76.162.186.2) Echo $ip //rev.opentransfer.com.
Mobile Agent System (MAS) • MAS is a special kind of distributed system in which the agent software can move from one physical host to another
Mutation Testing - MAS Change Dispatch Destination (CDD).
Mutation Testing – MASPublication • Ahmad. A. Saifan, J. Dingel, J. S. Bradbury and E. Posse, "Implementing and Evaluating a Runtime Conformance Checker for Mobile Agent Systems," 2011 Fourth IEEE International Conference on Software Testing, Verification and Validation, Berlin, 2011, pp. 269-278 • Ahmad A. Saifan,. and Wahsheh, H. A. 2012. Mutation operators for JADE mobile agent systems. In Proceedings of the 3rd international Conference on information and Communication Systems (Irbid, Jordan, April 03 - 05, 2012). ICICS '12. ACM, New York, NY, 1-5.
Mutant Testing – Android App Replace Standard Extra Data (RSED) CorrectCode sendIntent.putExtra(Intent.EXTRA_TEXT, "Text"); Mutant CodesendIntent.putExtra(Intent.EXTRA_STREAM, "Text.");
Publication • Ahmad Saifan, Ahmad alzyoud, Mutation Testing to Evaluate Android Applications, Information and Software Technology. [ISI], submitted, Dec 5th 2016.
Test Case Reduction • Data Mining • Clustering • Classification
Test Case Reduction using Data Mining Technique • Ahmad A. Saifan, Emad Alsukhni, Hanadi Alawneh, Ayat Al-Sbaih, (2016). Test Case Reduction using Data Mining Technique, International Journal of Software Innovation, (IJSI). Volume 4 Issue 4, October 2016 Pages 56-70 . • jhh
Results 504 test cases 93 test cases Test Case Visualization Before Reduction Test Case Visualization After Reduction The coverage Before and After Reduction
Test Case Reduction using Data Mining Classifier Techniques • Ahmad A. Saifan, Test Case Reduction using Data Mining Classifier Techniques. (2016) . Journal of Software.Volume 11, Number 7. PP 656-663. 1) Generate test cases from the system under test • 493 test cases were generated
Test Case Reduction using Data Mining Classifier Techniques • 2) Data Set Attributes
Sample of data set • Cover class number 5 • Cover method number 8 • Has 3 inputs 2,4,”234” • An irredundant class
Test Case Reduction Rules Is a set of test cases, where Defined to cover one of the following: A test cases ti is considered redundant with tjif it is satisfied with all of the three rules
Test Case Reduction using Data Mining Classifier Techniques 3) Analyse Results Preprocessing: removing empty instances and the attributes that have less information gain value
Ideas • The quality attributes of Android apps • Android Software metrics • tools