SlideShare a Scribd company logo
1 of 18
Download to read offline
SpotFlow: Tracking Method
Calls and States at Runtime
Andre Hora
andrehora@dcc.ufmg.br
https://github.com/andrehora/spotflow
1
ICSE 2024
Motivation
Understanding the runtime behavioral aspects of a software system is
fundamental for software engineering, e.g., testing and code comprehension
Despite the importance of runtime analysis, few tools have been created and
made public to support developers extracting information from software execution
[Rabiser et al.]
To overcome these issues, we propose SpotFlow, a tool to ease runtime
analysis in Python
2
SpotFlow in a Nutshell
SpotFlow executes and monitors a Python program, collecting detailed
information on method calls and states
SpotFlow gathers data at the method-level for every method call, such as
executed lines, argument values, return values, and thrown exceptions
SpotFlow can directly detect what classes, methods, test methods, and calls
ran which lines (tracing tools typically work at the file-level and can only detect
what files ran which lines)
SpotFlow can be run from the command line
SpotFlow is publicly available at https://github.com/andrehora/spotflow
3
SpotFlow: Domain Model
4
MonitoredProgram
MonitoredMethod
MethodCall
CallState
ArgState
ReturnState
ExceptionState
VarStateHistory
VarState
SpotFlow: Domain Model
MonitoredProgram
MonitoredMethod
MethodCall
CallState
ArgState
ReturnState
ExceptionState
VarStateHistory
VarState
5
6
application
tests
7
application
tests SpotFlow
SpotFlow objects
8
SpotFlow objects
9
SpotFlow objects
Method calls
and states
10
SpotFlow objects
Executed lines of
code (for each call,
not for each file)
11
SpotFlow objects
Variable values over time
● counter: 0, 1, and 2
● word: “ABC” and “DEF”
SpotFlow: Practical Applications
Support novel empirical studies on runtime analysis
Support the development of novel software testing tools
Support the creation of novel datasets with runtime metrics
12
Support Novel Empirical Studies on Runtime Analysis
Monitoring the Execution of 14K Tests: Methods Tend to Have One Path that
Is Significantly More Executed, FSE (IVR), 2024
We monitor the execution of 14,177 tests from 25 real-world Python systems and
assess 11,425 tested paths from 2,357 methods
We show that one tested path is prevalent
and receives most of the calls, while others
are significantly less executed
13
Support Novel Empirical Studies on Runtime Analysis
Test Polarity: Detecting Positive and Negative Tests, FSE (IVR), 2024
Test polarity is an automated approach to detect
positive and negative tests
We provide a preliminary study to analyze the test
polarity of 2,054 test methods of the Python
Standard Library
We find that most of the analyzed test methods
are negative (88%) and a minority is positive (12%)
14
Support the Development of Novel Software Testing Tools
PathSpotter: Exploring Tested Paths to Discover Missing Tests, FSE (Demo),
2024
PathSpotter is a tool to automatically identify
tested paths and support the detection of
missing tests
It successively guided us in improving the
test suites of relevant systems, including
CPython, Pylint, and Jupyter Client
6 merged PRs, created/updated 32 test
methods, and added 80 novel assertions
15
Support the Creation of Novel Datasets
TestDossier: A Dataset of Tested Values Automatically Extracted from Test
Execution, MSR (Data and Tool), 2024
TestDossier is a dataset of tested values automatically extracted from the
execution of Python tests
We monitored the test suites of 15 Python Standard Libraries. It contains 1,234
distinct variables and 133,169 values
16
Summary
Tool to ease runtime analysis in Python
Collects detailed information on method calls and states
Can directly detect what classes, methods, test methods, and calls ran
which lines
SpotFlow supports:
● Novel empirical studies on runtime analysis
● The development of novel software testing tools
● The creation of novel datasets with runtime metrics
17
SpotFlow: Tracking Method
Calls and States at Runtime
Andre Hora
andrehora@dcc.ufmg.br
https://github.com/andrehora/spotflow
18
ICSE 2024

More Related Content

Similar to SpotFlow: Tracking Method Calls and States at Runtime

OORPT Dynamic Analysis
OORPT Dynamic AnalysisOORPT Dynamic Analysis
OORPT Dynamic Analysislienhard
 
Automated Testing: An Edge Over Manual Software Testing
Automated Testing: An Edge Over Manual Software TestingAutomated Testing: An Edge Over Manual Software Testing
Automated Testing: An Edge Over Manual Software Testingijtsrd
 
