JetBrains / godot-support

Apache License 2.0
385 stars 26 forks source link

Trying to run Tests within Rider links a dead URL as an Error message. #110

Closed naelstrof closed 8 months ago

naelstrof commented 1 year ago

Godot Version: v4.1.1.stable.mono [bd6af8e0e] Godot Support Plugin Version: 2023.2.121 OS: Arch Linux

After installing NUnit, Microsoft.Net.Test.Sdk from nuget, tests are properly detected.

Though trying to run them gives an error messsage, attached below.

It tells me to install a file from https://github.com/van800/godot-demo-projects/tree/net6/mono/dodge_the_creeps/RiderTestRunner Which is a dead link. Copying random RiderTestRunner folders from other branches doesn't fix it.

Test has not run

Last runner error: Please manually put folder with files from https://github.com/van800/godot-demo-projects/tree/net6/mono/dodge_the_creeps/RiderTestRunner to your project.

--- EXCEPTION #1/2 [Exception]
Message = “Please manually put folder with files from https://github.com/van800/godot-demo-projects/tree/net6/mono/dodge_the_creeps/RiderTestRunner to your project.”
ExceptionPath = Root.InnerException
ClassName = System.Exception
HResult = COR_E_EXCEPTION=80131500
Source = JetBrains.ReSharper.Plugins.Godot
StackTraceString = “
  at JetBrains.ReSharper.Plugins.Godot.UnitTesting.GodotCoreTestRunnerHost.StartProcess(ProcessStartInfo startInfo, ITestRunnerContext context) in /mnt/agent/work/d86184d35b2f7761/resharper/src/UnitTesting/GodotCoreTestRunnerHost.cs:line 31
     at JetBrains.ReSharper.UnitTestFramework.Execution.TestRunner.Activation.TemporaryTestRunnerAgentInvoker.StartTestRunner(Int32 port, String agentId, ITestRunnerContext ctx) in StartTestRunner.il:line IL_000D mvid 7A50
     at JetBrains.ReSharper.UnitTestFramework.Execution.TestRunner.Activation.TemporaryTestRunnerAgentInvoker.StartTestRunnerAgent(ITestRunnerContext ctx, CancellationToken ct) in StartTestRunnerAgent.il:line IL_00C4 mvid 7A50
     at JetBrains.ReSharper.UnitTestFramework.Execution.TestRunner.TestRunnerAgentManager.GetExecutionAgent(ITestRunnerExecutionContext context, CancellationToken ct) in GetExecutionAgent.il:line IL_0083 mvid 7A50
     at JetBrains.ReSharper.UnitTestFramework.Execution.TestRunner.TestRunnerRunStrategy.StartTestRunner(IUnitTestRun run, ITestRunnerAdditionalStartupOptions environmentSpecifier, CancellationToken cancelCt, CancellationToken abortCt) in StartTestRunner.il:line IL_008F mvid 7A50
     at JetBrains.ReSharper.UnitTestFramework.Execution.TestRunner.TestRunnerRunStrategy.Run(IUnitTestRun run) in Run.il:line IL_013D mvid 7A50
     at JetBrains.ReSharper.UnitTestFramework.Execution.Launch.UnitTestRun.StartCore(CancellationToken onCancel, CancellationToken onAbort) in StartCore.il:line IL_01E7 mvid 7A50 or StartCore.il:line IL_03B3 mvid 7A50
     at JetBrains.ReSharper.UnitTestFramework.Execution.Launch.UnitTestRun.<>c.<StartCore>b__37_0(ExceptionDispatchInfo e) in UnitTestRun.il:line IL_0000 mvid 7A50
     at JetBrains.Util.Special.GeneralUtil.WithNotNull[T](T item, Action`1 F) in WithNotNull.il:line IL_0016 mvid DB42
     at JetBrains.ReSharper.UnitTestFramework.Execution.Launch.UnitTestRun.StartCore(CancellationToken onCancel, CancellationToken onAbort) in StartCore.il:line IL_01E7 mvid 7A50 or StartCore.il:line IL_03B3 mvid 7A50
     at JetBrains.ReSharper.UnitTestFramework.Execution.Launch.UnitTestRun.Start(CancellationToken onCancel, CancellationToken onAbort) in Start.il:line IL_0182 mvid 7A50
”

--- Outer ---

--- EXCEPTION #2/2 [LoggerException]
Message = “Please manually put folder with files from https://github.com/van800/godot-demo-projects/tree/net6/mono/dodge_the_creeps/RiderTestRunner to your project.”
ExceptionPath = Root
ClassName = JetBrains.Util.LoggerException
InnerException = “Exception #1 at Root.InnerException”
HResult = COR_E_APPLICATION=80131600
StackTraceString = “
  at JetBrains.Util.ILoggerEx.LogException(ILogger this, LoggingLevel level, Exception exception, ExceptionOrigin exceptionOrigin, String comment) in LogException.il:line IL_002E mvid DB42
     at JetBrains.Util.ILoggerEx.Error(ILogger this, Exception exception, ExceptionOrigin origin, String comment) in Error.il:line IL_0000 mvid DB42
     at JetBrains.ReSharper.UnitTestFramework.Execution.Launch.UnitTestRun.Start(CancellationToken onCancel, CancellationToken onAbort) in Start.il:line IL_002C mvid 7A50 or Start.il:line IL_0182 mvid 7A50
     at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine) in Start.il:line IL_0028 mvid 8EF9
     at JetBrains.ReSharper.UnitTestFramework.Execution.Launch.UnitTestRun.Start(CancellationToken onCancel, CancellationToken onAbort) in Start.il:line IL_002C mvid 7A50 or Start.il:line IL_0182 mvid 7A50
     at JetBrains.ReSharper.UnitTestFramework.Execution.Launch.Stages.RunTestsStage.<>c__DisplayClass7_0.<StartRunChained>b__0() in RunTestsStage.il:line IL_0000 mvid 7A50
     at System.Threading.Tasks.Task`1.InnerInvoke() in InnerInvoke.il:line IL_000F mvid 8EF9
     at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state) in RunFromThreadPoolDispatchLoop.il:line IL_0015 mvid 8EF9
     at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread) in ExecuteWithThreadLocal.il:line IL_00A5 mvid 8EF9
     at System.Threading.ThreadPoolWorkQueue.Dispatch() in Dispatch.il:line IL_013F mvid 8EF9
     at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart() in WorkerThreadStart.il:line IL_0067 mvid 8EF9
”

Last launch log file: /home/naelstrof/.cache/JetBrains/Rider2023.2/log/UnitTestLogs/Sessions/2023-09-15-21-05-17-724___f99a332e-40d9-4ff8-8a27-6e4b7887f6b3.log
naelstrof commented 1 year ago

I ended up using the files from this project instead, and they seemingly work great:

https://github.com/geowarin/GodotUnitTests/tree/main/projects

geowarin commented 1 year ago

It would probably be a better user experience if the plugin generated those files for you automatically.

Currently it's not possible for Godot to use external C# scripts (meaning attached to a node) so this is probably why the plugin requires users to have the files in their own project.