C++ unit test not run: inconclusive

Answered

I'm trying to use Catch2 for unit testing in my C++ solution. I've followed the steps in their tutorial and everything compiles, but the tests won't run. I get an error that states "Last runner error: Cannot determine Catch library version".

 

There have been similar issues before (especially on ReSharper), but those didn't help.

Here's the log output:

```

01:25:42.958 |E| Cannot determine Catch library version

--- EXCEPTION #1/1 [LoggerException]
Message = “Cannot determine Catch library version”
ExceptionPath = Root
ClassName = JetBrains.Util.LoggerException
HResult = COR_E_APPLICATION=80131600
StackTraceString = “
  bei JetBrains.Util.ILoggerEx.LogMessage(ILogger this, LoggingLevel level, String message)
     bei JetBrains.ReSharper.Feature.Services.Cpp.UnitTesting.Catch.CatchRemoteTaskRunner.RunInternal(IUnitTestRun run)
     bei JetBrains.ReSharper.Feature.Services.Cpp.UnitTesting.Execution.CppTaskRunner.Run(IUnitTestRun run)
     bei JetBrains.ReSharper.Feature.Services.Cpp.UnitTesting.Execution.CppUnitTestRunStrategy.<>c__DisplayClass5_0.<DoRun>b__3()
     bei JetBrains.Util.Logging.Logger.Catch(Action action)
     bei System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
     bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
     bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
     bei System.Threading.ThreadHelper.ThreadStart()

01:25:42.958 |T| Run: 8c17199e-025a-4951-8a32-1e294d915713 >> RunHostController.CleanupAfterRun
01:25:42.958 |T| Run: 8c17199e-025a-4951-8a32-1e294d915713 << RunHostController.CleanupAfterRun
01:25:42.958 |I| Run: 8c17199e-025a-4951-8a32-1e294d915713 - Finished
01:25:42.958 |I| RunTestsStage completed
01:25:42.958 |I| FinishLaunchStage started
01:25:42.959 |I| Finishing launch
01:25:42.959 |W| Element <Scenario: A tuple with w=1.0 is a point> was left pending after its run completion.
01:25:42.962 |I| Launch is finished
01:25:42.962 |I| FinishLaunchStage completed
01:25:42.962 |T| Launch: c58abbe6-b2ff-4379-b05a-1a1d985517b1 >> RunHostController.BeforeLaunchFinished
01:25:42.962 |T| Launch: c58abbe6-b2ff-4379-b05a-1a1d985517b1 << RunHostController.BeforeLaunchFinished

```

0
9 comments

Hello Kebiro,

Thank you for contacting Rider support and reporting this issue to us!
I was not able to reproduce this issue in the release version of Rider 2022.1.2 but reproduced it in Rider 2022.2 EAP 7,8, so it seems like a regression.
I reported this bug to our tracker. It is already fixed and the fix should be available in the next EAP. If you need catch2 to work, I suggest temporarily downgrading Rider to the release 2022.1.2.

If you have this error in the release Rider, please let me know.
Have a nice day!

1

Hello Dmitry,

thanks for filing it. In my case it happens in Rider 2022.1.2 (Build #RD-221.5787.36, built on June 1, 2022). 

 

gtest works for me, so I went for that instead.

0

Hello Kebiro,

Should you encounter the same issue after Rider 2022.2, please let us know.
Have a nice day!

1

Thanks Dmitry, I will do so. You too have a nice day!

0

I am getting this same issue with ReSharper C++ 2022.2.20220729.153331

0

Just updated my Rider version to 2022.1.2 Build #RD-221.5787.36 and the above error does not occur for me anymore.

 

0

Updating catch from ~v1.7 -> ~v2.7 fixed this for me!

1

I'm having this issue in Rider 2023.2, catch version 3.3.1. Is it just me? If anyone can suggest a Rider version which works with a recent catch library then that would be great.

0

Hello Ian,

Please check whether you have the main() method in your test project. You do not need it, remove it.
If you need it and require utilizing your own main method, ensure it is constructed fine.

If that doesn't help, please let me know.

Have a nice day!

0

Please sign in to leave a comment.