Gallio in R# 8.x

I've downloaded the source for Gallio from their github repo and am attempting to get it to work with the most recent R# SDK on nuget (8.2.1158). I got several compile errors in the ReSharperRunner project right away and was able to resolve a few of them. I'm stuck on a few classes, however. In what assemblies would I find the following JetBrains classes (or their 8.x equivalents):

  • TaskAppDomainConfiguration
  • PsiModuleManager
  • PsiManager
  • iPsiModule
  • ImagesBaseAttribute
  • ImagesBase
  • IDeclarationsCache
  • CheckForInterrupt
  • CacheManagerEx
  • CacheManager

I've searched the assemblies in ILSpy and done some google searches, as well, and have not found the droids I'm looking for. Any assistance would be greatly appreciated.

3 comments
Comment actions Permalink

Hi Lance. As far as I'm aware, Gallio is officially dead, and no longer in further development, which is really why the plugin was never updated to ReSharper 8. I would suggest migrating away from Gallio to another testing framework, rather than put time into updating the plugin.

As for your question, those classes don't exist any longer, and were refactored between 7.x and 8.0. As such, some should be fairly easy to replace - IDeclarationsCache, IPsiModule and PsiModuleManager are now available via IPsiServices.Symbols and IPsiServices.Modules. If I remember correctly CheckForInterrupt was just a delegate and became a Func<bool>, or something similar. I'm not sure about CacheManager and CacheManagerEx - try IPsiServices.Caches. TaskAppDomainConfiguration might be more tricky. I believe that class was used by the unit test runner as part of its internal process to start up a new AppDomain. I know this area has changed extensively, so it's going to be hard to give guidance on how to get it working again. I'd suggest taking a look at the xunit test runner plugin for 8.x - https://github.com/xunit/resharper-xunit/tree/master/resharper/src/xunitcontrib.runner.resharper.runner

If I remember correctly, the code for the resharper plugin needs a good clean up - it's been around since at least the ReSharper 6 days, and there are lots of #ifdef's, which make it really awkward to understand and refactor. Again, I'd suggest you migrate your test suite rather than spend time porting the runner for a framework that's no longer in development.

0
Comment actions Permalink

Thanks for the reply, Matt. I am aware of the dead nature of the Gallio framework. We have a ton of unit tests and custom reports based on the Gallio output so I wanted to evaluate the pain of converting all of that versus the pain of making the runner work with R# 8. From your comments, and my relatively short wade through the plugin code, it seems like they may be nearly equivalent. Our project is at a point where we do have some time that can be dedicated to converting to xUnit.net so perhaps that is the better choice.

0
Comment actions Permalink

Personally, I think that's a better plan. You can look at using Structural Search and Replace patterns to help automate the process. You should define a pattern that matches Gallio's test attributes and replaces them with xunit's attributes.

0

Please sign in to leave a comment.