allure-csharp icon indicating copy to clipboard operation
allure-csharp copied to clipboard

Support SelectiveRun on ARM processors

Open Peyzzz opened this issue 9 months ago • 2 comments

I'm submitting a ...

  • [ ] bug report
  • [x] feature request
  • [ ] support request => Please do not submit support request here, see note at the top of this template.

What is the current behavior?

Selective Run doesn't work on Macs with M2 processors. dotnet test execute all test from my repo. This is not ok. My problem doesn't reproduce on Windows and MacBook with Intel processors. I attached latest projects Allure.Specflow and Allure.Net.Commons to my project to debug where is a problem.

Allure.SpecFlow.SelectiveRun.AllureSpecFlowPatcher.cs Line(29) try { InjectTestPlanSupport(unitTestRuntimeProvider); } catch (Exception e) { logError(e); }

If the current behavior is a bug, please provide the steps to reproduce and, if possible, a minimal demo of the problem

System.NotImplementedException: The method or operation is not implemented. at HarmonyLib.PatchFunctions.UpdateWrapper(MethodBase original, PatchInfo patchInfo) at HarmonyLib.PatchProcessor.Patch() at HarmonyLib.Harmony.Patch(MethodBase original, HarmonyMethod prefix, HarmonyMethod postfix, HarmonyMethod transpiler, HarmonyMethod finalizer) at Allure.SpecFlowPlugin.SelectiveRun.AllureSpecFlowPatcher.PatchRunnerFactory(Harmony patcher, MethodInfo factoryCandidate) in /Users/blabla/repo/allure-csharp/Allure.SpecFlow/SelectiveRun/AllureSpecFlowPatcher.cs:line 94 at Allure.SpecFlowPlugin.SelectiveRun.AllureSpecFlowPatcher.PatchRunnerFactories(Harmony patcher, IEnumerable1 factoryCandidates) in /Users/blabla/repo/allure-csharp/Allure.SpecFlow/SelectiveRun/AllureSpecFlowPatcher.cs:line 85 at Allure.SpecFlowPlugin.SelectiveRun.AllureSpecFlowPatcher.InjectTestPlanCheckToTestRunner(Harmony patcher) in /Users/blabla/repo/allure-csharp/Allure.SpecFlow/SelectiveRun/AllureSpecFlowPatcher.cs:line 48 at Allure.SpecFlowPlugin.SelectiveRun.AllureSpecFlowPatcher.InjectTestPlanSupport(IUnitTestRuntimeProvider unitTestRuntimeProvider) in /Users/blabla/repo/allure-csharp/Allure.SpecFlow/SelectiveRun/AllureSpecFlowPatcher.cs:line 43 at Allure.SpecFlowPlugin.SelectiveRun.AllureSpecFlowPatcher.EnsureTestPlanSupportInjected(IUnitTestRuntimeProvider unitTestRuntimeProvider, Action1 logError) in /Users/blabla/repo/allure-csharp/Allure.SpecFlow/SelectiveRun/AllureSpecFlowPatcher.cs:line 29

What is the expected behavior?

Tests included in testplan.json should be executed, and the rest skipped.

What is the motivation / use case for changing the behavior?

Maybe there is another way to enable SeleciveRun on MacBooks with ARM processors? It is unclear how long Lib.Harmony>MonoMod will be fixed.

Please tell us about your environment:

  • OS: => MacBook Pro with Apple M2 Pro processor and Sonoma 14.2
  • .NET framework => .NET 8
  • Allure.Specflow version: => 2.12.0
  • Test framework: [email protected]
  • NUnit3TestAdapter 4.5.0

Other information

Related issues: PatchFunctions.UpdateWrapper NotImplementedException on MacOS - Closed Supporting Apple Silicon - Open

Peyzzz avatar May 08 '24 10:05 Peyzzz