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

OpenCover no results. fakexrmeasy #172

Closed
prarthana94 opened this issue Aug 13, 2021 · 21 comments
Closed

OpenCover no results. fakexrmeasy #172

prarthana94 opened this issue Aug 13, 2021 · 21 comments
Labels
waiting for feedback Need feedback or more information

Comments

@prarthana94
Copy link

Installed product versions

  • Visual Studio: [example 2019 Professional]
  • This extension: [example 1.1.141]

Description

I have installed the extension but i cant see that in my VS output tab or any tab please suggest how can i find it .I have installed it from my visual studio as well as from market place both ways it gets installed successfully but when i open it it doesnt show. Please help ASAP.

Side Notes

  • It helps to attach a repro solution so i can test the fix
  • It helps to attach the log (send it to my mailbox if you need todo so privately : [email protected])
  • It helps to attach a screen recoding video of steps to recreate (sometimes a video is worth a thousand words)
  • Please consider giving this project a star and become one of the stagazers

fineCodeCoverage

https://github.com/FortuneN/FineCodeCoverage/stargazers

@tonyhallett
Copy link
Collaborator

I don't have a computer to hand but I think it is View / Other windows / fine code coverage for the report window. The FCC output pane should be present and contains diagnostic information when you run tests from test explorer that result in coverage collection

@tonyhallett
Copy link
Collaborator

Did your work it out ?

@tonyhallett tonyhallett added the waiting for feedback Need feedback or more information label Aug 17, 2021
@prarthana94
Copy link
Author

Yes i can see the extension in the path you provided but it doesnt seem to work somehow , i tested my unit case after that i am seeing in progress in fine code coverage. Can you help in this as what i am doing wrong ?
fineCodeCoverage2

@prarthana94
Copy link
Author

i meant i cant see anything in fine code coverage extension.

@tonyhallett
Copy link
Collaborator

Please post what you see in the FCC Output pane.

@prarthana94
Copy link
Author

fcc output

FCC Coverage output

@tonyhallett
Copy link
Collaborator

That's not the FCC Output Pane.

image

@prarthana94
Copy link
Author

FCC Output Pane

@tonyhallett
Copy link
Collaborator

I need to see all of it.

Is the code you are testing in the test dll ?

@prarthana94
Copy link
Author

sorry my bad here is the full output , i didn't understand your question i am testing it in my unit test project if that answer your question.

Fine Code Coverage : ================================== START ==================================

Fine Code Coverage : Run Coverage Tool (MS.XRM.Plugin.UnitTest)

Fine Code Coverage : OpenCover Run (MS.XRM.Plugin.UnitTest) Arguments
-mergebyhash
-hideskipped:all
-register:path32
"-target:C:\Users\prarthana.a.verma\AppData\Local\FineCodeCoverage\msTestPlatform\16.9.1\tools\net451\Common7\IDE\Extensions\TestPlatform\vstest.console.exe"
"-excludebyfile:**/Migrations/"
"-excludebyattribute:(
.ExcludeFromCodeCoverage)|(.ExcludeFromCodeCoverageAttribute)|(.ExcludeFromCoverage)|(.ExcludeFromCoverageAttribute)|(.GeneratedCode)|(*.GeneratedCodeAttribute)"
"-targetargs:"C:\MyCodes\MS.XRM\MS.XRM.UnitTest\bin\Debug\fine-code-coverage\build-output\MS.XRM.UnitTest.dll" "
"-output:C:\MyCodes\MS.XRM\MS.XRM.UnitTest\bin\Debug\fine-code-coverage\coverage-tool-output\MS.XRM.Plugin.UnitTest.coverage.xml"

Fine Code Coverage : OpenCover Run (MS.XRM.Plugin.UnitTest)
Executing: C:\Users\prarthana.a.verma\AppData\Local\FineCodeCoverage\msTestPlatform\16.9.1\tools\net451\Common7\IDE\Extensions\TestPlatform\vstest.console.exe
Microsoft (R) Test Execution Command Line Tool Version 16.9.1
Copyright (c) Microsoft Corporation. All rights reserved.

