{"id":47111103,"url":"https://github.com/systelab/cpp-gtest-allure-utilities","last_synced_at":"2026-03-12T17:45:57.971Z","repository":{"id":50255939,"uuid":"160388133","full_name":"systelab/cpp-gtest-allure-utilities","owner":"systelab","description":"Allure reporting utilities for Google Test","archived":false,"fork":false,"pushed_at":"2025-09-17T11:34:08.000Z","size":395,"stargazers_count":16,"open_issues_count":2,"forks_count":5,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-09-17T11:36:41.508Z","etag":null,"topics":["cpp-library"],"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/systelab.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2018-12-04T16:37:13.000Z","updated_at":"2025-09-17T10:27:23.000Z","dependencies_parsed_at":"2024-04-15T17:30:31.904Z","dependency_job_id":"cb3da88c-a3c1-4fd6-94b4-7760cbc242da","html_url":"https://github.com/systelab/cpp-gtest-allure-utilities","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/systelab/cpp-gtest-allure-utilities","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/systelab%2Fcpp-gtest-allure-utilities","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/systelab%2Fcpp-gtest-allure-utilities/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/systelab%2Fcpp-gtest-allure-utilities/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/systelab%2Fcpp-gtest-allure-utilities/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/systelab","download_url":"https://codeload.github.com/systelab/cpp-gtest-allure-utilities/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/systelab%2Fcpp-gtest-allure-utilities/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30436009,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-12T14:34:45.044Z","status":"ssl_error","status_checked_at":"2026-03-12T14:09:33.793Z","response_time":114,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["cpp-library"],"created_at":"2026-03-12T17:45:56.862Z","updated_at":"2026-03-12T17:45:57.959Z","avatar_url":"https://github.com/systelab.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![codecov](https://codecov.io/gh/systelab/cpp-gtest-allure-utilities/branch/master/graph/badge.svg)](https://codecov.io/gh/systelab/cpp-gtest-allure-utilities)\n[![Codacy Badge](https://app.codacy.com/project/badge/Grade/0235467f9ad346cea99fac3a743d0750)](https://www.codacy.com/gh/systelab/cpp-gtest-allure-utilities/dashboard?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=systelab/cpp-gtest-allure-utilities\u0026amp;utm_campaign=Badge_Grade)\n\n\n# C++ Allure utilities for GoogleTest\n\nUtilities to generate [Allure](http://allure.qatools.ru/) reports for automated tests based on [GoogleTest](https://github.com/google/googletest).\n\n\n## Setup\n\n### Download using Conan\n\nThis library is designed to be installed by making use of [Conan](https://conan.io/) package manager. So, you just need to add the following requirement into your Conan recipe:\n\n```python\ndef requirements(self):\n   self.requires(\"GTestAllureUtilities/1.0.0@systelab/stable\")\n```\n\n\u003e Version number of this code snipped is set just as an example. Replace it for the desired package to retrieve.\n\nAs this package is not available on the conan-center, you will also need to configure a remote repository before installing dependencies:\n\n```bash\nconan remote add systelab-public https://csw.jfrog.io/artifactory/api/conan/cpp-conan-production-local\n```\n\nSee Conan [documentation](https://docs.conan.io/en/latest/) for further details on how to integrate this package with your build system.\n\n\n### Build from sources\n\nSee [BUILD.md](BUILD.md) document for details.\n\n\n## Usage\n\n### Register library as a GoogleTest listener\n\nThis library needs to be registered as a listener of your GoogleTest program. This registering can be done as follows:\n\n```cpp\n#include \u003cgtest/gtest.h\u003e\n#include \u003cgmock/gmock.h\u003e\n#include \"GTestAllureUtilities/AllureAPI.h\"\n\nint main(int argc, char* argv[])\n{\n\t::testing::InitGoogleTest(\u0026argc, argv);\n\n\t::testing::UnitTest::GetInstance()-\u003elisteners()\n\t\t.Append(systelab::gtest_allure::AllureAPI::buildListener().release());\n\n\tint res = RUN_ALL_TESTS();\n\n\treturn res;\n}\n```\n\n\n### Configure output folder\n\nThe folder where JSON Allure reports will be generated can be defined by using the `AllureAPI::setOutputFolder(...)` method:\n\n```cpp\nsystelab::gtest_allure::AllureAPI::setOutputFolder(\"Allure/Reports/Folder\");\n```\n\u003e This needs to be configured before executing the `RUN_ALL_TESTS()` macro of GoogleTest.\n\n\n### Set name, description and TMS identifier of test suite\n\nBy default, each test suite will be named as the associated test class. However, this name can be adjusted with the `AllureAPI::setTestSuiteName(...)` method. Similarly, the `AllureAPI::setTestSuiteDescription(...)` and `AllureAPI::setTMSId(...)` methods allow setting the description and the TMS identifier of the test suite respectively.\n\n```cpp\nclass MyTestSuite : public testing::Test\n{\n    static void SetUpTestSuite()\n    {\n        AllureAPI::setTestSuiteName(\"My test suite name\"); // Default test suite is \"MyTestSuite\"\n        AllureAPI::setTestSuiteDescription(\"This is the description for the MyTestSuite\");\n        AllureAPI::setTMSId(\"TC-AT-PROJ-001\");\n    }\n};\n```\n\n\n### Set test macro description\n\nFor each test macro (`TEST_F` or `TEST_P`) in a suite, an action step will be added to the generated report. By default, these actions will have the name of the test fixture assigned by GoogleTest as a description. This description can be overwritten by making use of the `AllureAPI::setTestCaseName(...)` method:\n\n```cpp\nTEST_F(MyTestSuite, testSomething)\n{\n   // Default action description is \"MyTestSuite.testSomething\" (automatically assigned by GoogleTest)\n   AllureAPI::setTestCaseName(\"Human readable description of test action\");\n}\n```\n\n\n### Define steps for a test macro\n\nWhen a test macro is quite complex, it might be interesting to decompose it into several steps. Moreover, some these steps will correspond with actions and the rest to expected results. So, in order to facilitate the definition of this kind of test scenarios, the library provides the `AllureAPI::addAction(...)` and `AllureAPI::addExpectedResult(...)` methods. They require 2 arguments: a human readable description of the step and a lambda function with the code included on the step.\n\nThe following example illustrates how to define a test macro with multiple steps:\n\n```cpp\nTEST_F(MyTestSuite, testSumOfValuesVector)\n{\n    AllureAPI::setTestCaseName(\"Compute sum of 5 + 3\");\n    int result = 5 + 3;\n   \n    AllureAPI::addExpectedResult(\"Sum result is equal to 8\", [result]() -\u003e void\n    {\n        ASSERT_EQ(8, result);\n    });\n    \n    AllureAPI::addAction(\"Add 22 to result of previous sum\", [\u0026result]() -\u003e void\n    {\n        result += 22;\n    });\n    \n    AllureAPI::addExpectedResult(\"New sum result is equal to 30\", [result]() -\u003e void\n    {\n        ASSERT_EQ(30, result);\n    }); \n}\n```\n\n\n### Add labels to a test suite\n\nLabels allow complementing the general information defined for each test suite. They can be recorded through the `AllureAPI::setTestSuiteLabel(...)` method. Additionally, the library provides built-in methods to include the most common labels. \n\n```cpp\nclass MyTestSuite : public testing::Test\n{\n    static void SetUpTestSuite()\n    {\n    \t// ...\n\t\n\t// Add built-in labels\n        AllureAPI::setTestSuiteEpic(\"Epic name of test suite\");\n        AllureAPI::setTestSuiteSeverity(\"high\");\n\t\n\t// Add custom labels\n        AllureAPI::setTestSuiteLabel(\"CustomLabel1\", \"Value for custom label 1\");\n        AllureAPI::setTestSuiteLabel(\"CustomLabel2\", \"Value for custom label 2\");\n    }\n};\n```\n\n\u003e Labels are designed to be unique per test suite. Thus, if a label is set twice on the same suite, then only the latest value provided will be included on the report.\n\n### Additional test program options\n\n#### Program name\n\nThe name of the test program (included in filename of generated report files) can be adjusted as follows:\n\n```cpp\nsystelab::gtest_allure::AllureAPI::setTestProgramName(\"MyTestProjectName\");\n```\n\n#### TMS Link patterns\n\nThe pattern of the links between each test suite and the test management system (TMS) needs to be configured before starting the test program:\n\n```cpp\nsystelab::gtest_allure::AllureAPI::setTMSLinksPattern(\"https://mycompany.com/tms/{}\");\n```\n\u003e The `{}` will be replaced by the TMS identifier on the report of each test suite\n\n\n### Examples\n\nSee [Sample Test project](test/SampleTestProject) for more complete usage examples.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsystelab%2Fcpp-gtest-allure-utilities","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsystelab%2Fcpp-gtest-allure-utilities","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsystelab%2Fcpp-gtest-allure-utilities/lists"}