web test repair.pptx

Automated Fixing of Web UI Tests
via Iterative Element Matching
1
Yuanzhang Lin∗
Beihang University
Beijing, China
linyz2020@gmail.com
Guoyao Wen
Huawei Technologies Co., Ltd.
Shenzhen, China
wenguoyao@huawei.com
Xiang Gao
Beihang University
Beijing, China
xiang_gao@buaa.edu.cn
∗This work was primarily undertaken by the author during his internship at Huawei while studying at the
Southern University of Science and Technology.
We greatly appreciate the suggestions and effort provided by Shin Hwei Tan.
ASE 2023
Why do we need automated UI test case repair?
Web
application
Test
cases
Write
Tester
s
Click
2
Click
By.xpath("//a[text()='Admin']")
Why do we need automated UI test case repair?
Web
application
Test
cases
Write
Tester
s
Click
Find the new locator.
Modify the broken tests.
Make sure the
repaired test cases
run correctly.
3
Click
By.xpath("//a[text()='Admin']") By.xpath("//a[text()=‘Rooms']
")
Why do we need automated UI test case repair?
Web
application
Test
cases
Write
Tester
s
Click
Manual test case repair is time-consuming and labor-intensive.
There is a hope for automated tools to assist in repairing test cases.
Find the new locator.
Modify the broken tests.
Make sure the
repaired test cases
run correctly.
4
Click
By.xpath("//a[text()='Admin']") By.xpath("//a[text()=‘Rooms']
")
Why do existing algorithms have insufficient matching accuracy?
driver.findElement(By.xpath("/html/body/form/input[3]")).click();
Thread.sleep(2000);
driver.findElement(By.xpath("//a[text()='Admin']")).click();
....
Assert.assertEquals(driver.findElement(By.xpath("//a[@href='admi
n.php']")).getText(), "Back to Admin");
2
1
3
1
version
1.2.6.1
Part of the broken test case
“DeleteNegativeAreaTest”.
5
3
Why do existing algorithms have insufficient matching accuracy?
driver.findElement(By.xpath("/html/body/form/input[3]")).click();
Thread.sleep(2000);
driver.findElement(By.xpath("//a[text()='Admin']")).click();
....
Assert.assertEquals(driver.findElement(By.xpath("//a[@href='admi
n.php']")).getText(), "Back to Admin");
2
1
3
1
1
version
1.2.6.1
version
1.4.9
1. Visual change (background
color).
2. Text change.
3. Properties change.
Part of the broken test case
“DeleteNegativeAreaTest”.
Self-information:
6
3 3
Part of HTML in the version 1.2.6.1
Part of HTML in the version
1.4.9
Why do existing tools have insufficient matching accuracy?
To improve accuracy ,
SFTM simply uses the
parent node’s properties
to assist in matching the
child nodes.
7
[1] Brisset, Sacha, et al. "SFTM: Fast matching of web pages using Similarity-based Flexible Tree Matching. " Information Systems 112
(2023): 102126.
Part of HTML in the version 1.2.6.1
Part of HTML in the version
1.4.9
the properties of
parent nodes have
also changed
How would a human match these two elements?
1 Match elements with high similarity:
8
Matching elements by
multiple steps.
How would a human match these two elements?
1
2
Match elements with high similarity:
Match the group of three elements because two
elements in this group have already been matched:
9
Matching elements by
multiple steps.
How would a human match these two elements?
1
2
3
“admin.php?day=28;month=01”
Match elements with high similarity:
Match the group of three elements because two
elements in this group have already been matched:
Infer that Admin and Rooms button match because
they have certain similar properties and are
located within the matching region:
10
Matching elements by
multiple steps.
How would a human match these two elements?
 I1: Elements with closer matched
ancestors are more similar.
 I2: Ancestors with more common
leaf elements are more similar.
 I3: Matching elements by multiple
iterations.
Our tool UITESTFIX
based on the following
idea:
11
ancestor
leaf elements
close
r
1 1
2
3
2
We further propose two similarity based on I1 and I2, which will updated
iteratively.
Id Similarity.
The most straightforward similarity metric is
the exact matching of n.id.
To calculate the similarity of text properties,
we use Levenshtein distance.
Property Similarity.
We use TF-IDF to calculate property
similarity, where text, tag and attribute
are used as tokens.
Text Similarity.
01
02
03
Initialize the similarity
matrix.
12
Help Help
Levenshtein distance
Old version New version
TF-IDF
id="chips" id="chips"
Exact
matching
Methodology - Similarity Metrics
13
Closest
matched
ancestors
The length from the
root node element
to the closer
matched ancestors.
Closer matched
ancestors
Matching
relationship
 I1: Elements with closer matched ancestors are more similar.
Methodology - Path Similarity
Region Similarity:
 The proportion of matching
leaf node elements in two
region elements
Old Region Element:
New Region Element:
14
matched
Old leaf node elements:
New leaf node elements:
More matched leaf elements
 I2: Ancestors with more common leaf elements are more similar.
Methodology - Region Similarity
15
Other elements…
Other elements…
I3: Matching elements by multiple iterations.
Methodology - Iterative matching process.
16
1 1
1 1
1
Other elements…
Other elements…
I3: Matching elements by multiple iterations.
Methodology - Iterative matching process.
17
1 1
1 1
1
Other elements…
Other elements…
I3: Matching elements by multiple iterations.
Methodology - Iterative matching process.
18
1 1
1 1
1
2
2
2
2
Other elements…
Other elements…
I3: Matching elements by multiple iterations.
Methodology - Iterative matching process.
19
1 1
1 1
1
2
2
2
2
3
3
Other elements…
Other elements…
The iteration stops at the fourth round since the matching results are no longer
updated.
I3: Matching elements by multiple iterations.
Methodology - Iterative matching process.
Grouping
old
new
Path
Similarity
Region
Similarity
Match Result
Dynamic Repair
GetTopMatch
Id
Similarity
Prop
Simialrity
Text
Similarity
Element Match
Test
Query
Iterative
NoSuchElementException
InvalidElementStateException
Execute the broken action on the matched
element to complete the dynamic repair.
Build the initial similarity matrix.
Iteratively updates similarity.
Outputs the final matching results.
20
Methodology - How does UITESTFIX work?
Evaluation
 UI Match Dataset:  UI Test Dataset:
Effectiveness on Matching Elements. Effectiveness on Repairing UI Tests.
[1] F. Shao, R. Xu, W. Haque, J. Xu, Y. Zhang, W. Yang, Y. Ye, and X. Xiao, “Webevo: taming web application evolution via detecting
semantic structure changes,” in Proceedings of the 30th ACM SIGSOFT International Symposium on Software Testing and Analysis, 2021,
pp. 16–28. 21
Evaluation
Effectiveness on Matching Elements.
22
Publicly
available
web pages.
Industrial
web pages.
Evaluation
 UITESTFIX improved by 16.1% compared to the best existing algorithm.
 With improved accuracy, we believe it is acceptable to take <1s to generate
matching results for each web page.
Effectiveness on Matching Elements.
23
Publicly
available
web pages.
Industrial
web pages.
Evaluation
Effectiveness on Repairing UI Tests.
24
Publicly
available
test
cases.
Industrial
test
cases.
Evaluation
In total, UITESTFIX successfully fixes 113(68%) broken tests, while the best
existing tool only fixes 73(44%) of them.
Effectiveness on Repairing UI Tests.
25
Publicly
available
test
cases.
Industrial
test
cases.
Conclusion
02
A novel iterative matching
algorithm.
We evaluate algorithms on
publicly available and
industrial datasets
26
01
1 sur 26

Recommandé

React patterns par
React patternsReact patterns
React patternsNaimish Verma
17 vues22 diapositives
AN ENVIRONMENT FOR NON-DUPLICATE TEST GENERATION FOR WEB BASED APPLICATION par
AN ENVIRONMENT FOR NON-DUPLICATE TEST GENERATION FOR WEB BASED APPLICATIONAN ENVIRONMENT FOR NON-DUPLICATE TEST GENERATION FOR WEB BASED APPLICATION
AN ENVIRONMENT FOR NON-DUPLICATE TEST GENERATION FOR WEB BASED APPLICATIONecij
44 vues9 diapositives
Algorithm par
AlgorithmAlgorithm
Algorithmnivlayalat
262 vues28 diapositives
Final ppt par
Final pptFinal ppt
Final pptGyandeep Kansal
169 vues22 diapositives
NEr using N-Gram techniqueppt par
NEr using N-Gram techniquepptNEr using N-Gram techniqueppt
NEr using N-Gram techniquepptGyandeep Kansal
287 vues22 diapositives
Indianapolis mule soft_meetup_14_apr_2021-Review a complex Dataweave Transfor... par
Indianapolis mule soft_meetup_14_apr_2021-Review a complex Dataweave Transfor...Indianapolis mule soft_meetup_14_apr_2021-Review a complex Dataweave Transfor...
Indianapolis mule soft_meetup_14_apr_2021-Review a complex Dataweave Transfor...ikram_ahamed
303 vues33 diapositives

Contenu connexe

Similaire à web test repair.pptx

How AI Helps Students Solve Math Problems par
How AI Helps Students Solve Math ProblemsHow AI Helps Students Solve Math Problems
How AI Helps Students Solve Math ProblemsAmazon Web Services
616 vues31 diapositives
Exp2003 exl ppt_02-continued par
Exp2003 exl ppt_02-continuedExp2003 exl ppt_02-continued
Exp2003 exl ppt_02-continuedlonetree
411 vues24 diapositives
Server Controls of ASP.Net par
Server Controls of ASP.NetServer Controls of ASP.Net
Server Controls of ASP.NetHitesh Santani
8K vues151 diapositives
2310 b 05 par
2310 b 052310 b 05
2310 b 05Krazy Koder
996 vues26 diapositives
Lab1-android par
Lab1-androidLab1-android
Lab1-androidLilia Sfaxi
530 vues10 diapositives
Multi Similarity Measure based Result Merging Strategies in Meta Search Engine par
Multi Similarity Measure based Result Merging Strategies in Meta Search EngineMulti Similarity Measure based Result Merging Strategies in Meta Search Engine
Multi Similarity Measure based Result Merging Strategies in Meta Search EngineIDES Editor
586 vues8 diapositives

Similaire à web test repair.pptx(20)

Exp2003 exl ppt_02-continued par lonetree
Exp2003 exl ppt_02-continuedExp2003 exl ppt_02-continued
Exp2003 exl ppt_02-continued
lonetree411 vues
Multi Similarity Measure based Result Merging Strategies in Meta Search Engine par IDES Editor
Multi Similarity Measure based Result Merging Strategies in Meta Search EngineMulti Similarity Measure based Result Merging Strategies in Meta Search Engine
Multi Similarity Measure based Result Merging Strategies in Meta Search Engine
IDES Editor586 vues
Web Rec Final Report par weichen
Web Rec Final ReportWeb Rec Final Report
Web Rec Final Report
weichen440 vues
Object Oriented PHP - PART-1 par Jalpesh Vasa
Object Oriented PHP - PART-1Object Oriented PHP - PART-1
Object Oriented PHP - PART-1
Jalpesh Vasa504 vues
Having Fun Building Web Applications (Day 1 Slides) par Clarence Ngoh
Having Fun Building Web Applications (Day 1 Slides)Having Fun Building Web Applications (Day 1 Slides)
Having Fun Building Web Applications (Day 1 Slides)
Clarence Ngoh82 vues
IRJET- Semantics based Document Clustering par IRJET Journal
IRJET- Semantics based Document ClusteringIRJET- Semantics based Document Clustering
IRJET- Semantics based Document Clustering
IRJET Journal14 vues
IRJET- Machine Learning: Survey, Types and Challenges par IRJET Journal
IRJET- Machine Learning: Survey, Types and ChallengesIRJET- Machine Learning: Survey, Types and Challenges
IRJET- Machine Learning: Survey, Types and Challenges
IRJET Journal47 vues
Iisrt zz mamatha par IISRT
Iisrt zz mamathaIisrt zz mamatha
Iisrt zz mamatha
IISRT286 vues
ATAGTR2017 The way to recover the issue faced in IoT regression Testing par Agile Testing Alliance
ATAGTR2017 The way to recover the issue faced in IoT regression TestingATAGTR2017 The way to recover the issue faced in IoT regression Testing
ATAGTR2017 The way to recover the issue faced in IoT regression Testing
computer notes - Linked list inside computer memory par ecomputernotes
computer notes - Linked list inside computer memorycomputer notes - Linked list inside computer memory
computer notes - Linked list inside computer memory
ecomputernotes1.1K vues

Dernier

Generative AI: Shifting the AI Landscape par
Generative AI: Shifting the AI LandscapeGenerative AI: Shifting the AI Landscape
Generative AI: Shifting the AI LandscapeDeakin University
67 vues55 diapositives
Future of AR - Facebook Presentation par
Future of AR - Facebook PresentationFuture of AR - Facebook Presentation
Future of AR - Facebook PresentationRob McCarty
65 vues27 diapositives
"Surviving highload with Node.js", Andrii Shumada par
"Surviving highload with Node.js", Andrii Shumada "Surviving highload with Node.js", Andrii Shumada
"Surviving highload with Node.js", Andrii Shumada Fwdays
58 vues29 diapositives
Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ... par
Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ...Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ...
Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ...ShapeBlue
120 vues17 diapositives
Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ... par
Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ...Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ...
Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ...ShapeBlue
129 vues10 diapositives
Ransomware is Knocking your Door_Final.pdf par
Ransomware is Knocking your Door_Final.pdfRansomware is Knocking your Door_Final.pdf
Ransomware is Knocking your Door_Final.pdfSecurity Bootcamp
98 vues46 diapositives

Dernier(20)

Future of AR - Facebook Presentation par Rob McCarty
Future of AR - Facebook PresentationFuture of AR - Facebook Presentation
Future of AR - Facebook Presentation
Rob McCarty65 vues
"Surviving highload with Node.js", Andrii Shumada par Fwdays
"Surviving highload with Node.js", Andrii Shumada "Surviving highload with Node.js", Andrii Shumada
"Surviving highload with Node.js", Andrii Shumada
Fwdays58 vues
Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ... par ShapeBlue
Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ...Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ...
Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ...
ShapeBlue120 vues
Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ... par ShapeBlue
Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ...Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ...
Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ...
ShapeBlue129 vues
KVM Security Groups Under the Hood - Wido den Hollander - Your.Online par ShapeBlue
KVM Security Groups Under the Hood - Wido den Hollander - Your.OnlineKVM Security Groups Under the Hood - Wido den Hollander - Your.Online
KVM Security Groups Under the Hood - Wido den Hollander - Your.Online
ShapeBlue225 vues
LLMs in Production: Tooling, Process, and Team Structure par Aggregage
LLMs in Production: Tooling, Process, and Team StructureLLMs in Production: Tooling, Process, and Team Structure
LLMs in Production: Tooling, Process, and Team Structure
Aggregage57 vues
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlue par ShapeBlue
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlueCloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlue
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlue
ShapeBlue139 vues
DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti... par ShapeBlue
DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti...DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti...
DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti...
ShapeBlue141 vues
State of the Union - Rohit Yadav - Apache CloudStack par ShapeBlue
State of the Union - Rohit Yadav - Apache CloudStackState of the Union - Rohit Yadav - Apache CloudStack
State of the Union - Rohit Yadav - Apache CloudStack
ShapeBlue303 vues
ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ... par Jasper Oosterveld
ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ...ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ...
ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ...
Business Analyst Series 2023 - Week 4 Session 7 par DianaGray10
Business Analyst Series 2023 -  Week 4 Session 7Business Analyst Series 2023 -  Week 4 Session 7
Business Analyst Series 2023 - Week 4 Session 7
DianaGray10146 vues
Updates on the LINSTOR Driver for CloudStack - Rene Peinthor - LINBIT par ShapeBlue
Updates on the LINSTOR Driver for CloudStack - Rene Peinthor - LINBITUpdates on the LINSTOR Driver for CloudStack - Rene Peinthor - LINBIT
Updates on the LINSTOR Driver for CloudStack - Rene Peinthor - LINBIT
ShapeBlue208 vues
"Node.js Development in 2024: trends and tools", Nikita Galkin par Fwdays
"Node.js Development in 2024: trends and tools", Nikita Galkin "Node.js Development in 2024: trends and tools", Nikita Galkin
"Node.js Development in 2024: trends and tools", Nikita Galkin
Fwdays33 vues
Digital Personal Data Protection (DPDP) Practical Approach For CISOs par Priyanka Aash
Digital Personal Data Protection (DPDP) Practical Approach For CISOsDigital Personal Data Protection (DPDP) Practical Approach For CISOs
Digital Personal Data Protection (DPDP) Practical Approach For CISOs
Priyanka Aash162 vues
Transcript: Redefining the book supply chain: A glimpse into the future - Tec... par BookNet Canada
Transcript: Redefining the book supply chain: A glimpse into the future - Tec...Transcript: Redefining the book supply chain: A glimpse into the future - Tec...
Transcript: Redefining the book supply chain: A glimpse into the future - Tec...
BookNet Canada41 vues

web test repair.pptx

  • 1. Automated Fixing of Web UI Tests via Iterative Element Matching 1 Yuanzhang Lin∗ Beihang University Beijing, China linyz2020@gmail.com Guoyao Wen Huawei Technologies Co., Ltd. Shenzhen, China wenguoyao@huawei.com Xiang Gao Beihang University Beijing, China xiang_gao@buaa.edu.cn ∗This work was primarily undertaken by the author during his internship at Huawei while studying at the Southern University of Science and Technology. We greatly appreciate the suggestions and effort provided by Shin Hwei Tan. ASE 2023
  • 2. Why do we need automated UI test case repair? Web application Test cases Write Tester s Click 2 Click By.xpath("//a[text()='Admin']")
  • 3. Why do we need automated UI test case repair? Web application Test cases Write Tester s Click Find the new locator. Modify the broken tests. Make sure the repaired test cases run correctly. 3 Click By.xpath("//a[text()='Admin']") By.xpath("//a[text()=‘Rooms'] ")
  • 4. Why do we need automated UI test case repair? Web application Test cases Write Tester s Click Manual test case repair is time-consuming and labor-intensive. There is a hope for automated tools to assist in repairing test cases. Find the new locator. Modify the broken tests. Make sure the repaired test cases run correctly. 4 Click By.xpath("//a[text()='Admin']") By.xpath("//a[text()=‘Rooms'] ")
  • 5. Why do existing algorithms have insufficient matching accuracy? driver.findElement(By.xpath("/html/body/form/input[3]")).click(); Thread.sleep(2000); driver.findElement(By.xpath("//a[text()='Admin']")).click(); .... Assert.assertEquals(driver.findElement(By.xpath("//a[@href='admi n.php']")).getText(), "Back to Admin"); 2 1 3 1 version 1.2.6.1 Part of the broken test case “DeleteNegativeAreaTest”. 5 3
  • 6. Why do existing algorithms have insufficient matching accuracy? driver.findElement(By.xpath("/html/body/form/input[3]")).click(); Thread.sleep(2000); driver.findElement(By.xpath("//a[text()='Admin']")).click(); .... Assert.assertEquals(driver.findElement(By.xpath("//a[@href='admi n.php']")).getText(), "Back to Admin"); 2 1 3 1 1 version 1.2.6.1 version 1.4.9 1. Visual change (background color). 2. Text change. 3. Properties change. Part of the broken test case “DeleteNegativeAreaTest”. Self-information: 6 3 3 Part of HTML in the version 1.2.6.1 Part of HTML in the version 1.4.9
  • 7. Why do existing tools have insufficient matching accuracy? To improve accuracy , SFTM simply uses the parent node’s properties to assist in matching the child nodes. 7 [1] Brisset, Sacha, et al. "SFTM: Fast matching of web pages using Similarity-based Flexible Tree Matching. " Information Systems 112 (2023): 102126. Part of HTML in the version 1.2.6.1 Part of HTML in the version 1.4.9 the properties of parent nodes have also changed
  • 8. How would a human match these two elements? 1 Match elements with high similarity: 8 Matching elements by multiple steps.
  • 9. How would a human match these two elements? 1 2 Match elements with high similarity: Match the group of three elements because two elements in this group have already been matched: 9 Matching elements by multiple steps.
  • 10. How would a human match these two elements? 1 2 3 “admin.php?day=28;month=01” Match elements with high similarity: Match the group of three elements because two elements in this group have already been matched: Infer that Admin and Rooms button match because they have certain similar properties and are located within the matching region: 10 Matching elements by multiple steps.
  • 11. How would a human match these two elements?  I1: Elements with closer matched ancestors are more similar.  I2: Ancestors with more common leaf elements are more similar.  I3: Matching elements by multiple iterations. Our tool UITESTFIX based on the following idea: 11 ancestor leaf elements close r 1 1 2 3 2 We further propose two similarity based on I1 and I2, which will updated iteratively.
  • 12. Id Similarity. The most straightforward similarity metric is the exact matching of n.id. To calculate the similarity of text properties, we use Levenshtein distance. Property Similarity. We use TF-IDF to calculate property similarity, where text, tag and attribute are used as tokens. Text Similarity. 01 02 03 Initialize the similarity matrix. 12 Help Help Levenshtein distance Old version New version TF-IDF id="chips" id="chips" Exact matching Methodology - Similarity Metrics
  • 13. 13 Closest matched ancestors The length from the root node element to the closer matched ancestors. Closer matched ancestors Matching relationship  I1: Elements with closer matched ancestors are more similar. Methodology - Path Similarity
  • 14. Region Similarity:  The proportion of matching leaf node elements in two region elements Old Region Element: New Region Element: 14 matched Old leaf node elements: New leaf node elements: More matched leaf elements  I2: Ancestors with more common leaf elements are more similar. Methodology - Region Similarity
  • 15. 15 Other elements… Other elements… I3: Matching elements by multiple iterations. Methodology - Iterative matching process.
  • 16. 16 1 1 1 1 1 Other elements… Other elements… I3: Matching elements by multiple iterations. Methodology - Iterative matching process.
  • 17. 17 1 1 1 1 1 Other elements… Other elements… I3: Matching elements by multiple iterations. Methodology - Iterative matching process.
  • 18. 18 1 1 1 1 1 2 2 2 2 Other elements… Other elements… I3: Matching elements by multiple iterations. Methodology - Iterative matching process.
  • 19. 19 1 1 1 1 1 2 2 2 2 3 3 Other elements… Other elements… The iteration stops at the fourth round since the matching results are no longer updated. I3: Matching elements by multiple iterations. Methodology - Iterative matching process.
  • 20. Grouping old new Path Similarity Region Similarity Match Result Dynamic Repair GetTopMatch Id Similarity Prop Simialrity Text Similarity Element Match Test Query Iterative NoSuchElementException InvalidElementStateException Execute the broken action on the matched element to complete the dynamic repair. Build the initial similarity matrix. Iteratively updates similarity. Outputs the final matching results. 20 Methodology - How does UITESTFIX work?
  • 21. Evaluation  UI Match Dataset:  UI Test Dataset: Effectiveness on Matching Elements. Effectiveness on Repairing UI Tests. [1] F. Shao, R. Xu, W. Haque, J. Xu, Y. Zhang, W. Yang, Y. Ye, and X. Xiao, “Webevo: taming web application evolution via detecting semantic structure changes,” in Proceedings of the 30th ACM SIGSOFT International Symposium on Software Testing and Analysis, 2021, pp. 16–28. 21
  • 22. Evaluation Effectiveness on Matching Elements. 22 Publicly available web pages. Industrial web pages.
  • 23. Evaluation  UITESTFIX improved by 16.1% compared to the best existing algorithm.  With improved accuracy, we believe it is acceptable to take <1s to generate matching results for each web page. Effectiveness on Matching Elements. 23 Publicly available web pages. Industrial web pages.
  • 24. Evaluation Effectiveness on Repairing UI Tests. 24 Publicly available test cases. Industrial test cases.
  • 25. Evaluation In total, UITESTFIX successfully fixes 113(68%) broken tests, while the best existing tool only fixes 73(44%) of them. Effectiveness on Repairing UI Tests. 25 Publicly available test cases. Industrial test cases.
  • 26. Conclusion 02 A novel iterative matching algorithm. We evaluate algorithms on publicly available and industrial datasets 26 01

Notes de l'éditeur

  1. Hello! everyone. I'm yuanzhang lin from beihang university. I'm going to present our work "Automated Fixing of Web UI Tests via Iterative Element Matching". This work is a collaboration between Beihang University , Sustech and Huawei. I greatly appreciate the suggestions and effort provided by my master supervsor Shin Hwei Tan.
  2. Generally, testers write UI test cases for testing a web application. The test case will use the locator to find the element and do action on it.
  3. When the version is updated, some actions will crash because the original locator cannot find the element. The testers needs to find the new locator, use it to replace the crashed locator, and make sure the repaired test cases run correctly.
  4. But manual test case repair is time-consuming and labor-intensive. These is a hope for automated tools to assist in repairing test cases.
  5. There are currently some existing work for UI test cases, and we hope to use an example to explain why existing algorithms have insufficient matching accuracy. This is a part of the broken test case. The test case will click the Admin button in the third step.
  6. However, in the new version, the "Admin" button has changed to the "Rooms" button. Some information of the element, such as visual information, text, and properties, has been changed. For example, the background color of this button changes from light blue to dark blue. Therefore, some exsiting algorithms , such as WATER、 VISTA and WEBEVO, based on these information can not match this element.
  7. To improve accuracy , SFTM simply uses the parent node's attributes to assist in matching the child nodes. In this picture, parent node is the td element, Since the td element in the new version has no properties, the similarity between td elements is very low. So, the parent nodes can not help the these elements to match and SFTM fails to match these elements.
  8. To further improve accuracy, let us first to see how human match these two elements. Firstly, match elements with high similarity, such as the Help element and the Report element.
  9. Secondly, Match the group of three elements because two elements in this group have already been matched.
  10. Finally, infer that these two buttons match because they have certain similar properties and are located in the matching regions. We can find that human match element by multiple steps.
  11. So, Inspired by human matching methods, we proposed our tool UITESTFIX based on the following idea: The first idea is that elements with closer matched ancestors are more similar. The second idea is that ancestors with more common leaf elements are more similar. The third idea is that matching elements by multiple iterations. We further propose two similarity based on I1 and I2, and them will updated iteratively.
  12. Next we will introduce our method UITESTFIX in more detail. At first, to evaluate similarity of two elements , we use Id similarity, Properties Similarity and Text similarity to initialize the similarity matrix.
  13. Beyond these three similarities, we propose two similarities to use matched elements to help the unmatched element. We proposed path similarity based on idea 1. Given the element, we first collect the path from the root node to the target element, and evaluate the similarity of two path. If the elements with closer matched ancestors, them will have higher path similarity.
  14. We proposed region similarity based on idea 2. Region similarity is the proportion of matching leaf node elements in two region elements. The more leaf elements matched in these two region, the higher the similarity of the region elements. For example, in this picture, the search element has been matched and it will increase the similarity of these two region elements.
  15. The core idea of UITESTFIX is the iterative matching process, which is based on the idea 3.
  16. During the first iteration, some highly similar elements successfully matched.
  17. Based on the existing matching results, the similarity of some elements improved. For example, the similarity of this element improved because all of its leaf nodes successfully matched.
  18. Therefore, these is the the matching results after the second iteration .
  19. The second iteration's matching results increased the path similarity of the Admin button and the input element, leading to a successful match. The iteration stops at the fourth round since the matching results are no longer updated.
  20. So, let's look at how UITESTFIX works in totally. When a test case throws an exception during the execution, UITESTFIX will catch this exception. Subsequently, UITESTFIX uses three similarities to build the initial similarity, iteratively updates similarity and outputs the final matching results. UITESTFIX will execute the broken action on the matched element to complete the dynamic repair.
  21. We use two datasets to evaluate algorithms. The UI match dataset is used to evaluate the performance of element matching, while the UI test dataset is used to evaluate the performance of test case repair.
  22. First, we want to know the effectiveness on matching elements. From the experimental results, we can see that UITESTFIX improved by 16.1% compared to the best existing algorithm. With improved accuracy, we believe it is acceptable to take less than one second to generate matching result.
  23. First, we want to know the effectiveness on matching elements. From the experimental results, we can see that UITESTFIX improved by 16.1% compared to the best existing algorithm. With improved accuracy, we believe it is acceptable to take less than one second to generate matching result.
  24. The table shows the effectiveness on repairing UI tests, UITESTFIX successfully fixes 113 broken test cases, while the best existing tool only fixes 73 of them.
  25. The table shows the effectiveness on repairing UI tests, UITESTFIX successfully fixes 113 broken test cases, while the best existing tool only fixes 73 of them.
  26. In conclusion, we proposed UITESTFIX, an approach based on a novel iterative matching algorithm for fixing broken UI tests. Then, we evaluate algorithms on publicly available and industrial datasets. UITESTFIX outperforms four existing approaches in producing more accurate matching and correct repairs. That’s all of my presentation, thank you for your listening.