Posts

Showing posts with the label .net-core

How to have Code Coverage during Execution [on hold]

How to have Code Coverage during Execution [on hold] There are tools that allow to view the code coverage of unit tests. However, I can't find tools out there that can record the code coverage of an already deployed application (for black box tests) which is, to be more specific, in Dot Net Core 2.1+. I'm guessing this would be harder or problematic to do, but I'd like to know, in case I missed a tool in the market, what would be the best approach for developing one that can expose an API for the generated data. UPDATE I'm adding detailed info as the above is not valid. If the following is not enough or proper, please let me know where I can post my question. This is related to a higher design level: SUMMARY Basically I want to apply an automated TIA (Test Impact Analysis) CONTEXT Considering the development Continuous Integration Pipeline for Dotnet core apps, I currently have an automated process of executing automated tests right after deployment in a testing environ...

How do i exit a running console app?

How do i exit a running console app? Sorry for the bad title but i had no idea how to describe it. I am building a console app. The general idea is that it runs permanently (and does some background stuff) when entering such a command: App.exe run I then would like to terminate the app when entering App.exe exit How would you do this? Is there something i need to keep in mind when i want such an behaviour? Or is there a better way? I know that args has all the parameters stored but how would you "find" the other running process and terminate it? As i understand it, when doing run and then exit, i just open the programm two times. So exit needs to close the running process and itself. I assume you want to close all running instances of App.exe run ? And do you want to allow those instances to perform any cleanup before they exit? It's pretty tricky to get right. – rossipedia ♦ Jun 29 at 16:07 ...

SonarScanner can run on linux but no result? (.NET Core 2)

SonarScanner can run on linux but no result? (.NET Core 2) I am trying to use Gitlab CI with SonarQube. It can run successfully under the situation: 1. Ubuntu VM ● docker(SonarQube) 1.13.1 ● sonar-gitlab-plugin 3.0.0 2. Windows 7 local ● gitlab-runner 10 ● SonarQube Scanner for MSBuild 4.3.1 ● .NET Core 2.0 However, it cannot produce results when SonarQube Scanner for MSBuild running on Ubuntu too. click for no-results picture Is it possible to do use the sonar scanner on Ubuntu? Like this: Ubuntu VM ● docker(SonarQube) 1.13.1 ● sonar-gitlab-plugin 3.0.0 ● gitlab-runner 10 ● SonarQube Scanner for MSBuild 4.3.1 ● .NET Core 2.0 I have searched that in this page, it indicated it can. But it's not working on me. https://docs.sonarqube.org/display/SCAN/Install+the+SonarScanner+for+MSBuild By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie...

repeatedly calling HashCode.Combine

repeatedly calling HashCode.Combine Is it correct to repeatedly call HashCode.Combine ? I am trying to create a general extension method to produce an object hashcode from combining the hashcodes of all its properties like this: using System; public static int GetCombinedPropertiesHashCode(this object obj) { int hash = obj.GetType().GetHashCode(); foreach (var property in obj.GetType().GetProperties()) hash=HashCode.Combine(hash, property.GetHashCode()); return hash; } I am not sure if accumulating hashcodes like this will produce a unique hash ? If not how can I do this correctly ? What does HashCode.Combine() do? – Sach 2 days ago HashCode.Combine() it's part of new .NET Core System namespace, can't find the docs ATM – kofifus 2 days ago ...