How to Actually DO High-volume Automated Testing
How to Actually DO High-volume Automated TestingHow to Actually DO High-volume Automated Testing
How to Actually DO High-volume Automated TestingTechWell
 
Specification and Detection of SOA Antipatterns
Specification and Detection of SOA AntipatternsSpecification and Detection of SOA Antipatterns
Specification and Detection of SOA AntipatternsFrancis Palma
 
The Use of Static Code Analysis When Teaching or Developing Open-Source Software
The Use of Static Code Analysis When Teaching or Developing Open-Source SoftwareThe Use of Static Code Analysis When Teaching or Developing Open-Source Software
The Use of Static Code Analysis When Teaching or Developing Open-Source SoftwareAndrey Karpov
 
Code coverage based test case selection and prioritization
Code coverage based test case selection and prioritizationCode coverage based test case selection and prioritization
Code coverage based test case selection and prioritizationijseajournal
 
Empirical research methods for software engineering
Empirical research methods for software engineeringEmpirical research methods for software engineering
Empirical research methods for software engineeringsarfraznawaz
 
Integrating Model Checking and Procedural Languages
Integrating Model Checking and Procedural LanguagesIntegrating Model Checking and Procedural Languages
Integrating Model Checking and Procedural Languagesbutest
 
OpenTelemetry 101 FTW
OpenTelemetry 101 FTWOpenTelemetry 101 FTW
OpenTelemetry 101 FTWNGINX, Inc.
 
Programming Fundamentals lecture 3
Programming Fundamentals lecture 3Programming Fundamentals lecture 3
Programming Fundamentals lecture 3REHAN IJAZ
 
pertemuan 1 system dev
pertemuan 1 system devpertemuan 1 system dev
pertemuan 1 system devlumaeducation
 
Synthesizing Continuous Deployment Practices in Software Development
Synthesizing Continuous Deployment Practices in Software DevelopmentSynthesizing Continuous Deployment Practices in Software Development
Synthesizing Continuous Deployment Practices in Software DevelopmentAkond Rahman
 
Systems_Overview.ppt
Systems_Overview.pptSystems_Overview.ppt
Systems_Overview.pptssuser1facb81
 

Similar to SpotFlow: Tracking Method Calls and States at Runtime (20)

OORPT Dynamic Analysis
OORPT Dynamic AnalysisOORPT Dynamic Analysis
OORPT Dynamic Analysis
 
Automated Testing: An Edge Over Manual Software Testing
Automated Testing: An Edge Over Manual Software TestingAutomated Testing: An Edge Over Manual Software Testing
Automated Testing: An Edge Over Manual Software Testing
 
How to Actually DO High-volume Automated Testing
How to Actually DO High-volume Automated TestingHow to Actually DO High-volume Automated Testing
How to Actually DO High-volume Automated Testing
 
Debug me
Debug meDebug me
Debug me
 
Specification and Detection of SOA Antipatterns
Specification and Detection of SOA AntipatternsSpecification and Detection of SOA Antipatterns
Specification and Detection of SOA Antipatterns
 
CTFL chapter 06
CTFL chapter 06CTFL chapter 06
CTFL chapter 06
 
Dc35579583
Dc35579583Dc35579583
Dc35579583
 
Testing
TestingTesting
Testing
 
The Use of Static Code Analysis When Teaching or Developing Open-Source Software
The Use of Static Code Analysis When Teaching or Developing Open-Source SoftwareThe Use of Static Code Analysis When Teaching or Developing Open-Source Software
The Use of Static Code Analysis When Teaching or Developing Open-Source Software
 
Code coverage based test case selection and prioritization
Code coverage based test case selection and prioritizationCode coverage based test case selection and prioritization
Code coverage based test case selection and prioritization
 
Empirical research methods for software engineering
Empirical research methods for software engineeringEmpirical research methods for software engineering
Empirical research methods for software engineering
 
Integrating Model Checking and Procedural Languages
Integrating Model Checking and Procedural LanguagesIntegrating Model Checking and Procedural Languages
Integrating Model Checking and Procedural Languages
 
OpenTelemetry 101 FTW
OpenTelemetry 101 FTWOpenTelemetry 101 FTW
OpenTelemetry 101 FTW
 
Programming Fundamentals lecture 3
Programming Fundamentals lecture 3Programming Fundamentals lecture 3
Programming Fundamentals lecture 3
 
