This repository has been archived by the owner on Nov 15, 2021. It is now read-only.
Replies: 1 comment
-
I see you are running inn Release so I would initially check the PDB settings |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi. I am using openCover OpenCover version 4.7.922.0 with xUnit.net Console Runner v2.4.1 to run the test cover report
Here is the the covered code .It is .Net framework 4.6.1 class
`using Xunit;
namespace IConduct.DAL.Tests.DataAdapterTests
{
public class ExtraSettingsTests
{
private const string ConnectionString = "Data Source=qa-db; Initial Catalog = IConductQ1; User Id = sa; Password=+2K20ICcloud+";
[Fact]
public void CanSelectExisting()
{
//Arrange
IExtraSettingsDataAdapter dataAdapter = new DataAdapter(ConnectionString);
I run the following command with the following output
OpenCover.Console.exe -oldstyle -skipautoprops -target:C:\Tools\net472\xunit.console.exe -targetargs:"C:\agent_work\3\s\IConduct.DAL.Tests\bin\Release\IConduct.DAL.Tests.dll -noshadow -verbose -diagnostics" -output:C:\tools\Dal.Tests.xml -register:user -filter:+[]
Executing: C:\Tools\net472\xunit.console.exe
xUnit.net Console Runner v2.4.1 (64-bit Desktop .NET 4.7.2, runtime: 4.0.30319.42000)
Discovering: IConduct.DAL.Tests (app domain = on [no shadow copy], method display = ClassAndMethod, method display options = None)
Discovered: IConduct.DAL.Tests (found 10 test cases)
Starting: IConduct.DAL.Tests (parallel test collections = on, max threads = 8)
IConduct.DAL.Tests.DataAdapterTests.TransactionsTests.CanCheckIfTransactionIsEnded [STARTING]
IConduct.DAL.Tests.DataAdapterTests.InterfacesTests.IsAllowRunOnApiForExistingInterface [STARTING]
IConduct.DAL.Tests.DataAdapterTests.TransactionLogsTests.CanInsertTransactionLog [STARTING]
IConduct.DAL.Tests.DataAdapterTests.ExtraSettingsTests.CanSelectNotExistingPreconfiguredCommand [STARTING]
IConduct.DAL.Tests.DataAdapterTests.TransactionLogsTests.CanInsertTransactionLog [SKIP]
Fails, should be rewritten. Also no Idisposable implementation to to clean up test data
IConduct.DAL.Tests.DataAdapterTests.TransactionsTests.CanCheckIfTransactionIsEnded [SKIP]
Fails, should be rewritten
IConduct.DAL.Tests.DataAdapterTests.TransactionLogsTests.CanInsertTransactionLog [FINISHED] Time: 0s
IConduct.DAL.Tests.DataAdapterTests.TransactionsTests.CanCheckIfTransactionIsEnded [FINISHED] Time: 0s
IConduct.DAL.Tests.DataAdapterTests.TransactionsTests.CanGetTransactionIdBySchedulerTaskId [STARTING]
IConduct.DAL.Tests.DataAdapterTests.TransactionsTests.CanGetTransactionIdBySchedulerTaskId [SKIP]
Fails, should be rewritten
IConduct.DAL.Tests.DataAdapterTests.TransactionsTests.CanGetTransactionIdBySchedulerTaskId [FINISHED] Time: 0s
IConduct.DAL.Tests.DataAdapterTests.UpdateExecutionGroupInterfacesTest.CanUpdateExecutionGroupInterfaces [STARTING]
IConduct.DAL.Tests.DataAdapterTests.UpdateExecutionGroupInterfacesTest.CanUpdateExecutionGroupInterfaces [SKIP]
Must rewrite for ADO.NET
IConduct.DAL.Tests.DataAdapterTests.UpdateExecutionGroupInterfacesTest.CanUpdateExecutionGroupInterfaces [FINISHED] Time: 0s
IConduct.DAL.Tests.DataAdapterTests.ExtraSettingsTests.CanSelectNotExistingPreconfiguredCommand [FINISHED] Time: 0.9778912s
IConduct.DAL.Tests.DataAdapterTests.InterfacesTests.IsAllowRunOnApiForExistingInterface [FINISHED] Time: 0.9783712s
IConduct.DAL.Tests.DataAdapterTests.ExtraSettingsTests.CanSelectNotExisting [STARTING]
IConduct.DAL.Tests.DataAdapterTests.InterfacesTests.IsAllowRunOnApiForNonExistingInterface [STARTING]
IConduct.DAL.Tests.DataAdapterTests.ExtraSettingsTests.CanSelectNotExisting [FINISHED] Time: 0.0059887s
IConduct.DAL.Tests.DataAdapterTests.ExtraSettingsTests.CanSelectExistingPreconfiguredCommand [STARTING]
IConduct.DAL.Tests.DataAdapterTests.InterfacesTests.IsAllowRunOnApiForNonExistingInterface [FINISHED] Time: 0.0061867s
IConduct.DAL.Tests.DataAdapterTests.ExtraSettingsTests.CanSelectExistingPreconfiguredCommand [FINISHED] Time: 0.0060921s
IConduct.DAL.Tests.DataAdapterTests.ExtraSettingsTests.CanSelectExisting [STARTING]
IConduct.DAL.Tests.DataAdapterTests.ExtraSettingsTests.CanSelectExisting [FINISHED] Time: 0.0014762s
Finished: IConduct.DAL.Tests
=== TEST EXECUTION SUMMARY ===
IConduct.DAL.Tests Total: 10, Errors: 0, Failed: 0, Skipped: 4, Time: 61.303s
According to this output my test was covered. But when I view the XML file
I see
IConduct.DAL.Tests.DataAdapterTests.ExtraSettingsTests
100663299
System.Void IConduct.DAL.Tests.DataAdapterTests.ExtraSettingsTests::CanSelectExisting()
And when I convert it with ReportGenerator:
dotnet C:\agent_work_tasks\reportgenerator_be803a55-9253-4895-a525-be570d86f161\4.8.7\tools\netcoreapp2.1\ReportGenerator.dll -reports:C:\agent_work\3\s\Coverage\Dal.Tests.xml -targetdir:C:\tools\CoverageSummary -reporttypes:HtmlInline_AzurePipelines;Cobertura
I get 0 line coverage
image
I also tried to remove -oldstyle as I found in google. It didn't help
Please advice
Beta Was this translation helpful? Give feedback.
All reactions