{"id":18863028,"url":"https://github.com/fdefelici/vs-clove-unit","last_synced_at":"2025-10-03T14:28:11.877Z","repository":{"id":98887654,"uuid":"542124558","full_name":"fdefelici/vs-clove-unit","owner":"fdefelici","description":"CLove-Unit Test Adapter for Visual Studio","archived":false,"fork":false,"pushed_at":"2023-06-23T23:10:17.000Z","size":496,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-30T21:17:47.071Z","etag":null,"topics":["clove-unit","test-adapter","testing","testing-tools","visual-studio"],"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/fdefelici.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-09-27T14:20:15.000Z","updated_at":"2023-07-19T07:26:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"342b8e3f-44e0-4eca-8521-515242a0a28b","html_url":"https://github.com/fdefelici/vs-clove-unit","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fdefelici%2Fvs-clove-unit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fdefelici%2Fvs-clove-unit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fdefelici%2Fvs-clove-unit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fdefelici%2Fvs-clove-unit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fdefelici","download_url":"https://codeload.github.com/fdefelici/vs-clove-unit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239808187,"owners_count":19700440,"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":["clove-unit","test-adapter","testing","testing-tools","visual-studio"],"created_at":"2024-11-08T04:36:28.437Z","updated_at":"2025-10-03T14:28:11.792Z","avatar_url":"https://github.com/fdefelici.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CLove-Unit Test Adapter for Visual Studio\n\n[![version](https://img.shields.io/visual-studio-marketplace/v/fdefelici.vs-clove-unit?color=blue\u0026label=latest)](https://marketplace.visualstudio.com/items?itemName=fdefelici.vs-clove-unit) [![install](https://img.shields.io/visual-studio-marketplace/i/fdefelici.vs-clove-unit?color=light-green)](https://marketplace.visualstudio.com/items?itemName=fdefelici.vs-clove-unit)\n\n\nCLove Unit Test Adapter is a Visual Studio extension providing discovery and execution if C/C++ tests written with [CLove-Unit](https://github.com/fdefelici/clove-unit).\n\n![CLove-Unit Test Explorer](Examples/Images/header.png)\n\n\u003cbr /\u003e\n\n\u003e Still don't know about [CLove-Unit](https://github.com/fdefelici/clove-unit) testing library?\u003cbr /\u003e\n\u003e It's a Single Header Unit Testing library for C/C++ language, which make easy developer life. Give it a try! ;-)\n\n## Features\n* Integrates CLove-Unit library v2.4.X\n* Supports Visual Studio version: 2022 (aka v17.x)\n* Tests discovery/execution for ```Test Explorer```\n* Test console output displayed on test detail panel (only when running a single test)\n* Configuration throught standard ```Run Settings``` files\n* Tests discovery by custom regex  \n* Automation support by ```VSTest.Console.exe```\n \n# Adapter Usage\n## Activation\nBy default, the adapter is in a disabled state. This to prevents discovery mechanism from running on non-CLove-Unit executables. \n\nIn order to activate the adapter:\n1. First, you need to create a *C++ Console Application* Project and implement your tests using `CLove-Unit` library [guidelines and samples](https://github.com/fdefelici/clove-unit). (This adapter doesn't include CLove-Unit library)\n1. Then, add a *Run Settings* configuration for ***CLove-Unit Test Adapter***  (see adapter [Configuration](##configuration))\n1. Finally, select the *Run Settings* file from Visual Studio menu *\"Test -\u003e Configure Run Settings\"* and then run tests from *Test Explorer* (see adapter [Execution](##execution))\n\n## Configuration\nThe Adapter needs that a Run Settings file is defined. The file is expected to have ```.runsettings``` extension (but can have any name, even empty) and placed at Solution level (even in subfolders).\n\n\u003e NOTE: Run Settings is standard way to define test adapter configuration foresees by Visual Studio Test Framework. More details can be found [here](https://learn.microsoft.com/en-us/visualstudio/test/configure-unit-tests-by-using-a-dot-runsettings-file?view=vs-2022).\n\nHere a minimal configuration example:\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n\u003cRunSettings\u003e\n  \n  \u003c!-- Adapter specific tag --\u003e\n  \u003cCLoveUnit\u003e\n    \u003c!-- Select executable whose filename ends with \"Test\" --\u003e\n    \u003cExecNameRegex\u003e.*Test$\u003c/ExecNameRegex\u003e \n  \u003c/CLoveUnit\u003e\n\n\u003c/RunSettings\u003e\n```\n\nHere a Run Settings example with the complete list of settings available for the adapter:\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n\u003cRunSettings\u003e\n\n  \u003cCLoveUnit\u003e\n    \u003cAdapterEnabled\u003etrue\u003c/AdapterEnabled\u003e\n    \u003cDebugEnabled\u003efalse\u003c/DebugEnabled\u003e\n    \u003cExecNameRegex\u003e.*Test$\u003c/ExecNameRegex\u003e\n  \u003c/CLoveUnit\u003e\n\n\u003c/RunSettings\u003e\n```\n\n|Tag|Required|Description|\n|--------|-----------|----------|\n| `CLoveUnit` | yes | Root node for the adapter configuration |\n| `AdapterEnabled` | no | Explicitly enable/disable the adapter {`true`, `false`}. Default is `true`.|\n| `DebugEnabled` | no | Enable/disable debug messages {`true`, `false`}. Default is `false`. |\n| `ExecNameRegex` | yes | Regular expression (C# based) applied to test executable filenames for selecting the ones for tests discovery and execution. |\n\n\n## Execution\nOnce you have your Run Settings file ready:\n1. Just select it once from menu *\"Test -\u003e Configure Run Settings\"* (see image below)\n1. Open the *\"Text Explorer\"* view (if not already opened) fro menu *\"Test -\u003e Test Explorer\"*\n1. Click on Play button of the *\"Test Explorer\"* view (or eventually \"Run All Tests\" from \"Test\" menu)\n\n![CLove-Unit Execution](Examples/Images/select-runsettings.png)\n\n\u003cbr /\u003e\n\n\u003e NOTE: In case Test Adapter doesn't discover any tests or doesn't apply latest Run Settings configuration, try to Clean/Build the test project(s) in order to force *Test Explorer* to update its internal cache, or check if you are using a compatible clove-unit.h version (read more in [Troubleshooting](#troubleshooting) section)\n\n## Troubleshooting\nIn case the adapter fails to discover tests:\n- First, try to `Clean / Build` the test projects(s). This will clear *Test Explorer* caches and force it to discover test from scratch calling this adapter.\n- Second, try to check if `clove-unit.h` version used is compatible with the one supported by the adapter. You can check it on `Visual Studio` `Output window`, selecting `Tests` and you should see a specific message coming from the adapter as shown in the image below.\n\n![CLove-Unit Troubles](Examples/Images/trouble-clove-version.png)\n\n# Example\nA project example is available in the [Examples](./Examples) folder where a CLove-Unit test project is configured with both *minimal* and *full* Run Settings files.\n\n# Changelog\nHistory of changes [here](./CHANGELOG.md).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffdefelici%2Fvs-clove-unit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffdefelici%2Fvs-clove-unit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffdefelici%2Fvs-clove-unit/lists"}