Skip to content

Running Quickcheck without it being part of a test. #282

@jparsert

Description

@jparsert

I have a scenario where I have a class file (maybe without the source file) and a method and class name of a method/class that is implemented in this class file. With this I have the signature of the method (class constructor) etc. I would like to run this method (if it is static) with quickcheck or instantiate the class with a constructor and run the method (both with quickcheck).

So to summarize, I want to do what the "@Property public void ..." methods do (as described in the tutorial) programmatically, by doing program analysis on class files. That is obtaining required signatures etc. automatically.

Is this possible? And if so, can junit-quickcheck be used for this task?

The idea I have now is: Using reflect and other standard java to get a java.reflect.Method then look at the argument types and generating random values for each of these types using junit-quickcheck, rinse and repeat.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions