Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

does not find line number if the slicing criterion is in the test class #23

Closed
soneyahossain opened this issue Apr 14, 2022 · 1 comment

Comments

@soneyahossain
Copy link

soneyahossain commented Apr 14, 2022

I am trying to generate the dynamic slice for the junit assertions in a test class of the joda-time subject. However, the script throws error such as:

looking for LINENO:324:FILE:org.joda.time.tz.TestBuilder
None
Traceback (most recent call last):
File "run_benchmarks.py", line 207, in
run_slicer4j(project, jar_name, project_arg, extra_libs, sc_file, slice_line)
File "run_benchmarks.py", line 148, in run_slicer4j
line = sc.split(", ")[0]
AttributeError: 'NoneType' object has no attribute 'split'

Is it because the tool does not instrument test classes? Not sure if I am making any mistake, any help would be highly appreciated!

@khaled-e-a
Copy link
Collaborator

At the moment, Slicer4J requires all classes to be in the packaged jar. So you can only slice from either the main classes, or modify the build system to include the test classes into the jar to be sliced.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants