IDEA Plugin: Test Generation Fails With Server Error

Just FYI, I’ve installed the IDEA plugin (2021.11.01-community.2021.2 on IDEA 2021.2). Running “Write Tests” on a class does some preparing and indexing then fails with the following error:

11:55:04 Writing tests for: ConvoyEntity.updateValues

11:55:06 **Failed to connect to analysis service:**
Cause: Failed to call newAnalysisRequestMake sure that local firewall settings allow connecting to a service at HOST:PORT.

11:55:06 0 complete and 0 incomplete tests written for method.

Hope you find that useful and good luck with your product.

Best,

Ian Coleman

1 Like

Thanks @ibcoleman - would you be able to post your plugin log from this run?

I have run into same issue. Attaching log file.
cover-plugin.log (143.5 KB)

Thanks @anup_bhore

We will investigate and get back to you as soon as possible

Thanks

Matt @ Diffblue

Hi @anup_bhore - many thanks for reporting this. Could I ask a couple of questions?

  • Could you run the following command and tell me what it outputs:
    D:\workspaces\17.0.7\developer_corner\softwares\jdk\bin\java.exe -version
  • Could you tell me whether this happens every time you try to write tests using the Diffblue plugin? or only the first time?
  • Did you get any other warning either from Windows, or from IntelliJ around memory usage/resource usage?

Many thanks!
Chris.

Here’s the output of the command -

openjdk version "11.0.1" 2018-10-16
OpenJDK Runtime Environment 18.9 (build 11.0.1+13)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.1+13, mixed mode)

This happens every time.
There were errors related to missing jars and unsupported jars but after adding those, I did not receive any error for memory usage or any windows warnings.

Thanks for confirming those. Could you just clarify a bit when you say ‘There were errors related to missing jars and unsupported jars’ - can you remember which those were? Were they Cover jars, or do you mean project dependencies?

The errors were for project dependencies.

Hi Anup,

We are not entirely sure why this release is producing this error for you, but we are continuing to debug this and will be adding some additional logging into the next release. In the meantime, it may be worth trying one of our older releases because there are a couple of changes since that might be causing this error. I’d suggest trying our 2021.12.02 release, which can be downloaded from here (do not unzip the file though!):

https://release.diffblue.com/2021.12.02/0e4ce9153d4ec4385e29982d19157af77da882a5/1591832446/diffblue-cover-ij-2021.12.02-community-2021.2.zip

Instructions for installing the plugin from a downloaded ZIP file are here: Getting Started with the Diffblue Cover Plugin for IntelliJ | Diffblue Docs

Do let us know how you get on with that version, and we’ll do our best to help.

Best wishes,
Chris.

Thanks @chrryd . The older version of plugin is working. I am now getting some other warnings/errors but those are related to my codebase.

That’s great to hear, and thanks for letting me know. We’ll continue debugging at our end, now that we know which version the error occurs in.