pertemuan 1 system dev
pertemuan 1 system devpertemuan 1 system dev
pertemuan 1 system dev
 
Fuzz
FuzzFuzz
Fuzz
 
Synthesizing Continuous Deployment Practices in Software Development
Synthesizing Continuous Deployment Practices in Software DevelopmentSynthesizing Continuous Deployment Practices in Software Development
Synthesizing Continuous Deployment Practices in Software Development
 
System Testing.pptx
System Testing.pptxSystem Testing.pptx
System Testing.pptx
 
pertemuan 1.ppt
pertemuan 1.pptpertemuan 1.ppt
pertemuan 1.ppt
 
Systems_Overview.ppt
Systems_Overview.pptSystems_Overview.ppt
Systems_Overview.ppt
 

Recently uploaded

ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfPower Karaoke
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsMehedi Hasan Shohan
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...aditisharan08
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningVitsRangannavar
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationkaushalgiri8080
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 

Recently uploaded (20)

ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdf
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software Solutions
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learning
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 

SpotFlow: Tracking Method Calls and States at Runtime

  • 1. SpotFlow: Tracking Method Calls and States at Runtime Andre Hora andrehora@dcc.ufmg.br https://github.com/andrehora/spotflow 1 ICSE 2024
  • 2. Motivation Understanding the runtime behavioral aspects of a software system is fundamental for software engineering, e.g., testing and code comprehension Despite the importance of runtime analysis, few tools have been created and made public to support developers extracting information from software execution [Rabiser et al.] To overcome these issues, we propose SpotFlow, a tool to ease runtime analysis in Python 2
  • 3. SpotFlow in a Nutshell SpotFlow executes and monitors a Python program, collecting detailed information on method calls and states SpotFlow gathers data at the method-level for every method call, such as executed lines, argument values, return values, and thrown exceptions SpotFlow can directly detect what classes, methods, test methods, and calls ran which lines (tracing tools typically work at the file-level and can only detect what files ran which lines) SpotFlow can be run from the command line SpotFlow is publicly available at https://github.com/andrehora/spotflow 3
  • 10. 10 SpotFlow objects Executed lines of code (for each call, not for each file)
  • 11. 11 SpotFlow objects Variable values over time ● counter: 0, 1, and 2 ● word: “ABC” and “DEF”
  • 12. SpotFlow: Practical Applications Support novel empirical studies on runtime analysis Support the development of novel software testing tools Support the creation of novel datasets with runtime metrics 12
  • 13. Support Novel Empirical Studies on Runtime Analysis Monitoring the Execution of 14K Tests: Methods Tend to Have One Path that Is Significantly More Executed, FSE (IVR), 2024 We monitor the execution of 14,177 tests from 25 real-world Python systems and assess 11,425 tested paths from 2,357 methods We show that one tested path is prevalent and receives most of the calls, while others are significantly less executed 13
  • 14. Support Novel Empirical Studies on Runtime Analysis Test Polarity: Detecting Positive and Negative Tests, FSE (IVR), 2024 Test polarity is an automated approach to detect positive and negative tests We provide a preliminary study to analyze the test polarity of 2,054 test methods of the Python Standard Library We find that most of the analyzed test methods are negative (88%) and a minority is positive (12%) 14
  • 15. Support the Development of Novel Software Testing Tools PathSpotter: Exploring Tested Paths to Discover Missing Tests, FSE (Demo), 2024 PathSpotter is a tool to automatically identify tested paths and support the detection of missing tests It successively guided us in improving the test suites of relevant systems, including CPython, Pylint, and Jupyter Client 6 merged PRs, created/updated 32 test methods, and added 80 novel assertions 15
  • 16. Support the Creation of Novel Datasets TestDossier: A Dataset of Tested Values Automatically Extracted from Test Execution, MSR (Data and Tool), 2024 TestDossier is a dataset of tested values automatically extracted from the execution of Python tests We monitored the test suites of 15 Python Standard Libraries. It contains 1,234 distinct variables and 133,169 values 16
  • 17. Summary Tool to ease runtime analysis in Python Collects detailed information on method calls and states Can directly detect what classes, methods, test methods, and calls ran which lines SpotFlow supports: ● Novel empirical studies on runtime analysis ● The development of novel software testing tools ● The creation of novel datasets with runtime metrics 17
  • 18. SpotFlow: Tracking Method Calls and States at Runtime Andre Hora andrehora@dcc.ufmg.br https://github.com/andrehora/spotflow 18 ICSE 2024