Starting test execution, please wait...
2.7359
A total of 1 test files matched the specified pattern.
Passed TestMethod1 [27 ms]
Passed CheckPriorityIsNotHighToLow [6 ms]
Data collector 'UnitTestIsolation' message: No Microsoft .NET applications were launched during the test run. Launch applications from Explorer or a new command prompt after a test case has started. If no .NET application is being tested, disable the Test Impact and IntelliTrace diagnostic data adapters..
Data collector 'UnitTestIsolation' message: No Microsoft .NET applications were launched during the test run. Launch applications from Explorer or a new command prompt after a test case has started. If no .NET application is being tested, disable the Test Impact and IntelliTrace diagnostic data adapters..
Data collector 'UnitTestIsolation' message: No Microsoft .NET applications were launched during the test run. Launch applications from Explorer or a new command prompt after a test case has started. If no .NET application is being tested, disable the Test Impact and IntelliTrace diagnostic data adapters..
Data collector 'UnitTestIsolation' message: No Microsoft .NET applications were launched during the test run. Launch applications from Explorer or a new command prompt after a test case has started. If no .NET application is being tested, disable the Test Impact and IntelliTrace diagnostic data adapters..
Data collector 'UnitTestIsolation' message: No Microsoft .NET applications were launched during the test run. Launch applications from Explorer or a new command prompt after a test case has started. If no .NET application is being tested, disable the Test Impact and IntelliTrace diagnostic data adapters..
Data collector 'UnitTestIsolation' message: No Microsoft .NET applications were launched during the test run. Launch applications from Explorer or a new command prompt after a test case has started. If no .NET application is being tested, disable the Test Impact and IntelliTrace diagnostic data adapters..
Data collector 'UnitTestIsolation' message: No Microsoft .NET applications were launched during the test run. Launch applications from Explorer or a new command prompt after a test case has started. If no .NET application is being tested, disable the Test Impact and IntelliTrace diagnostic data adapters..
Data collector 'UnitTestIsolation' message: No Microsoft .NET applications were launched during the test run. Launch applications from Explorer or a new command prompt after a test case has started. If no .NET application is being tested, disable the Test Impact and IntelliTrace diagnostic data adapters..
Data collector 'UnitTestIsolation' message: No Microsoft .NET applications were launched during the test run. Launch applications from Explorer or a new command prompt after a test case has started. If no .NET application is being tested, disable the Test Impact and IntelliTrace diagnostic data adapters..
Data collector 'UnitTestIsolation' message: No Microsoft .NET applications were launched during the test run. Launch applications from Explorer or a new command prompt after a test case has started. If no .NET application is being tested, disable the Test Impact and IntelliTrace diagnostic data adapters..
Passed TestMethodforCreateOperation [687 ms]
Failed TestMethodforUpdateOperation [275 ms]
Error Message:
Assert.AreEqual failed. Expected:<01-01-2021 00:00:00>. Actual:<04-03-2021 00:00:00>.
Stack Trace:
at MS.XRM.Plugin.UnitTest.CommonTestScenarioUnitTest.TestMethodforUpdateOperation() in C:\MyCodes\MS.XRM\MS.XRM.UnitTest\CommonTestScenarioUnitTest.cs:line 104

Failed testmethod1 [3 ms]
Error Message:
Assert.AreEqual failed. Expected:. Actual:<>.
Stack Trace:
at MS.XRM.Plugin.UnitTest.PluginUnitTests.testmethod1() in C:\MyCodes\MS.XRM\MS.XRM.UnitTest\PreCaseResolutionUnitTest.cs:line 93

