{"id":17787729,"url":"https://github.com/icnocop/azurepipelines.testlogger","last_synced_at":"2025-09-30T05:31:08.637Z","repository":{"id":40328395,"uuid":"161378569","full_name":"icnocop/AzurePipelines.TestLogger","owner":"icnocop","description":"Azure Pipelines logger extension for the Visual Studio Test Platform","archived":false,"fork":false,"pushed_at":"2023-10-17T18:28:01.000Z","size":104,"stargazers_count":18,"open_issues_count":0,"forks_count":9,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-01-04T16:16:57.241Z","etag":null,"topics":["azure","azure-devops","devops","hacktoberfest","vsts"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/icnocop.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2018-12-11T18:47:12.000Z","updated_at":"2024-03-04T13:12:45.000Z","dependencies_parsed_at":"2023-10-15T07:52:23.604Z","dependency_job_id":null,"html_url":"https://github.com/icnocop/AzurePipelines.TestLogger","commit_stats":null,"previous_names":["daveaglick/pipelinestestlogger"],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icnocop%2FAzurePipelines.TestLogger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icnocop%2FAzurePipelines.TestLogger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icnocop%2FAzurePipelines.TestLogger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icnocop%2FAzurePipelines.TestLogger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/icnocop","download_url":"https://codeload.github.com/icnocop/AzurePipelines.TestLogger/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234706163,"owners_count":18874462,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["azure","azure-devops","devops","hacktoberfest","vsts"],"created_at":"2024-10-27T10:12:35.942Z","updated_at":"2025-09-30T05:31:03.340Z","avatar_url":"https://github.com/icnocop.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"Azure Pipelines logger extension for the [Visual Studio Test Platform](https://github.com/microsoft/vstest).\n\n**NuGet**\n* [AzurePipelines.TestLogger](https://www.nuget.org/packages/AzurePipelines.TestLogger)\n\n---\n\n## What Is It?\n\nThis logger extensions allows you to send test results from a `dotnet test` session directly to Azure Pipelines in real-time as the tests are executed. It also talks directly to the Azure DevOps REST API and as a result can better represent your tests using Azure Pipelines conventions over other post-processing methods such as logging to a TRX file and processing with the `PublishTestResults` Azure Pipelines task.\n\n## Usage\n\nIn order for the logger to optionally authenticate against the Azure DevOps API using an access token you'll need to [expose the access token via an environment variable](https://docs.microsoft.com/en-us/azure/devops/pipelines/process/variables?view=vsts\u0026tabs=yaml%2Cbatch#systemaccesstoken) in your Azure Pipelines `.yml` file:\n\n```\n    env:\n      SYSTEM_ACCESSTOKEN: $(System.AccessToken)\n```\n\n### Parameters\n\n| Key                         | Possible Values                                  | Required | Default Value | Description                                                                                                        |\n|-----------------------------|:------------------------------------------------:|:--------:|:-------------:|--------------------------------------------------------------------------------------------------------------------|\n| Verbose                     | True\u003cbr\u003eFalse                                    | False    | False         | Indicates whether or not to output verbose information to the console.                                             |\n| UseDefaultCredentials       | True\u003cbr\u003eFalse                                    | False    | False         | Indicates whether or not to use default credentials to authenticate against the Azure DevOps API.                  |\n| ApiVersion                  | \\{Major}.\\{Minor}[-preview[.\\{ResourceVersion}]] | False    | 5.0           | The value passed to the `api-version` parameter in the query string when communicating with the Azure DevOps API. |\n| GroupTestResultsByClassName | True\u003cbr\u003eFalse                                    | False    | True          | Indicates whether or not to group test results by their class name.                                                |\n\nPass parameters to the logger using the following command line syntax:  \n`--logger AzurePipelines;Verbose=true;UseDefaultCredentials=true`\n\n### Installing Into Your Project\n\n* Add a reference to the [AzurePipelines.TestLogger NuGet package](https://www.nuget.org/packages/AzurePipelines.TestLogger) in your test project\n* Use the following command when running tests\n```\n\u003e dotnet test --test-adapter-path:. --logger:AzurePipelines\n```\n* Test results are automatically reported to the Azure Pipelines CI results\n\n### Using Cake\n\nAn alternative to installing the logger directly into your test project is installing it as a tool in Cake:\n\n```\n#tool \"AzurePipelines.TestLogger\u0026version=1.0.0\"\n```\n\nThen you can specify the logger during test runs when running on your CI server (the following is example code, your Cake build script may look or behave a little differently):\n\n```\nTask(\"Test\")\n    .Description(\"Runs all tests.\")\n    .IsDependentOn(\"Build\")\n    .DoesForEach(GetFiles(\"./tests/*Tests/*.csproj\"), project =\u003e\n    {\n        DotNetCoreTestSettings testSettings = new DotNetCoreTestSettings()\n        {\n            NoBuild = true,\n            NoRestore = true,\n            Configuration = configuration\n        };\n        if (isRunningOnBuildServer)\n        {\n            testSettings.Filter = \"TestCategory!=ExcludeFromBuildServer\";\n            testSettings.Logger = \"AzurePipelines\";\n            testSettings.TestAdapterPath = GetDirectories($\"./tools/AzurePipelines.TestLogger.*/contentFiles/any/any\").First();\n        }\n\n        Information($\"Running tests in {project}\");\n        DotNetCoreTest(MakeAbsolute(project).ToString(), testSettings);\n    })\n    .DeferOnError();\n```\n\n## Limitations\n\nNote that right now, the Azure Pipelines test summary will only show statistics for top-level tests. That's not ideal for a logger that nests results like this one, but the clarity of grouping tests under their fixture is more valuable than listing a correct total in the test summary in my opinion. Thankfully the pass/fail will still \"bubble up\" so even though the summary may show fewer tests than actually exist, it'll still correctly indicate if any tests are failing (which would then require a drill-down to figure out which ones are failing).\n\n[There's an open feature suggestion here for showing all nested tests in the summary](https://developercommunity.visualstudio.com/content/idea/409015/show-all-tests-in-the-hierarchy-in-test-summary.html).\n\n## Credit\n\nThis project is based on [appveyor.testlogger](https://github.com/spekt/appveyor.testlogger) and [xunit](https://github.com/xunit/xunit/blob/master/src/xunit.runner.reporters/VstsReporter.cs).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ficnocop%2Fazurepipelines.testlogger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ficnocop%2Fazurepipelines.testlogger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ficnocop%2Fazurepipelines.testlogger/lists"}