SlideShare a Scribd company logo
1 of 13
Download to read offline
Muta%on Analysis vs. Code Coverage in 
Automated Assessment of Students’ 
Tes%ng Skills 
Kalle Aaltonen, Petri Ihantola and O2o Seppälä (Splash – ETS’10) 
Aalto University, Finland 
What Do We Do? 
•  Believe in tesGng 
•  Provide programming assignments 
– for hundreds of students per course 
– where students are asked to submit: 
•  Their implementaGon 
•  Unit tests covering their own implementaGon 
– Use Web‐Cat for automated assessment 
•  Grade =  
 our tests passing (%) * student’s tests passing (%) * 
 line or branch coverage of student’s tests   
How Students Test 
three different tests with the same code coverage 
        assertTrue(1 < 2);  
        fibonacci(6); 
assertTrue(fibonacci(6) >= 0); 
assertEquals(8,fibonacci(6)); 
•  Create variaGons automaGcally from the original 
program 
•  Simulate bugs 
•  A good test will catch many of these mutants 
•  Assuming these mutants are really different from the original 
•  We hope this to provide be2er feedback/grading 
•  We used a byte‐code level mutaGon analysis tool 
called Javalanche 
MutaGon Analysis 
•  Create variaGons automaGcally from the original 
program 
•  Simulate bugs 
•  A good test will catch many of these mutants 
•  Assuming these mutants are really different from the original 
•  We hope this to provide be2er feedback/grading 
•  We used a byte‐code level mutaGon analysis tool 
called Javalanche 
MutaGon Analysis 
Int Fib ( int N) { 
    int curr = 1 , prev = 0; 
    for ( int i = 0; i <= N; i++) { 
        int temp = curr ; 
        curr = curr + prev ; 
        prev = temp ; 
    } 
    return prev ; 
}
MutaGon Analysis 
Examples of Mutants 
Int Fib ( int N ) { 
    int curr = 1 , prev =0; 
    for ( int i = 0; I < N; i++ ) { 
        int temp = curr ; 
        curr = curr + prev ; 
        prev = temp ; 
    } 
    return prev ; 
} 
Int Fib ( int N ) { 
    int curr = 0 , prev = 1; 
    for ( int i = 0; i < N; i++ ) { 
        int temp = curr ; 
        curr = curr + prev ; 
        prev = temp ; 
    } 
    return prev ; 
}
Int Fib ( int N ) { 
    int curr = 1 , prev = 0; 
    for ( int i = 1; i <= N; i++ ) { 
        int temp = curr ; 
        curr = curr + prev ; 
        prev = temp ; 
    } 
    return prev ; 
}
Some Results 
0 0.2 0.4 0.6 0.8 1
0
0.2
0.4
0.6
0.8
1
Code coverage
Mutationscore
0 0.2 0.4 0.6 0.8 1
0
0.2
0.4
0.6
0.8
1
Code coverage
Mutationscore
•  Data: BST, Hashing, Disjoint Sets assignments 
•  Most students get full points from the coverage 
•  MutaGon scores more widely distributed 
Some Results 
0 0.2 0.4 0.6 0.8 1
0
0.2
0.4
0.6
0.8
1
Code coverage
Mutationscore
0 0.2 0.4 0.6 0.8 1
0
0.2
0.4
0.6
0.8
1
Code coverage
Mutationscore
•  Data: BST, Hashing, Disjoint Sets assignments 
•  Most students get full points from the coverage 
•  MutaGon scores more widely distributed 
About the Validity of the Results 
40 %
50 %
60 %
70 %
80 %
90 %
100 %
Best Suite
Mut. Score 98,0 %
Random Suite 1
Mut. Score 85,4 %
Random Suite 2
Mut. Score 72,0 %
Worst Suite
Mut. Score 54,8 %
About the Validity of the Results 
40 %
50 %
60 %
70 %
80 %
90 %
100 %
Best Suite
Mut. Score 98,0 %
Random Suite 1
Mut. Score 85,4 %
Random Suite 2
Mut. Score 72,0 %
Worst Suite
Mut. Score 54,8 %
Conclusions 
•  Can be used to pick up suspicious soluGons 
–  High code coverage but low mutaGon score 
•  Reduces the importance of unit  tests wri2en by the 
teacher 
–  Also able to ensure that unspecified  features are  
tested (i.e. specified) 
•  Immediate feedback 
–  When compared to running  
all tests against each soluGon 
•  Complex parts of the code get more a2enGon 
•  Able to give feedback from teacher’s own 
tests 
•  Should be combined to other test adequacy  
metrics 
Future DirecGons 
•  Evaluate in pracGce 
•  Data we analyzed is from a course 
where tradiGonal coverage was used to 
provide feedback from tests. 
•  Testability – Test Adequacy – Correctness 
•  Use source code mutants directly as 
feedback 
Thank You! 
QuesGons, comments? 
petri@cs.hut.fi 
Graphics: 
Vte.Moncho, h2p://www.flickr.com/photos/maniacpictures/  
Don Solo, h2p://www.flickr.com/photos/donsolo/  
licensed under the creaGve commons license 

More Related Content

Similar to Mutation Analysis vs. Code Coverage in Automated Assessment of Students’ Testing Skills

AbarnaJoseBattan_Resume
AbarnaJoseBattan_ResumeAbarnaJoseBattan_Resume
AbarnaJoseBattan_Resume
Aparna Battan
 

Similar to Mutation Analysis vs. Code Coverage in Automated Assessment of Students’ Testing Skills (20)

AbarnaJoseBattan_Resume
AbarnaJoseBattan_ResumeAbarnaJoseBattan_Resume
AbarnaJoseBattan_Resume
 
Advanced Java Testing
Advanced Java TestingAdvanced Java Testing
Advanced Java Testing
 
Google, quality and you
Google, quality and youGoogle, quality and you
Google, quality and you
 
Software testing
Software testingSoftware testing
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
 
Assessing Product Line Derivation Operators Applied to Java Source Code: An E...
Assessing Product Line Derivation Operators Applied to Java Source Code: An E...Assessing Product Line Derivation Operators Applied to Java Source Code: An E...
Assessing Product Line Derivation Operators Applied to Java Source Code: An E...
 
Generating test cases using UML Communication Diagram
Generating test cases using UML Communication Diagram Generating test cases using UML Communication Diagram
Generating test cases using UML Communication Diagram
 
A replication study of the top performing systems in SemEval twitter sentimen...
A replication study of the top performing systems in SemEval twitter sentimen...A replication study of the top performing systems in SemEval twitter sentimen...
A replication study of the top performing systems in SemEval twitter sentimen...
 
Making the Unstable Stable - An Intro To Testing
Making the Unstable Stable - An Intro To TestingMaking the Unstable Stable - An Intro To Testing
Making the Unstable Stable - An Intro To Testing
 
Introduction to JUnit
Introduction to JUnitIntroduction to JUnit
Introduction to JUnit
 
Software testing: an introduction - 2017
Software testing: an introduction - 2017Software testing: an introduction - 2017
Software testing: an introduction - 2017
 
Software testing mtech project in jalandhar
Software testing mtech project in jalandharSoftware testing mtech project in jalandhar
Software testing mtech project in jalandhar
 
Software testing mtech project in ludhiana
Software testing mtech project in ludhianaSoftware testing mtech project in ludhiana
Software testing mtech project in ludhiana
 
JAVA 2013 IEEE DATAMINING PROJECT Comparable entity mining from comparative q...
JAVA 2013 IEEE DATAMINING PROJECT Comparable entity mining from comparative q...JAVA 2013 IEEE DATAMINING PROJECT Comparable entity mining from comparative q...
JAVA 2013 IEEE DATAMINING PROJECT Comparable entity mining from comparative q...
 
Comparable entity mining from comparative questions
Comparable entity mining from comparative questionsComparable entity mining from comparative questions
Comparable entity mining from comparative questions
 
SSBSE 2020 keynote
SSBSE 2020 keynoteSSBSE 2020 keynote
SSBSE 2020 keynote
 
Testing of Object-Oriented Software
Testing of Object-Oriented SoftwareTesting of Object-Oriented Software
Testing of Object-Oriented Software
 
Debug me
Debug meDebug me
Debug me
 
Unit Testng with PHP Unit - A Step by Step Training
Unit Testng with PHP Unit - A Step by Step TrainingUnit Testng with PHP Unit - A Step by Step Training
Unit Testng with PHP Unit - A Step by Step Training
 
Automatic for the People
Automatic for the PeopleAutomatic for the People
Automatic for the People
 

Recently uploaded

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Recently uploaded (20)

Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 

Mutation Analysis vs. Code Coverage in Automated Assessment of Students’ Testing Skills