Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support SelectiveRun on ARM processors #496

Open
1 of 3 tasks
Peyzzz opened this issue May 8, 2024 · 2 comments
Open
1 of 3 tasks

Support SelectiveRun on ARM processors #496

Peyzzz opened this issue May 8, 2024 · 2 comments

Comments

@Peyzzz
Copy link

Peyzzz commented May 8, 2024

I'm submitting a ...

  • bug report
  • 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

@delatrie
Copy link
Contributor

delatrie commented May 8, 2024

Hi, @Peyzzz . Thank you for the report. Unfortunately, it's unlikely I will have enough time to address that in the near future, though.

Consider migrating to Reqnroll, the reboot of SpecFlow by its original author. Allure.Reqnroll doesn't use Harmony to implement Selective run and, thus, should work on ARM.

@Peyzzz
Copy link
Author

Peyzzz commented May 10, 2024

Hi @delatrie,

thank you also for your feedback. It seems that the migration to Allure.Reqnroll solved my problem. Thank you for the hint ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants