Documente Academic
Documente Profesional
Documente Cultură
on
#ep$rtment o% Computer Science & Engineering &$tion$' (nstitute o% Techno'og" )$rn$t$*$+ Sur$th*$' Srini,$sn$g$r+ (ndi$ - . /0 1e$r: 0/!2
Contents
Contents.......................................................................................................................... !hite "o# $esting.......................................................................................................... %cCabes C&clomatic Comple#it& %etrics....................................................................'
Maintainability tests
The maintainability tests installs special features to detect failures, module structures that support software development, extensions and improvements of the software system. The reusability tests is part of an example of this, as explained below$
Reusability tests
*eusability tests are performed on the pac age which examines all of the reused software that had been implemented into the software pac age. "ddition to this function it also adapts to the program allowing the present code to be re.usable for future preferences. When loo ing at the White box testing in more detail and analysing its procedures it becomes aware that when testing each test case - path maybe become unrealistic and unfeasible. We have to ta e into account on the amount of coverage of all the possible paths and the amount of code that is produced. There are two possible solutions for this situation$ Line Co erage / this is to test and cover over all of the program code and the coverage is calculated by the percentage of lines covered. Path Co erage / this is to test and cover all the available paths in the system and the coverage is calculated by the percentage of paths covered.
The line coverage requires a different process to path coverage as explained above. There are different types of line coverage depending on the users requirements and specification of the software system. 7ne function will be to run a full complete line coverage process which will consist of each line of code being compiled and executed at least once. This will be shown as a percentage of the lines compiled during the testing process. 6ine coverage may also perform a less efficient method test which consists of testing fewer test cases which will ma e the system more vulnerable to bugs and system errors. When tal ing about correctness tests, flow chart and a flow graph can be used to enforce the understanding of line coverage within the correctness tests. " diamond will represent$ the options covered by a conditional statement " rectangle will represent$ software sections connecting the diamonds. The arrows - edges will represent$ The flow of direction. " flow diagram to show how car insurance can be calculated based on the users circumstances. This diagram involves$ " 'ar 1nsurance 'ompany and calculating the users annual car insurance will involve$ 1f the users car is less than >9;,;;; or greater then, 1s the year of the car older than 8 years, 3ow old is the user, %oes the user have any previous driving experience, %oes the user have more then two years no claims bonus.
9 'ar 1nsurance
' +ear of Car * Older than or 6 ' , -ow old are &ou. %ore than 1 &ear 140 1 2 no claims bonus
10
1(
2rom this diagram is possible to come out with another of different unique paths. 7verall to achieve complete path coverage an estimated :A test cases would have to be performed due to their being :A individual unique paths. 4xamples of unique paths have been displayed below. 'omplete 2ull &ath 'overage 9 B 9.:.C.8.=.D.E.99.9:.9? : B 9.:.C.8.=.D.E.9C.9A.98.9? C B 9.:.C.8.=.D.E.99.9C.9A.9= A B 9.:.C.8.=.D.9;.99.9? F 9C B 9.:.A.8.=.D.E.99.9:.9? 9A B 9.:.A.8.=.D.E.9C.9A.98.9? F :C B 9.:.A.8.?.D.9;.99.9C.9A.98.9? :A B 9.:.A.8.?.D.9;.99.9C.9A.9=.9?
By loo ing at this scenario, if the entities and modules increased the amount of testing to be performed on this would grow rapidly. The increase in modules would then lead to a more complex system. " scientist called )c'abe then come up with a theory to determine how complex a software system was and how easy it was to interoperate this type of software system.
'
* B The number of regions that is involved in the program flow graph. +"ny enclosed area including the outer layer of the flow diagram., 4 B The number of edges 5 B The number of nodes & B The number of decisions 1 have now ta en )c'abes theory and have applied it to our 'ar 1nsurance #cenario$
*esulting metrics calculations indicate that the maximum number of independent paths needed to achieve full line coverage is =. To summarise )ccabes ob!ective is that programs with cyclomatic complexities of less then 8 are simple and easy to understand, :;I independent paths needed results /
in the complexity is perceived as high and extreme testing would have to be performed. "lso any program containing 8; and above the software for practical purposes becomes nown unpractical maybe even impossible.
Re#usability Testing
When loo ing at this method we first have to loo at what is re.usabilityJ This can be defined as a section of code that can be re.used to add new functionalities with very little or no modification. 5ot only is this time consuming, it is expected that this type of code has been through a number of testing procedure, eliminating any errors or bugs. This clean section of code can then be simply integrated into a new wor ing pro!ect with the nowledge that this code is successfully wor ing and follows all the correct standards and wor ing instructions. #o when loo ing at re.usable code, the re.usability testing ob!ective is to chec and determines whether this section of code is efficient and bug free. This type of testing also involves the documentation side, as user manuals and help wiKards have a great number of similarities.
limit the amount of bugs within an application. White box testing is the most effective testing as it the most thorough when testing an individual application.
8eferences9 !hite:bo# testing http9;;en.wikipedia.org;wiki;!hite:bo#<testing : last modified on ' 7o=ember 00) !hite:"o# $esting report http9;;agile.csc.ncsu.edu;>E%aterials;!hite"o#.pdf : last modified on ?anuar& 14 00/ !hite "o# $esting https9;;buildsecurit&in.us:cert.go=;dais&;bsi;articles;best:practices;white:bo#; '): ">@.html : last updated 00):0*: * >oftware $esting : !hite "o# $esting >trateg& http9;;www.buAAle.com;editorials;4:10: 00':/,('0.asp : last updated 17 Nov 2009
07:51:54 GMT
5alin, D. B 0040, Software Quality Assurance From theory to implementation, Cearson Addison !esle&.