Al-Quds University            Department of Computer Science                        Special Topics                        ...
   Introduction:                   Software artifacts development life cycle pass in many stage, one of     most importan...
routed to use and build automated methods to perform the testing and inspection      process.              The main import...
XML Extensible Markup Language is text format for represent any kind of         data and Use XQuery for manipulate and que...
The above diagram show three layers and the important layer is façade      layer which operate between analysis rule layer...
Procedure to find this code smell: After we represent this source code in XML format, werun the following XQuery function ...
•    Testing component:                    In the following diagram we introduce our flexible testing              compone...
3. Time of execution.               4. Right return values.               5. Wrong return values.          •   Implementat...
Now we have to build XML file and extract its parameters:List of inputs: employeeId.List of outputs: finalSalary.Time of e...
underlying target using XML, and the analysis rule layer which use querying    language like XQuery to find patterns match...
We present and existing quality assurance framework for assuring software     quality, and concentrate on internal quality...
    References:      1.   A Flexible Framework for Quality Assurance of Software Artefacts with           Applications to...
Upcoming SlideShare
Loading in …5
×

Mohammed Kharma - A flexible framework for quality assurance and testing of software

643 views

Published on

A flexible framework for quality assurance and testing of software

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
643
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
11
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Mohammed Kharma - A flexible framework for quality assurance and testing of software

  1. 1. Al-Quds University Department of Computer Science Special Topics ProposalA Flexible Framework for Quality Assurance and testing of Software Mohammed Fahmi Kharma Draft 3.0 2th.Jan.2010
  2. 2.  Introduction: Software artifacts development life cycle pass in many stage, one of most important stage is software testing and assuring the quality of the output from the development cycle, in order to assure the quality, we have to consider deferent sides of software quality: internal quality like analysis of source code to find code smell, external quality which look at the ability of software to interact with external environments, and quality in-use from end user perspective. During the development life cycle, quality assurance get more important and attention throughout the life cycle, so that software developer must look for a proper way and method to speed up, got more performance, quality and decrease manual efforts and inspection during assuring software quality process.  Background: Early Quality assurance and testing of software depends on manual review, inspection and testing for software and source code, which is headache the development cycle process of software, so after manual method to test software they build and use separate software to test the first program and this testing software developed for specific system and can’t be used for another one. So to decrease the time and cost consumed in testing and assuring the quality of software, the directionii A Flexible Framework for Quality Assurance and testing of Software
  3. 3. routed to use and build automated methods to perform the testing and inspection process. The main important point to pay attention for is building generic framework support wide area of programming language, So In Oct 2007 Jens M. N¨odler thesis about software analysis using XML to Detect Bad Smells in TTCN-3 Test Suites [3], In 2009 Jens Nödler et al write paper in building flexible framework for quality assurance and build this work on Jens thesis [1]. The purpose of this thesis is to improve and develop a software quality assurance and testing framework respectively to support wide target area and domain programming language base on high level of abstraction and layering to achieve easy adoption for the target software with less pain and work.  Concepts & Foundations: “software artefact” term relates to all items that are created as part of a software development process, e.g. documents containing requirements, models, source code, scripts, or test specifications[1], and we can called the process of determine software artefact properties Software analysis.iii A Flexible Framework for Quality Assurance and testing of Software
  4. 4. XML Extensible Markup Language is text format for represent any kind of data and Use XQuery for manipulate and querying like this data format “XML format”. Code smell is any symptom in the source code of a program that possibly indicates a deeper problem, for each code smell the is special handling method to detected by writing function in XQuery language and execute it on the XML representation of target software [2].  Short description: We will demonstrate framework layers and its interaction between together. The framework consist of two component • Analysis component: Analysis Target Layer Analysis Target Layer (Java) XML Analysis XML Analysis Representation Representation Facade Layer Impl Facade Layer Impl Facade Layer Interfaceiv A Flexible Framework for Quality Assurance and testing of Software Metrics Analysis Plug-in Smell Analysis Plug-in
  5. 5. The above diagram show three layers and the important layer is façade layer which operate between analysis rule layer and target software layer, which provide standard format to avoid analysis rule layer dealing with the specification of each target software. Example for implemented code smell for detects duplicate code in branch.Assume we have the following source code:Function void checkIsOk ( int p1 , int p2 ) {if ( p1 < 0 . 0 ) { p1=p2; Alert(p1 + “------------“ + p2 );}if ( p2 >= 7 . 0 ) { p1=p2; Alert(p1 + “------------“ + p2 );}if ( p2 < p1 ) {…do something else…}}Problem description: The duplicated code can appear in the above conditionals becausedifferent conditions and the same returned result in each check.v A Flexible Framework for Quality Assurance and testing of Software
  6. 6. Procedure to find this code smell: After we represent this source code in XML format, werun the following XQuery function [1] on it to find if/else statements that contain same/duplicatecode:declare function smell:duplicate-code-in-conditionals() { for $scope in facade:get-blocks(()) let $to-compare := ( let $if := facade:get-if-constructs($scope) return (facade:get-if-branch($if) | facade:get-else-branch($if)) )9 return lib:find-duplicates($to-compare)10 };vi A Flexible Framework for Quality Assurance and testing of Software
  7. 7. • Testing component: In the following diagram we introduce our flexible testing component that will be included in the framework, and its functionality to testing target software regarded from the target and its complexity. Analysis Target Layer (Java) XML Main method presentation Web Service API Impl Facade Layer Impl Web Service API Interface Facade Layer Interface Testing Manager Testing component cycle: • Create the representation document for target software and this document will contains only methods that have global accessing scope with the following five parameters: 1. List of method inputs 2. List of method outputs.vii A Flexible Framework for Quality Assurance and testing of Software
  8. 8. 3. Time of execution. 4. Right return values. 5. Wrong return values. • Implementation for web service API. • Testing controller call the implemented API according to the provided information from the XML representation document.Simple example:Below code for calculating employee salary/***param employeeId employee id to calculate his salary.*return finalSalary salary of the employee*/@ExpectedResult(finalSalary >0)@ExpectedExecutionTime(“1”)Public double getSalary(int employeeId){Double finalSalary;……..Return finalSalary;}viii A Flexible Framework for Quality Assurance and testing of Software
  9. 9. Now we have to build XML file and extract its parameters:List of inputs: employeeId.List of outputs: finalSalary.Time of execution: 1 Ms.Right values: finalSalary > 0.Wrong values :!(finalSalary > 0). When test manager read the XML document and find this method and the aboveparameter, automatically send request contains method name and parameter list for theweb service, then wait for response to compare returned values with expected values thatalready read from XML document. Note test manager will delegates calling of method to service implementation dueto the variant in calling methods between targets software.  Methodology: Development of the framework will start with building the architecture of the system and its layers to assure the decoupling between layers, so we will use 3 layer architecture: underlying software, façade layer which is in fact a representation layer to represent the target software in standard and general format regarded fromix A Flexible Framework for Quality Assurance and testing of Software
  10. 10. underlying target using XML, and the analysis rule layer which use querying language like XQuery to find patterns matching and expression evaluations.  Time table:Number Tasks Time Period1 Complete the analysis and design of the framework that we want to 3 week build.2 Learning and studying technologies and Learning implementation 2 weeks of building plug-ins for some of selected IDEs.3 Gathering specific requirements if exists, required data and 1 weeks programming language and supporting technology.5 Quality assurance component implementation coding and 3 weeks enhancement based on previous related works [1], [2], [4].6 Testing component full implementation including generation XML 4 weeks document representation for required data (main methods), test manager and web service.7 Framework testing by my testing component and one other method 3 weeks like JUnit(unit testing framework for the Java programming language), and fixing bugs.8 Final Review / Complete and submit. 2 week  Summary & Future Works:x A Flexible Framework for Quality Assurance and testing of Software
  11. 11. We present and existing quality assurance framework for assuring software quality, and concentrate on internal quality and how to describe software patterns and coding problem as code smell based on flexible and generic technology for software representation used xml and declarative XML query language XQuery. According to this approach, defining of patterns done regarding of the underlying target or programming language , so we can define software patterns in high level of abstraction to achieve a kind of flexibility in building quality assurance software for multiple target and programming language with less pain, cost and heavy work. Then we introduce our new testing architecture component that aimed to build flexible method to testing software in despite of its internal complexity. For future works, when the two components work done successfully, two representations will appear for the target software: one for analysis and the second for automatic testing. So we have to group both together and integrate first and second representation in one document, then to have to integrate both to architecture to gather to form quality assurance and testing framework.xi A Flexible Framework for Quality Assurance and testing of Software
  12. 12.  References: 1. A Flexible Framework for Quality Assurance of Software Artefacts with Applications to Java, UML, and TTCN-3 Test Specifications.2009. 2. R. Al-Ekram and K. Kontogiannis. An XML-Based Framework for Language Neutral Program Representation and Generic Analysis. In CSMR ’05: Proceedings of the Ninth European Conference on Software Maintenance and Reengineering. IEEE Computer Society, 2005. 3. H. Neukirchen and M. Bisanz. Utilising Code Smells to Detect Quality Problems in TTCN-3 Test Suites. In Proceedings of the 19th IFIP International Conference on Testing of Communicating Systems and 7th International Workshop on Formal Approaches to Testing of Software (TestCom/FATES 2007), volume 4581 of Lecture Notes in Computer Science (LNCS). Springer, 2007. 4. J. Nödler. An XML-based Approach for Software Analysis– Applied to Detect Bad Smells in TTCN-3 Test Suites. Master’s thesis, Center for Computational Sciences, University of Göttingen, Germany, ZFI-BM-2007-36, ISSN 1612-6793, Oct. 2007.xii A Flexible Framework for Quality Assurance and testing of Software

×