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

Fix code to support multiple classes for tests generation #1

Closed

Conversation

gretard
Copy link

@gretard gretard commented Feb 2, 2019

Hello,
Thank you for the very nice infrastructure for tests generation. I have tried to generate tests at once for multiple classes and spotted a few issues. I am submitting my fix which allowed to generate tests when there are multiple classes specified in the benchmarks.list file, for example:

BCEL=
{
  src=/var/benchmarks/projects/bcel-6.0-src/src/main/java
  bin=/var/benchmarks/projects/bcel-6.0-src/target/classes
  classes=(
    org.apache.bcel.classfile.Utility, org.apache.bcel.verifier.structurals.InstConstraintVisitor
  )
  classpath=(
    /var/benchmarks/projects/bcel-6.0-src/target/classes
  )
}

@urueda
Copy link
Collaborator

urueda commented Feb 4, 2019

Thanks for the feedback.
However, I would not recommend the specification of more than one class per benchmark. Notice the focus of the junitcontest project, which is the benchmarking of tools that automatically generate junit tests for Java programs. It is more interesting to know tools performance at class basis. Your fix tough would better suit if we applied the infrastructure for tests generation.

The recommendation for your benchmarks.list file is to generate 2 benchmarks BCEL-1 and BCEL-2, each containing a single class.

Best regards

@gretard
Copy link
Author

gretard commented Feb 4, 2019

Thank you for the reply :) I agree on specification of multiple classes, but this fix does not impact anything if you run using a single class, but just updates code to allow to run tests generation against multiple classes as otherwise if you specified multiple classes - generated tests were deleted and an error on second class on invalid parameter were shown :)

@gretard gretard closed this Feb 4, 2019
@gretard gretard deleted the fix/multi-classes-support branch February 4, 2019 20:30
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

Successfully merging this pull request may close these issues.

2 participants