Category: Testing

  • TestExtensionsAspire- part 2- execution

    Now the code mans to create commands about running dotnet <test or run> in the current folder of the csproj test project. Things that needed to be solved: 1.    Test Project as NuGet Package The main project (.csproj)  , that will be referenced as a NuGet dependency, it’s not an Aspire project, so it doesn’t…

  • TestExtensionsAspire- part 1 – idea

    I know that Aspire could be used to perform integration test. And this can be achieved by having a test project that references Aspire – see https://learn.microsoft.com/en-us/dotnet/aspire/testing/write-your-first-test?pivots=xunit . However, how about allowing your test project ( even unit test project ) to run under Aspire Host ? Of course, Aspire will reference the test –…

  • Create and running tests- part 4

    I have made a TestWebSite,in .NET Core 3.1,I was also thinking that WebApplicationFactory exists and tutorial like https://docs.microsoft.com/en-us/aspnet/core/test/integration-tests?view=aspnetcore-3.1   it will be easy to test the site. However,I have found the hard way that is not a real server : it does not have the adresses / ports open. Read https://github.com/dotnet/aspnetcore/issues/4892 . So I have made…

  • Code Coverage–part 25

    Install coverlet and report generator dotnet tool install coverlet.console dotnet tool install dotnet-reportgenerator-globaltool   Then dotnet coverlet Infovalutar.sln –target “dotnet” –targetargs “test InfovalutarTest\InfovalutarTest.csproj –configuration release –no-build” –format opencover –exclude “[xunit*]*” dotnet reportgenerator “-reports:coverage.opencover.xml” “-targetdir:coveragereport” “-reporttypes:HTMLInline;HTMLSummary;Badges”   And the result ?No assemblies have been covered. Updating all NuGet packages for the solution  – including a collector…

  • C# integration testing in AzureDevOps with Docker containers– SqlServer and Cachet example

    Every software that we make depends on others. For Stankins,as a general ETL data,it is more important to be tested with real data providers.For example,we may want to take data from Sql Server and send to Cachet . How can we have a SqlServer and a Cachet up and running easy ? The obvious answer…