-
Notifications
You must be signed in to change notification settings - Fork 388
Unable to specify output directory when using VSTest integration? #500
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
Comments
cc: @vagisha-nidhi |
@MarcoRossignoli You can specify the results directory by using |
Great thanks for the answer! |
@MarcoRossignoli that doesn't quite replicate the behavior of the MSBuild integration. The value I found in the original behavior is that you can specify the directory and that is the root directory where the coverage report will be output (this way it would just overwrite the same file, instead of creating a bunch of coverage reports) In this case, using |
@vagisha-nidhi I think that GUID it's by design and it's not removable...right? |
ping @vagisha-nidhi |
@MarcoRossignoli yes, the GUID is by design and its not removable. |
@Stefanie899 I'm going to close after Vagisha's confirmation, this is non something that coverlet can solve, maybe a try on vstest repo. |
Could you explain why that's not "removable?" You have a constructor that takes that directory as a parameter, and in your default ctor, you use Guid.NewGuid().ToString(). While I understand you can't perfectly replicate the behavior of the .MSBuild, why not check to see if a property has been set in the .runsettings for the outputSubDirectory, and let it be something static. Not having any idea what the output directory is going to be makes finding it a little difficult as part of a build process. Even if it's just the ability to make it "/coverage" so that I know exactly where the .xml file will be would fix my issue. |
@DaleyKD I think that the right place to ask for this is vstest repo https://github.com/microsoft/vstest/issues |
@MarcoRossignoli : Please forgive me, I'm not trying to be obtuse. Why can't you just use the other constructor for EDIT: Using this ctor:
and pass in |
That guid is added by vstest platform, that class is only a wrapper that send file to vstest plat, is vstest platform that write file and log to console file path. We have to follow vstest collector "protocol" otherwise future update on vstest plat could conflict with our custom behavior. The same for "console" output, we cannot write to console with simple Console.Writeline, vstest plat orchestrate all workflow here. |
That class doesn't persist file...send only report stream to vstest plat through sink. This is the specs to implement a correct collector. This collector code was written as by MS vstest team not by us. Why not simply update CI and move file where you want at the end of coverage test? |
@DaleyKD this is the place inside vstest where that guid is added to final path That guid is always added at the end |
Coverlet CI is using properties in Directory.Build.props for test results output directory. |
In the MSBuild integration of Coverlet, you can specify the output directory (and/or file) using -p:CoverletOutput='./result/'.
Am I correct that this feature is not available in the VSTest integration? And if so, are there any technical reasons why this can't be implemented into the VSTest integration?
The text was updated successfully, but these errors were encountered: