Knowledge Base > Troubleshooting > Output codes

Output codes

Meaning of Diffblue Cover output codes (reason, error and testability codes).

The possible codes are described below:

C codes

Code Meaning Suggestion
C001 Failed to decode a test. This is an internal error. Please contact Diffblue support.

If you are using DCover, please either contact your account manager or email us at: support@diffblue.com.

If you are using the IntelliJ plugin Professional Edition, please email us at: support@diffblue.com.

If you are using the IntelliJ plugin Community Edition, please use the Community Forum.
C002 Failed to insert a test into the generated test class. This is an internal error. Please contact Diffblue support, as above.
C003 Failed to overwrite the generated test class. This is an internal error. Please contact Diffblue support, as above.

E codes

Code Meaning Suggestion
E001 Method under test is not callable from another class in the same package. Make the method visible to other classes in the package.
E002 Nothing to assert: the constructed class does not have observers (e.g. getters or public fields). Add observers (e.g. getters or public fields) to the class.
E003 Nothing to assert: neither the return value type of the method under test nor the types of its parameters have observers (e.g. getters or public fields).  Add observers (e.g. getters or public fields) to the declaring class of the method under test, its return type or any of its parameter types.
E004 Unable to find any meaningful assertion. Please add observers (e.g. getters or public fields) in the parameter/return class types of the method under test that access or return fields written by the method under test. 

This problem could also happen because Diffblue Cover did not manage to find good inputs for the method under test. Try increasing the value of --fuzzing-iterations.
E005 Unable to load class. Please check that your test runtime classpath is complete; in particular, check that you do not have any dependency exclusions configured.
E006 Unable to load class: static initializer failed. Please check that the class can be loaded without any errors in the environment where you create and run your tests
E007 Unable to instantiate class: no accessible constructor or factory method Provide accessible constructors or factory methods.
E008 Unable to instantiate class containing the method under test. Provide accessible constructors or factory methods.
E009 Unrecoverable runtime error. If you are using DCover, please either contact your account manager or email us at: support@diffblue.com.

If you are using the IntelliJ plugin Professional Edition, please email us at: support@diffblue.com.

