resess / Slicer4J

Slicer4J is an accurate, low-overhead dynamic slicer for Java programs.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Question: Can Slicer4J run on the whole test suite?

Myse1f opened this issue · comments

commented

I read the document and had a glance at the code. I think the analysis have 4 steps:

  • instrument the code
  • run the instrumented code to print the trace
  • analysis the trace above, create tdcg
  • do slicing base on the graph in step3

What I want to know is that whether Slicer4J can record and create tdcg after the whole test suite run. For example, run step 1 to instrument the original code. Then run the test suite (eg. unit test) to record the trace. Finally do slicing base on the trace produced by testsuite. Thus I can re-run step 4 to slice the code on demand.

Now I can see the way to invoke the application is to run the main function or invoke a single junit test. Would the whole test trace analysis cause heavy burden to CPU and Memory?

Thank you very much!

"Would the whole test trace analysis cause heavy burden to CPU and Memory?"

It consumes as much memory as the trace of the executed test suite. So it really depends on the test. The longer the test runs, the more time it takes to generate the graph and more memory is needed to store the graph in memory.