140 likes | 280 Views
Analysis of Software Cohesion Attribute and Test Case Development Complexity. Frank Tsui and Stanley Iriele Software Engineering Southern Polytechnic State University March 25, 2011. Our Research Area. Software “Attributes and Metrics” Complexity Vulnerability Usability Testability
E N D
Analysis of Software Cohesion Attribute and Test Case Development Complexity Frank Tsui and Stanley Iriele Software Engineering Southern Polytechnic State University March 25, 2011
Our Research Area • Software “Attributes and Metrics” • Complexity • Vulnerability • Usability • Testability • Maintainability • Reliability • etc.
Software Complexity Metrics • OO “Related” Cohesion Metrics • TCC, LCC (Bieman & Kang -1995/1998) • RCI (Briand, Daly and Wust -1998) • LCOM (Chidamber & Kemerer -1994) • LCOM4 (Hitz & Montazeri – 1995) • LCOM5 (Henderson-Sellers – 1996) • CC (Bonja & Kidanmarian – 2006) • ITRA-C (Tsui, Duggins, Karam & Bonja – 2009)
Common “Theme” in these Cohesion Metrics(“coupling” of code logic via sharing information) Data: constants and variables Functionality: code “slices” or “methods”
Cohesion Attribute as a Predictor Design/Code Complexity (Using Cohesion Metric) Test Complexity “Predictor” ?
Test Activities and Test Complexity • Test Case Development - complexity • Test Environment Set Up • Test Execution and Recording • Test Result Analysis
Define-Use (D-U path) Test Case Development data defined data defined data defined data used data used data used data used
2 Specific OO Cohesion Metrics LCOM5 = { [(1/a) (∑ μ( Aj ) ) ] – m } / (1-m) where: a = number of attributes or instance variables μ( Aj ) = number of methods accessing attribute Aj m = number of methods in the Object ∑ μ( Aj ) is summed over all the attributes j = 1, - - -, n ITRA-C = { ∑ (E + API) / 2 } / |mj| where: E = 1/ (∑ ∑ (vij) where vij represents jth variable in ith Effect code slice API = average Proximity indicator |mj| = cardinality of methods in the class
Test Case Development Complexity Metric TCD-Complexity = (T-DU) + | T’ | where: T-DU = the # of variables used in the methods in the class or the number of D-U paths |T’ | = cardinality of the smallest set of test cases to cover all the D-U paths (note that worst case is |T’| = T-DU)
Rank Ordered Correlation Spearman Rank Order Correlation Coefficient = .32 for LCOM5 & TCD-Complexity = .35 for ITRA-C & TCD-Complexity
Raw & Ranked Data of Classes > 50 loc Spearman Rank Order Correlation Coefficient = 0 for LCOM5 & TCD-Complexity = 1.00 for ITRA-C & TCD-Complexity
Measurements of Methods >20 loc(only ITRA-C because LCOM5 is for Class) Spearman Rank Order Correlation Coefficient = .86 for ITRA-C & TCD-Complexity Pearson Correlation Coefficient Between Ranks = . 85 for ITRA-C & TCD-Complexity
Cohesion Attribute as a Predictor OO Cohesion ITRA-C D-U Test Case Development TCD-Complexity may be a “predictor” for