If you are using the IntelliJ plugin Community Edition, please use the Community Forum.
E010 Created tests cannot be executed because the class ClassNamePatternFilterUtils was not found on the classpath This generally indicates that there is a version mismatch in the testing framework dependencies which prevents tests from being executed. Class ClassNamePatternFilterUtils was introduced in version 1.7.0 of junit-platform-commons. Make sure the version of junit-jupiter-api is no older than 5.7.0.
E011 Problems in the local build environment have been detected that will prevent Diffblue Cover from validating the generated tests. Please use the validation command (details on this page - Test Validation.
E012 An error occurred when using the build system to execute tests. This will prevent Diffblue Cover from verifying the created tests. There are several possible causes, please see Working with code E012.
E013 Diffblue Cover cannot write tests in the folder x.  Please enable write permission for this folder.
E014 Could not start test generator because x, a required dependency, could not be found. Make sure that all required dependencies are installed in paths where DCover can find them. 
E015 Diffblue Cover tried to download junit-platform-launcher but did not succeed. This will prevent Diffblue Cover from validating the created tests. Please see Working with code E015.
E016 Failed to connect to analysis service. If you are using DCover, please either contact your account manager or email us at: support@diffblue.com.

If you are using the IntelliJ plugin Professional Edition, please email us at: support@diffblue.com.

If you are using the IntelliJ plugin Community Edition, please use the Community Forum.
E017 Failed to retrieve analysis results from analysis service. If you are using DCover, please either contact your account manager or email us at: support@diffblue.com.

If you are using the IntelliJ plugin Professional Edition, please email us at: support@diffblue.com.

If you are using the IntelliJ plugin Community Edition, please use the Community Forum.
E018 Skipped retrieving analysis results from analysis service because retrieving results for a previous method failed. If you are using DCover, please either contact your account manager or email us at: support@diffblue.com.

If you are using the IntelliJ plugin Professional Edition, please email us at: support@diffblue.com.

If you are using the IntelliJ plugin Community Edition, please use the Community Forum.
E019 Failed to create Spring context. If you are using DCover, please either contact your account manager or email us at: support@diffblue.com.

If you are using the IntelliJ plugin Professional Edition, please email us at: support@diffblue.com.

If you are using the IntelliJ plugin Community Edition, please use the Community Forum.

R codes

CodeMeaningSuggestion
R002Nothing to assert: the constructed class doesn’t have observer methods. Observer methods are parameterless, read-only methods that return the state of the class; for instance, getters, size(), toString().Add getter methods to the constructed class.
R003Nothing to assert: the return/parameter types of the method under test don’t have observer methods. Observer methods are parameterless, read-only methods that return the state of the class; for instance, getters, size(), toString().Add observer methods to the parameter/return types of the method.
R004Unable to find any meaningful assertion.Add getter methods in the parameter/return class types of the method under test that access or return fields written by the method under test. This error could also happen because good inputs for the method under test could not be determined.
R005Unable to load class "X". Loading the class failed (probably because it was not present in the classpath), but it is needed to generate the test.Check that your classpath is complete; in particular, check that you do not have any dependency exclusions configured.
R006Unable to load class "X": static initializer failed. The static initializers of the class threw an exception while trying to load it. Diffblue Cover needs to load the class to generate a test.Check that the class can be loaded without any errors in the environment where you create and run your tests.
R007Unable to instantiate class “X”: no accessible constructor or factory method. Diffblue Cover needs to construct an instance of “X” but we could not find any accessible constructors or factory methods.Provide a package-visible constructor or factory method for testing that, ideally, takes no arguments and does not throw, return null or return a subtype.
R008Unable to instantiate class X containing the method under test. Diffblue Cover was not able to instantiate the class using accessible constructors or factory methods. We aborted because the method under test lives in this class, or a nested class.As R007.
R010Timeout while generating the arrange/act section of your test. Generating the arrange/act sections of your test took more than X seconds. This often happens because we ran code in your project which requests user input (System.in), implements a service loop, or runs into an infinite (or very long) loop.N/A
R011Attempt to “X” broke the sandboxing policy. To generate tests we execute your code in a sandboxed environment which, by default, prevents things like overwriting your files or opening network connections. Your code tried to break the current sandboxing policy, so we aborted.N/A
R012User code failed badly by throwing a “X”. When trying to execute some of your code, we received a particularly serious error “X” (an instance of LinkageError or VirtualMachineError). One possible reason is that initializing a class failed due to timeouts or sandboxing at some point, so later instantiation attempts of this class will fail with an error. Stack trace:…This will require debugging why your code caused the error; possible mitigations may include modifying the sandboxing policy or increasing timeouts, or changes to your code to make it easier to test.
R013Unable to generate test inputs not throwing a trivial exception: “X”. We failed to find inputs to the method under test which would NOT lead to throwing of a trivial exception, like NullPointerException or LinkageError.Please see the separate article: Working with code R013.
R014Could not start test generator because “X” could not be found. We could not start the test generator because “X”, which is documented as a requirement for test case generation, could not be found.Make sure that all required dependencies (JDK, …) are installed in paths where Diffblue Cover can find them.
R015Test replay failed. A test was generated but immediately failed one or more assertions, probably because the method under test is stateful or nondeterministic.Try splitting stateful or nondeterministic methods into stateless and deterministic parts where the state or nondeterminism is injected via a parameter.
R016Current JVM 8 does not support the JDK 11 which compiled the project. Diffblue Cover is running on JVM version 8, but the project being analyzed was built with JDK version 11. Diffblue Cover needs to be executed with the same or a more recent Java version that the version with which the project was compiled.Either recompile the project with Java version 8 (or older), or run Diffblue Cover with JVM version 11 (or a more recent Java version). For DCover CLI 3.0 users only, ensure that your JAVA_HOME or the first java executable in your PATH environment variable is the same or a more recent version than Java 11 (the project Java version).
Please note that Java 11.0.7 is NOT supported.
R017Unable to create any tests that do not assert on a thrown exception. If only exception test cases are created for a particular method, tests are then discarded as testing only exceptions is not considered to be valuable test coverage and can provide false confidence.Diffblue Cover could not determine valid inputs for the methods under test. Please ensure factories are added for the input types.
R018Unable to extract input values for a test.If you are using DCover, please either contact your account manager or email us at: support@diffblue.com.

If you are using the IntelliJ plugin Professional Edition, please email us at: support@diffblue.com.

If you are using the IntelliJ plugin Community Edition, please use the Community Forum.
R019The method for which you are trying to generate tests was not called when you recorded the execution of your program.Record your program again and provide program inputs that trigger at least one call for the method.
R020Temporary files were created but not deleted.Ensure that the method under test, or any method called by the method under test, deletes any temporary files created. These must be deleted before the method under test completes.
R021Missing Spring components. In order to generate Spring tests, Diffblue Cover needs several Spring classes and resources on its classpath.Ensure that your Spring project can execute a trivial Spring controller unit test in its test configuration.
R022Writing test on a method belonging to a class that should be mocked.Consider removing the class' prefix from the list of prefixes to be mocked.
R023The test's arrange or act section calls a constructor or static method on a class that should be mocked. Consider removing the classes' prefix from the list of prefixes to be mocked.

T codes

Code Meaning Suggestion
T001 Trivial getter. Trivial getters are not considered valuable to test. Information only.
T002 Trivial setter. Trivial setters are not considered valuable to test. Information only.
T003 Method not callable. The method under test is not callable from another class in the same package. Make the method is not marked private.
T004 Anonymous class. The method under test is in an anonymous inner class. Factor out the anonymous class into a package-visible class.
T005 Trivial constructor. Trivial constructors are not considered valuable to test. Information only.
T006 The method cannot be unit tested because it is a main method. Information only.
T007 Framework configuration callbacks. Certain framework callbacks (e.g. Spring’s InitBinder) should not be tested directly because they have side effects.
T008 The method is private and never called. The method cannot be called from another class in the same package. If this method is called by reflection then annotate it with @SuppressWarnings("unused"). If the method is dead code, remove it from your code base.
T009 The method is declared private or in a private class. It cannot be called from another class in the same package. It will be tested indirectly through other callable methods. If you want to test this method directly, make the method visible to another class in the package.
T010 Abstract or interface methods are not callable. Information only.
T011 The method is annotated @SuppressWarnings ("unused"). This indicates that the method is probably called by reflection. The method will not be tested directly. If you want to test this method directly, then make it accessible (by removing the annotation).

V codes

Code Meaning Suggestion
V000 Success. N/A
V001 Test did not compile. Diffblue Cover removed a test which did not compile. Please contact us with details of your project including the class containing the method under test, dependencies and transitive dependencies in your project, and external dependencies.
V002 Test compiled but did not pass. When verifying the individual test case, Diffblue Cover removed the test because it compiled but did not pass when run. Please contact us with details of your project including the class containing the method under test, dependencies and transitive dependencies in your project, and external dependencies.
V003 Test discarded during validation. The test was removed because its test class failed when running the test validation command. Please see the separate article: Working with code V003.