Passed TestIfApprovalTaskExist [141 ms]
Passed TestWhetherApprovalTaskDoesntExist [315 ms]
Passed TestNoOfReassign [2 ms]
Failed TestIfRecordGetsAssignToUserOrTeam [7 ms]
Error Message:
Test method MS.XRM.UnitTest.RestrictRecordAssignmentUnitTest+RetrictRecordAssignmentTestCase.TestIfRecordGetsAssignToUserOrTeam threw exception:
System.InvalidOperationException: The Id property must not be empty
Stack Trace:
at FakeXrmEasy.XrmFakedContext.ValidateEntity(Entity e)
at FakeXrmEasy.XrmFakedContext.AddEntity(Entity e)
at FakeXrmEasy.XrmFakedContext.AddEntityWithDefaults(Entity e, Boolean clone, Boolean usePluginPipeline)
at FakeXrmEasy.XrmFakedContext.Initialize(IEnumerable`1 entities)
at MS.XRM.UnitTest.RestrictRecordAssignmentUnitTest.RetrictRecordAssignmentTestCase.TestIfRecordGetsAssignToUserOrTeam() in C:\MyCodes\MS.XRM\MS.XRM.UnitTest\RestrictRecordAssignmentUnitTest.cs:line 62

Failed TestIfCloseTypeIsSetToUser [13 ms]
Error Message:
Assert.AreEqual failed. Expected:<0>. Actual:<(null)>.
Stack Trace:
at MS.XRM.UnitTest.SetTaskCloseTypeAsUserUnitTest.SetTaskCloseTypeUnitTest.TestIfCloseTypeIsSetToUser() in C:\MyCodes\MS.XRM\MS.XRM.UnitTest\SetTaskCloseTypeAsUserUnitTest.cs:line 62

Total tests: 10
Passed: 6
Failed: 4
Total time: 3.6709 Seconds
Committing...
No results, this could be for a number of reasons. The most common reasons are:
1) missing PDBs for the assemblies that match the filter please review the
output file and refer to the Usage guide (Usage.rtf) about filters.
2) the profiler may not be registered correctly, please refer to the Usage
guide and the -register switch.

Test Run Failed.

Fine Code Coverage : ReportGenerator Run Arguments [reporttype:Cobertura]
"-targetdir:C:\MyCodes\MS.XRM\MS.XRM.UnitTest\bin\Debug\fine-code-coverage\coverage-tool-output"
"-reports:C:\MyCodes\MS.XRM\MS.XRM.UnitTest\bin\Debug\fine-code-coverage\coverage-tool-output\MS.XRM.Plugin.UnitTest.coverage.xml"
"-reporttypes:Cobertura"

Fine Code Coverage : ReportGenerator Run [reporttype:Cobertura]
2021-08-17T22:13:30: Arguments
2021-08-17T22:13:30: -targetdir:C:\MyCodes\MS.XRM\MS.XRM.UnitTest\bin\Debug\fine-code-coverage\coverage-tool-output
2021-08-17T22:13:30: -reports:C:\MyCodes\MS.XRM\MS.XRM.UnitTest\bin\Debug\fine-code-coverage\coverage-tool-output\MS.XRM.Plugin.UnitTest.coverage.xml
2021-08-17T22:13:30: -reporttypes:Cobertura
2021-08-17T22:13:31: Writing report file 'C:\MyCodes\MS.XRM\MS.XRM.UnitTest\bin\Debug\fine-code-coverage\coverage-tool-output\Cobertura.xml'
2021-08-17T22:13:31: Report generation took 0.1 seconds

Fine Code Coverage : ReportGenerator Run Arguments [reporttype:HtmlInline_AzurePipelines]
"-targetdir:C:\MyCodes\MS.XRM\MS.XRM.UnitTest\bin\Debug\fine-code-coverage\coverage-tool-output"
"-reports:C:\MyCodes\MS.XRM\MS.XRM.UnitTest\bin\Debug\fine-code-coverage\coverage-tool-output\Cobertura.xml"
"-plugins:c:\users\prarthana.a.verma\appdata\local\microsoft\visualstudio\16.0_f7e84e1a\extensions\dqgigsdb.2es\ReportGeneratorPlugins.dll"
"-reporttypes:FccLight"

Fine Code Coverage : ReportGenerator Run [reporttype:HtmlInline_AzurePipelines]
2021-08-17T22:13:31: Arguments
2021-08-17T22:13:31: -targetdir:C:\MyCodes\MS.XRM\MS.XRM.UnitTest\bin\Debug\fine-code-coverage\coverage-tool-output
2021-08-17T22:13:31: -reports:C:\MyCodes\MS.XRM\MS.XRM.UnitTest\bin\Debug\fine-code-coverage\coverage-tool-output\Cobertura.xml
2021-08-17T22:13:31: -plugins:c:\users\prarthana.a.verma\appdata\local\microsoft\visualstudio\16.0_f7e84e1a\extensions\dqgigsdb.2es\ReportGeneratorPlugins.dll
2021-08-17T22:13:31: -reporttypes:FccLight
2021-08-17T22:13:32: Writing report file 'C:\MyCodes\MS.XRM\MS.XRM.UnitTest\bin\Debug\fine-code-coverage\coverage-tool-output\index.html'
2021-08-17T22:13:32: Report generation took 0.4 seconds

Fine Code Coverage : ================================== DONE ==================================

@tonyhallett
Copy link
Collaborator

There has yet to be an issue created with the output you have provided

Data collector 'UnitTestIsolation' message: No Microsoft .NET applications were launched during the test run. Launch applications from Explorer or a new command prompt after a test case has started. If no .NET application is being tested, disable the Test Impact and IntelliTrace diagnostic data adapters..

This is a coverlet message

No results, this could be for a number of reasons. The most common reasons are:

  1. missing PDBs for the assemblies that match the filter please review the
    output file and refer to the Usage guide (Usage.rtf) about filters.
  2. the profiler may not be registered correctly, please refer to the Usage
    guide and the -register switch.

I did a quick search in coverlet's issues but there was no results.

Can you describe your solution or give me access ?

FCC copies the output to a new folder and runs tests from that - could that be causing an issue ?
e.g bind/Debug/fine-code-coverage/build-output

@prarthana94
Copy link
Author

I can't give you access but I can tell you the scenarios basically there are multiple test cases in one unit test project when I am trying to run one it works fine and run successfully, not sure why this error is coming.

@tonyhallett
Copy link
Collaborator

What technology area is this ?
Are you using Microsoft Fakes ?

@prarthana94
Copy link
Author

No fakexrmeasy

@tonyhallett
Copy link
Collaborator

So in the context of fakexrmeasy does FCC's behaviour of moving the dlls to a new location likely to be the cause of the issue ?

I was incorrect earlier by mentioning Coverlet. It is OpenCover that it providing coverage

You could run OpenCover manually and see if you get results.

Please review the wiki pages on how to use OpenCover and take particular interest in the Usage guide.

It is installed here - C:\Users***\AppData\Local\FineCodeCoverage\openCover

There is a chance that fakexrmeasy is the issue.
If you see this issue OpenCover/opencover#883 which is related to Fakes and not fakexrmeasy.

Both Fakes and OpenCover use the profiling API and as you can imagine things don't always play well.

@prarthana94
Copy link
Author

Okay will try and update

@tonyhallett
Copy link
Collaborator

I personally would run OpenCover manually to see if FCC is the issue.

@tonyhallett
Copy link
Collaborator

@prarthana94 Did you get to the root of the problem ?

@prarthana94
Copy link
Author

@tonyhallett sorry for the late reply but i think the root cause is below error that i am getting in FCC output and i couldnt understand how to run OpenCover manually can you help with any video .

Committing...
No results, this could be for a number of reasons. The most common reasons are:
1) missing PDBs for the assemblies that match the filter please review the
output file and refer to the Usage guide (Usage.rtf) about filters.
2) the profiler may not be registered correctly, please refer to the Usage
guide and the -register switch.

@tonyhallett
Copy link
Collaborator

tonyhallett commented Sep 3, 2021

Yes that is the cause of the error.

These are the arguments for OpenCover

-mergebyhash
-hideskipped:all
-register:path32
"-target:C:\Users\prarthana.a.verma\AppData\Local\FineCodeCoverage\msTestPlatform\16.9.1\tools\net451\Common7\IDE\Extensions\TestPlatform\vstest.console.exe"
"-excludebyfile:**/Migrations/"
"-excludebyattribute:(.ExcludeFromCodeCoverage)|(.ExcludeFromCodeCoverageAttribute)|(.ExcludeFromCoverage)|(.ExcludeFromCoverageAttribute)|(.GeneratedCode)|(*.GeneratedCodeAttribute)"
"-targetargs:"C:\MyCodes\MS.XRM\MS.XRM.UnitTest\bin\Debug\fine-code-coverage\build-output\MS.XRM.UnitTest.dll" "
"-output:C:\MyCodes\MS.XRM\MS.XRM.UnitTest\bin\Debug\fine-code-coverage\coverage-tool-output\MS.XRM.Plugin.UnitTest.coverage.xml"

So cd to C:\Users\prarthana.a.verma\AppData\Local\FineCodeCoverage\openCover\4.7.922
and OpenCover.Console args from above but use the original UnitTest.dll ( replace new lines with a space)

@tonyhallett
Copy link
Collaborator

See #191 (comment) for how another user ran OpenCover directly.

@tonyhallett tonyhallett changed the title Cant found extension in VS Professional 2019 version OpenCover no results. fakexrmeasy Nov 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting for feedback Need feedback or more information
Projects
None yet
Development

No branches or pull requests

2 participants