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

Looking to add expecto support #2

Closed
voronoipotato opened this issue Feb 6, 2018 · 13 comments
Closed

Looking to add expecto support #2

voronoipotato opened this issue Feb 6, 2018 · 13 comments

Comments

@voronoipotato
Copy link

voronoipotato commented Feb 6, 2018

Hey Steve, if I were looking to add expecto support to altcover what do you expect the workload would be?

haf/expecto#219

In here I talk about what sort of steps could give us partial support in OpenCover, by leveraging attribute based test tracking, however it would also be nice to track certain methods by name such as runTestsInAssembly
runTestsWithArgs
runTests. Hopefully I can be of use?

@SteveGilham
Copy link
Owner

While test tracking is something on my roadmap in next phase, it's not something I've done a detailed breakdown of yet. Off the top of my head we would need

  1. Adding an indication of what data to gather to the recorder assembly during the instrumentation step alongside the report file location -- this is likely to be the most interesting part of the process, since we can inject arbitrary IL if it's required.
  2. The Visit function would need to look up the call stack based on that information and add what it finds to the in-memory or file-based record
  3. Then the write-to-file step will just add the extra data into the in-memory document

@SteveGilham
Copy link
Owner

The overall test tracking feature, of which this is a special case, is currently in progress. That still means that it'll be ready when it's ready and not before.

@SteveGilham
Copy link
Owner

If you want to live on the bleeding edge, then I have an absolute "meets minimum" that could be taken and tested as of commit 1704e95. You'll need command line parameters --opencover -c=runTestsInAssembly -c=runTestsWithArgs -c=runTests to pick up methods with those names, plus arguments for any attributes you also want to tag; and then use the "runner" mode to invoke the extended coverage gathering. Current limitation is that you have to instrument the test code for coverage in order to also get the extended call tracking instrumentation -- but that will be after I've finished adding test automation for the current state of play.

@SteveGilham
Copy link
Owner

The latest release, 2.0.350 has the customisable --callContext argument to let you specify whatever method or attribute names you wish by way of visit collection.

Have fun!

@SteveGilham SteveGilham added the ready to close Believed addressed, waiting to hear to the contrary label Mar 27, 2018
@SteveGilham
Copy link
Owner

Closing, in the absence of further activity.

@haf
Copy link

haf commented Apr 15, 2018

Was this implemented? It would be awesome to have this support. (I just discovered your project)

@haf
Copy link

haf commented Apr 15, 2018

Seems like @TheAngryByrd got it working haf/expecto#219 (comment)

@TheAngryByrd
Copy link

@haf I'm gonna take a look at integrating #7 into https://github.com/TheAngryByrd/MiniScaffold today

@voronoipotato
Copy link
Author

wow nice! This is really awesome

@SteveGilham SteveGilham removed the ready to close Believed addressed, waiting to hear to the contrary label Jul 22, 2018
@TheAngryByrd
Copy link

Forgot to mention, I added TheAngryByrd/MiniScaffold#85 a while back. Seems to work well.

@SteveGilham
Copy link
Owner

You're welcome.

You are about a dozen releases out of date ATM, though, and, in particular, 3.0.490 contains a ton of bloat from redundant PowerShell core runtimes that are removed in 3.5.xxx -- not to mention the various core functionality bug-fixes in more recent releases.

@TheAngryByrd
Copy link

From the getting started guide, it looks like i don't need https://github.com/TheAngryByrd/MiniScaffold/blob/master/Content/tests/Directory.Build.targets any longer. Does that seem right?

@SteveGilham
Copy link
Owner

That's correct -- not since build 3.0.488, or really, given the screw-up with that release (related to the powershell bloat), since 3.0.490 -- i.e. the one you've been using all along, as it happens

SteveGilham added a commit that referenced this issue Aug 8, 2020
Unhandled exception. System.Runtime.InteropServices.MarshalDirectiveException: Cannot marshal 'parameter #2': Invalid managed/unmanaged type combination (Marshaling to and from COM interface pointers isn't supported).
   at Mono.Cecil.Pdb.SymWriter.CoCreateInstance(Guid& rclsid, Object pUnkOuter, UInt32 dwClsContext, Guid& riid, Object& ppv)
   at Mono.Cecil.Pdb.SymWriter..ctor() in C:\sources\cecil\symbols\pdb\Mono.Cecil.Pdb\SymWriter.cs:line 39
   at Mono.Cecil.Pdb.NativePdbWriterProvider.CreateWriter(ModuleDefinition module, String pdb) in C:\sources\cecil\symbols\pdb\Mono.Cecil.Pdb\PdbHelper.cs:line 81
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants