- Compile
Foo.java
- Invoke Randoop on class
Foo
to generate regression and error test cases (use the option to consider uncaught exceptions as errors) - Try to create another Java class
Bar
that contains an exception-raising branch that is very difficult for Randoop to execute
- Compile
Foo.java
andStack.java
- Use EvoSuite to generate branch-adequate JUnit test suites
- Inspect the generated test cases
- The given skeleton will generate a random Python list of length
LEN
, each element in the random range(MAX
), calledhidden
. - A Euclidean distance based fitness function is provided.
- Write a hillclimbing algorithm that uses the fitness function to retrieve contents of the hidden list, along with the number of spent fitness evaluation.
- Write the AVM algorithm, and compare the number of fitness evaluation spent.
- The template contains the example branches that we saw in the slides.
- Rewrite the function
foo
so that, after each execution, the function updatesappr
andbdist
with approach level and branch distance w.r.t. the target branch (HINT: you can add support functions that implements the branch distance recipe)
- Take the hill climbing algorithm from the Local Search task
- Apply it to the manually instrumented function
foo
- See if we can generate the test data automatically
- Consider what needs to be done if you want to do the instrumentation automatically (using Python
ast
module)