Questions tagged [randoop]

Randoop is a unit test generator for Java. It automatically creates unit tests for your classes, in JUnit format.

Randoop is a unit test generator for Java. It automatically creates unit tests for your classes, in JUnit format.

More info at https://randoop.github.io/randoop/

42 questions
0
votes
1 answer

Unable to use Randoop testjar

I have a folder containing randoop-all-4.3.0.jar and project.jar. I want to test the entire jar as a whole using java -classpath randoop-all-4.3.0.jar randoop.main.Main gentests --testjar=project.jar but I am getting the following error: Randoop for…
clueless waffle
  • 381
  • 3
  • 10
0
votes
1 answer

Ignoring non-visible class specified via --classlist or --testclass in Randoop?

I am trying to run a class in Randoop for automatic Test case Generation , My randoop is installed in /home/niteshb/Music/randoop-3.0.8 and my Java class is in /home/niteshb/Tests.class and I was trying to execute this with command java -ea…
devbranch
  • 23
  • 1
  • 7
0
votes
1 answer

Randoop Time Limit

Is Randoop --time-limit for spending that time for generating tests for each class or for the entire project? For example if I set --time-limit = 180 for a project for over 100 class, Randoop will spend 180 seconds for all of the classes, or for…
sijal
  • 5
  • 2
0
votes
2 answers

Randoop Maven Plugin

Is there a maven plugin for Randoop, so we can generate tests for a framework (adding Randoop plugin in pom.xml) and use "mvn test" to see the number of generated tests and failures and also getting coverage of generated tests?
sijal
  • 5
  • 2
0
votes
1 answer

Randoop generates tests with same name for all of the classes

I want to generate tests for 200 classes (I have put their classes names in --classlist txt) but Randoop generates RegressionTest0.java to RegressionTestN.java and replaces generated files because they have same name. Is it possible for Randoop to…
sijal
  • 5
  • 2
0
votes
1 answer

Randoop with Kotlin

Is there any way (other than migrating Kotlin code to Java with IntelliJ) to make Randoop work with Kotlin? If not is there any other "official" (well-known, tested, widely used) solution for unit test generating in Kotlin projects?
m.antkowicz
  • 13,268
  • 18
  • 37
0
votes
0 answers

Can randoop generate test making use of user-made JUnit test?

I want to know whether Randoop can make use of already existing (user-made) test cases. I read through user's manual, but I don't think there's any part related to this. I just would like to know whether this is possible or not. Thank you.
dodoyoon
  • 1
  • 2
0
votes
0 answers

Unable to generate test classes with Randoop

Hello everyone I am using Randoop and when I try to generate some test cases I run the command and I get the following error : D:\Progetti\Junit_test\lib>java -classpath…
Hustler885
  • 11
  • 1
  • 3
0
votes
1 answer

Unable to run Randoop on a maven project

Im trying to run Randoop for a java application based out of Maven. The project has been compiled successfully through cmd through G:\javapplic\a12>mvn compile The java files which I wanted to create test on are present on…
0
votes
1 answer

Generate randoop test case for whole package

How to generate randoop testcases for whole java package instead of mentioning all the classes name in classes.txt. And if possible name those tests in accordingly to classNames for which it is being tested.
0
votes
1 answer

Naming Randoop regression tests

I would like to have my regression tests generated by Randoop 4.2 to be named (Something)RandoopTest.java, so I set the command line flag --regression-test-basename=RandoopTest. When I run Randoop, my regression tests all end in RandoopTest0.java…
kc2001
  • 5,008
  • 4
  • 51
  • 92
0
votes
2 answers

Why am I unable to generate code using Randoop where classes of other Jars are involved?

I'm trying to generate Java unit test cases using Randoop. Suppose I've a class named ABC. Inside class ABC, I've instantiated the Logger class of log4j as a field and this field is being accessed by a method. I've listed class ABC in myClasses.txt.…
0
votes
1 answer

How to fix the order of methods inside a test case generated by Randoop?

I want to use Randoop to generate unit test cases for an application which consist of many API functions. I can specify which methods to use to form the tests using methodlist option. But what if this method uses the class fields which have to be…
0
votes
1 answer

Randoop execution error, unable to load class due to exception

The exact error I'm getting is : Error: Unable to load class "MainClass" due to exception: java.lang.NoClassDefFoundError: MainClass (wrong name: thiagodnf/sootparser/example/grocery/MainClass Included is the Zip of the class files, which I…
ff210327
  • 15
  • 5
0
votes
1 answer

Using Randoop To Generate Test Cases (Based on Pre- and Post- Conditions)

I am trying to use Randoop (by following Randoop Manual) to generate test cases based on pre- and post- conditions specification stored in a JSON file. Target program is the following (buggy) Java method. package com.example.math; public class Math…