BERT: BEhavioral Regression Testing Alessandro (Alex) Orso Tao Xie School of CS -- College of Computing Department of Computer Science Georgia Institute of Technology North Carolina State University http://www.cc.gatech.edu/~orso/ http://people.engr.ncsu.edu/txie/ Partially supported by : NSF, DHS, and US Air Force
[...] the outage was due to an upgrade of the company’s Web site [...]
-- Greg Kroah-Hartman keynote on the Linux kernel at OLS 2006
Regression Testing Process and Issues Test suite T Program P
Regression Testing Process and Issues Test suite T Program P Program P'
Regression Testing Process and Issues ? Test suite T Program P Program P'
Regression Testing Process and Issues Test suite T
Regression Testing Process and Issues T e s t - s u i t e Test suite Tval m a i n t e n a n c e Test suite T Obsolete test cases
Regression Testing Process and Issues T e s t - s u i t e Regression Test suite Tval Test suite T' m a i n t e n a n c e test selection Test suite T Obsolete test cases
Regression Testing Process and Issues T e s t - s u i t e Regression Test-suite Test suite Tval Test suite T' Prioritized m a i n t e n a n c e test selection prioritization Test suite T' Test suite T Obsolete test cases
Regression Testing Process and Issues T e s t - s u i t e Regression Test-suite Test suite Tval Test suite T' Prioritized m a i n t e n a n c e test selection prioritization Test suite T' Test suite T augmentation Test-suite Obsolete test cases Test suite Taug
Regression Testing Process and Issues T e s t - s u i t e Regression Test-suite Test suite Tval Test suite T' Prioritized m a i n t e n a n c e test selection prioritization Test suite T' Test suite T augmentation Test-suite Obsolete test cases Redundant test cases Minimized Test-suite test suite Test suite Taug minimization
Regression Testing Process and Issues T e s t - s u i t e Regression Test-suite Test suite Tval Test suite T' Prioritized m a i n t e n a n c e test selection prioritization Test suite T' Test suite T augmentation Test-suite Obsolete test cases Redundant test cases Modified Minimized Test-case Test-suite test suite test suite Test suite Taug manipulation minimization
Regression Testing Process and Issues T e s t - s u i t e Regression Test-suite Test suite Tval Test suite T' Prioritized m a i n t e n a n c e test selection prioritization Test suite T' Test suite T augmentation Test-suite Obsolete test cases Redundant test cases Modified Minimized Test-case Test-suite test suite test suite Test suite Taug manipulation minimization
Outline • Introduction • Our technique • Experience • Conclusion and future work
Outline • Introduction • Our technique • Experience • Conclusion and future work
Outline • Introduction • Our technique • Experience • Conclusion and future work
Traditional regression testing Program P Program P' Test suite T
Traditional regression testing Program P Program P' Test runner & Oracle checker Test suite T
Traditional regression testing Program P Program P' Test runner & Oracle checker Test suite T Regression errors
Traditional class BankAccount { double balance; regression bool deposit(double amount) { testing if (amount > 0.00) { balance = balance + amount; return true; } else { print("negative amount"); return false; } } Program P Program P' bool withdraw(double amount) { if (amount <= 0) { print("negative amount"); Test runner return false; & Oracle } checker if (balance < 0) print("account overdraft"); return false; Test suite T } balance = balance - amount; Regression errors return true; } }
class BankAccount { double balance; bool deposit(double amount) { if (amount > 0.00) { balance = balance + amount; return true; } else { print("negative amount"); return false; } } bool withdraw(double amount) { if (amount <= 0) { print("negative amount"); return false; } if (balance < 0) print("account overdraft"); return false; } balance = balance - amount; return true; } }
class BankAccount { double balance; bool deposit(double amount) { if (amount > 0.00) { balance = balance + amount; return true; } else { print("negative amount"); return false; } } bool withdraw(double amount) { if (amount <= 0) { print("negative amount"); return false; } if (balance < 0) print("account overdraft"); return false; } balance = balance - amount; return true; } }
class BankAccount { class BankAccount { double balance; double balance; bool isOverdraft; bool deposit(double amount) { bool deposit(double amount) { if (amount > 0.00) { if (amount > 0.00) { balance = balance + amount; balance = balance + amount; return true; return true; } else { } else { print("negative amount"); print("negative amount"); return false; return false; } } } } bool withdraw(double amount) { bool withdraw(double amount) { if (amount <= 0) { if (amount <= 0) { print("negative amount"); print("negative amount"); return false; return false; } } if (balance < 0) if (isOverdraft) { print("account overdraft"); print("account overdraft"); return false; return false; } } balance = balance - amount; balance = balance - amount; if (balance < 0) isOverdraft = true; return true; return true; } } } }
class BankAccount { class BankAccount { double balance; double balance; bool isOverdraft; bool deposit(double amount) { bool deposit(double amount) { if (amount > 0.00) { if (amount > 0.00) { balance = balance + amount; balance = balance + amount; return true; return true; } else { } else { print("negative amount"); print("negative amount"); return false; return false; } } } } bool withdraw(double amount) { bool withdraw(double amount) { if (amount <= 0) { if (amount <= 0) { print("negative amount"); print("negative amount"); return false; return false; } } if (balance < 0) if (isOverdraft) { print("account overdraft"); print("account overdraft"); return false; return false; } } balance = balance - amount; balance = balance - amount; if (balance < 0) isOverdraft = true; return true; return true; } } } }
class BankAccount { class BankAccount { double balance; double balance; bool isOverdraft; bool deposit(double amount) { bool deposit(double amount) { if (amount > 0.00) { if (amount > 0.00) { balance = balance + amount; balance = balance + amount; return true; return true; } else { } else { print("negative amount"); print("negative amount"); return false; return false; } } } } bool withdraw(double amount) { bool withdraw(double amount) { if (amount <= 0) { if (amount <= 0) { print("negative amount"); print("negative amount"); return false; return false; } } if (balance < 0) if (isOverdraft) { print("account overdraft"); print("account overdraft"); return false; return false; } } balance = balance - amount; balance = balance - amount; if (balance < 0) isOverdraft = true; return true; return true; } } } }
class BankAccount { class BankAccount { double balance; double balance; bool isOverdraft; bool deposit(double amount) { bool deposit(double amount) { if (amount > 0.00) { if (amount > 0.00) { balance = balance + amount; balance = balance + amount; return true; return true; } else { } else { print("negative amount"); print("negative amount"); return false; return false; } } } } bool withdraw(double amount) { bool withdraw(double amount) { if (amount <= 0) { if (amount <= 0) { print("negative amount"); print("negative amount"); return false; return false; } } if (balance < 0) if (isOverdraft) { print("account overdraft"); print("account overdraft"); return false; return false; } } balance = balance - amount; balance = balance - amount; if (balance < 0) isOverdraft = true; return true; return true; } } } }
class BankAccount { double balance; bool isOverdraft; bool deposit(double amount) { if (amount > 0.00) { balance = balance + amount; return true; } else { print("negative amount"); return false; } Where is } bool withdraw(double amount) { if (amount <= 0) { the fault? print("negative amount"); return false; } if (isOverdraft) { print("account overdraft"); return false; } balance = balance - amount; if (balance < 0) isOverdraft = true; return true; } }
Recommend
More recommend