Скачать презентацию Towards Defining and Exploiting Similarities in Web Application Скачать презентацию Towards Defining and Exploiting Similarities in Web Application

e171c242c00aa1f9c49c86095445c09a.ppt

  • Количество слайдов: 17

Towards Defining and Exploiting Similarities in Web Application Use Cases through User Session Analysis Towards Defining and Exploiting Similarities in Web Application Use Cases through User Session Analysis Sreedevi Sampath, University of Delaware Amie Souter, Drexel University Lori Pollock, University of Delaware Workshop on Dynamic Analysis (WODA), May 25, 2004 co-located with International Conference on Software Engineering (ICSE 2004)

Motivation and Overview 12. 3. 40. 65 GET index. jsp 12. 3. 40. 65 Motivation and Overview 12. 3. 40. 65 GET index. jsp 12. 3. 40. 65 GET login. jsp View user sessions as use cases 12. 3. 40. 65 GET reg. jsp? login=xxx&password=hello& 12. 3. 40. 65 GET myinfo. jsp Learn about dynamic behavior User session analysis Monitoring load of traffic Test case generation • Clustering via concept analysis • Common subsequences analysis Content personalization Behaviorally related sequence of events performed by the user through interaction with the system Test suite reduction Software development/ maintenance tools

Step 1 Clustering via Concept Analysis • Mathematical technique for clustering objects that have Step 1 Clustering via Concept Analysis • Mathematical technique for clustering objects that have common discrete attributes • Set of objects, O: user sessions, us • Set of attributes, A: URLs, u • Relation, R: us requests u • Concept analysis identifies all concepts (Oi, Aj) for a given tuple (O, A, R)

GD GR GL us 1 x x x us 2 x x x us GD GR GL us 1 x x x us 2 x x x us 3 x x x us 4 x x x us 5 x x x us 6 o b j e c t s GD GR GL attributes (URLs) RELATION TABLE x x x PL GS GB GM x x x ({us 2, us 3, us 4, us 6} ({us 3} , {GD, GR, GL, PL, GS}) , {GD, GR, GL, GS, GM}) CONCEPT LATTICE: FULL GB PL x GM x GS x us 4 us 3 x ({us 1, us 2, us 3, us 4, us 5, us 6}, {GD, GR, GL}) ({us 2} us 1 us 5 , {GD, GR, GL, GS}) us 2 us 6 SPARSE ({us 4}, {GD, GR, GL, GS, GB}) ({us 6} , {GD, GR, GL, PL, GS, GB}) (null, {GD, GR, GL, PL, GS, GB, GM})

Step 2 Heuristic for Test Suite Reduction GD GR GL us 1 us 5 Step 2 Heuristic for Test Suite Reduction GD GR GL us 1 us 5 • Smallest set of user sessions • Covers all the URLs • Represents common URL subsequences of different use cases GS Identify next-to-bottom nodes PL GM us 2 us 3 GB us 4 us 6 Pick one user session from each of these next-to-bottom nodes Resulting reduced test suite: {us 2, us 6}

Hypothesis Motivating the Approach • Common Subsequences Hypothesis: The set of user sessions clustered Hypothesis Motivating the Approach • Common Subsequences Hypothesis: The set of user sessions clustered together into the same concept node will have a high commonality in the subsequences of URLs in their sessions

Finding Common Subsequences of URLs are representative of partial use cases of the user Finding Common Subsequences of URLs are representative of partial use cases of the user sessions objects { us 3, us 6 } attributes { GD, GL, GR, GS, PL } us 6 GD GD Common Subsequences GR NODE 003 us 3 GR [GD, GR, GL] GL GL [PL, GS] PL GB GS PL PL GS GR GR GL GL PL GB GS PL GS [GR, GL]

Metric for Common Subsequences Hypothesis • attr-size[n] set: level of node in lattice attr-size[5]: Metric for Common Subsequences Hypothesis • attr-size[n] set: level of node in lattice attr-size[5]: level 5 # user sessions= 4 # URLs = 5 # user sessions = 3 # URLs = 5 {a, b, c, d, e} Sub seq size Common subsequence Percent attrs covered 1 a, b, c, d, e 100 % 2 ab, bc, be 80% 3 abc, abe 80% us 1 a b c d a b e us 2 a b c e a b e d us 3 a b c d a b e a Metric Percent of attributes covered by common subsequences of URLs of various sizes

Experiment: Applications Used • Bookstore web application § 9, 748 LOC, 385 methods, 11 Experiment: Applications Used • Bookstore web application § 9, 748 LOC, 385 methods, 11 classes § Front end: JSP, Backend: My. Sql § 123 user sessions • u. Portal application § 38, 589 LOC, 4233 methods, 508 classes § Java, JSP, XML, J 2 EE § 2083 user sessions

Results for Common Subsequences Hypothesis Bookstore Results for Common Subsequences Hypothesis Bookstore

Results for Common Subsequence Hypothesis Bookstore Result: subsequences of various sizes cover reasonable percent Results for Common Subsequence Hypothesis Bookstore Result: subsequences of various sizes cover reasonable percent of attributes

Conclusions for Common Subsequences Hypothesis • Between user sessions of a node there exists Conclusions for Common Subsequences Hypothesis • Between user sessions of a node there exists commonality in subsequences of URLs • These common subsequences cover a reasonable percent of URLs (attributes) of the node • Clustering based on single URLs § clusters similar use cases § can choose one object from each node

Next-to-bottom Coverage of Use Cases Hypothesis In addition to covering all the URLs of Next-to-bottom Coverage of Use Cases Hypothesis In addition to covering all the URLs of the original test suite, the user sessions in next-to-bottom nodes execute a high percentage of the subsequences of URLs of the rest of the original test suite GD GR GL us 1 us 5 GS PL GM us 2 reduced set {us 2, us 6} us 3 GB us 4 us 6 user sessions belonging to next-to-bottom nodes remaining set {us 1, us 3, us 4 us 5} all other user sessions except sessions belonging to next-to-bottom nodes

Results for Next-to-bottom Coverage of Use Cases Hypothesis Metric: loss of coverage of use Results for Next-to-bottom Coverage of Use Cases Hypothesis Metric: loss of coverage of use cases in remaining set by the reduced set Bookstore Result: short sequences present but long sequences are missing

Conclusion for Next-to-bottom Coverage of Use Cases Hypothesis • Long sequences absent but smaller Conclusion for Next-to-bottom Coverage of Use Cases Hypothesis • Long sequences absent but smaller sequences are present in reduced set • reduced set contains more URLs hence may contain other URL sequences absent in remaining set • Moderately supports picking next-tobottom nodes for reduced test suite

Pros and Cons of Our Approach + Results from common subsequences hypothesis support using Pros and Cons of Our Approach + Results from common subsequences hypothesis support using concept analysis for clustering user sessions + Experiments show little coverage loss (tech report) by reduced test suite - Results from next-to-bottom coverage of use cases hypothesis indicate further work needed on heuristic

Future Work • Explore additional heuristics • Additional user session analysis § Useful for Future Work • Explore additional heuristics • Additional user session analysis § Useful for other software engineering tasks