Diffblue Playground FAQs

What will compile and run?

The example templates provide a good way to get a feel for how Diffblue Playground works. Any top-level class or other type that can have functional methods will compile and run. Here is an example of a simple top-level class:

public class Hello {
  public String sayHello() {
    return "World";

You also need to ensure that your class contains at least one method or a constructor.

Why does Diffblue Playground require methods?

Typically a unit test covers the expected output of a method from the given input to the parameters of that method. Diffblue Cover writes tests as a human would and operates on each method inside of the provided class. Without methods there is no ‘unit’ that can be tested.

Why can’t tests be found for my method?

Diffblue Playground showcases the advantages of using Diffblue Cover to generate unit tests for your code. For complex methods Diffblue Cover requires more time and resources to analyse the code, and these resources are limited in Diffblue Playground.

Which libraries can I import into my code?

We support a stripped down list of the main Java and Javax libraries as follows:

java.io java.rmi java.lang.instrument
java.lang java.rmi.activation java.lang.management
java.lang.annotation java.rmi.dgc java.security.acl
java.lang.invoke java.rmi.registry java.util.prefs
java.lang.ref java.rmi.server javax.annotation.processing
java.lang.reflect java.sql javax.lang.model
java.math javax.rmi.ssl javax.lang.model.element
java.net javax.sql javax.lang.model.type
java.nio javax.transaction javax.lang.model.util
java.nio.channels javax.transaction.xa javax.management
java.nio.channels.spi javax.xml javax.management.loading
java.nio.charset javax.xml.datatype javax.management.modelmbean
java.nio.charset.spi javax.xml.namespace javax.management.monitor
java.nio.file javax.xml.parsers javax.management.openmbean
java.nio.file.attribute javax.xml.stream javax.management.relation
java.nio.file.spi javax.xml.stream.events javax.management.remote
java.security javax.xml.stream.util javax.management.remote.rmi
java.security.cert javax.xml.transform javax.management.timer
java.security.interfaces javax.xml.transform.dom javax.naming
java.security.spec javax.xml.transform.sax javax.naming.directory
java.text javax.xml.transform.stax javax.naming.event
java.text.spi javax.xml.transform.stream javax.naming.ldap
java.time javax.xml.validation javax.naming.spi
java.time.chrono javax.xml.xpath javax.security.auth.kerberos
java.time.format org.w3c.dom javax.security.sasl
java.time.temporal org.w3c.dom.bootstrap javax.sql.rowset
java.time.zone org.w3c.dom.events javax.sql.rowset.serial
java.util org.w3c.dom.ls javax.sql.rowset.spi
java.util.concurrent org.xml.sax javax.tools
java.util.concurrent.atomic org.xml.sax.ext javax.xml.crypto
java.util.concurrent.locks org.xml.sax.helpers javax.xml.crypto.dom
java.util.function   javax.xml.crypto.dsig
java.util.jar   javax.xml.crypto.dsig.dom
java.util.logging   javax.xml.crypto.dsig.keyinfo
java.util.regex   javax.xml.crypto.dsig.spec
java.util.spi   org.ietf.jgss

Why didn’t my code generate any tests?

Diffblue Playground offers a small glimpse at what Diffblue Cover has to offer. In order to provide a free demo Diffblue Playground is limited to a few minutes of analysis time and a handful of method bodies. This can mean for more complex examples we are unable to generate tests. Please contact us if you wish to see what Diffblue Cover can do.

Contact us with any other questions

Name *