Generating JUnit test cases Automatically with Evosuite
summary
Automatic generation of JUnit tests claims to push a button and produce runnable suites; the demo uses EvoSuite with genetic algorithms and bytecode instrumentation to mock IO and clock and to evolve inputs. Ran over ~30,000 classes and reports about 70% instruction coverage on average, with many trivial classes reaching 100% and some failing entirely. The tool builds tests that compile and exercise branches but remains research prototype not ready for all production code.
AI-written summary · about
chapters (18)
- 0:00Intro
- 1:53Different Level of Testing
- 2:22Problem Definition
- 7:39Random Testing (RT)
- 10:56Problems?
- 12:30Seeding
- 17:08Search Algorithms (cont.)
- 17:44Search Space
- 18:53Search Operators
- 20:05Fitness Function
- 21:02Heuristics Example
- 22:01Heuristics: Branch Distance
- 23:28Hill Climbing (HC)
- 29:22Solution
- 29:52Bytecode Instrumentation
- 30:19Example: File System
- 34:00Tools
- 35:31Conclusion
related talks
39mRethinking Unit Testing: Automating the Generation of Java
01h 21mEvolutionary Anatomy of Test Automation Code
17mOn the Effectiveness of Modular Testing in EvoSuite
50mFrom jUnit to Mutation-Testing
28mBuilding an automated testing suite...
55mNext-Gen Testing Tools for Java
36mA modern testing tale
35mJunit5: the next gen of testing, don't stay behind
