{"id":21372394,"url":"https://github.com/automationpanda/specflowpluslivingdocscripts","last_synced_at":"2025-07-13T07:32:08.594Z","repository":{"id":42566288,"uuid":"331997616","full_name":"AutomationPanda/SpecFlowPlusLivingDocScripts","owner":"AutomationPanda","description":"SpecFlow+ LivingDoc Feature Data JSON Modification Scripts","archived":false,"fork":false,"pushed_at":"2024-01-30T16:14:22.000Z","size":16,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-04-28T03:37:37.285Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PowerShell","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/AutomationPanda.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}},"created_at":"2021-01-22T16:13:44.000Z","updated_at":"2024-04-28T03:37:41.596Z","dependencies_parsed_at":"2024-04-28T03:37:39.578Z","dependency_job_id":"c022fb41-e62c-4ac7-b1db-d76894a7d87d","html_url":"https://github.com/AutomationPanda/SpecFlowPlusLivingDocScripts","commit_stats":null,"previous_names":["automationpanda/specflowpluslivingdocscripts"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AutomationPanda%2FSpecFlowPlusLivingDocScripts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AutomationPanda%2FSpecFlowPlusLivingDocScripts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AutomationPanda%2FSpecFlowPlusLivingDocScripts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AutomationPanda%2FSpecFlowPlusLivingDocScripts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AutomationPanda","download_url":"https://codeload.github.com/AutomationPanda/SpecFlowPlusLivingDocScripts/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225863854,"owners_count":17536177,"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":[],"created_at":"2024-11-22T08:19:32.439Z","updated_at":"2024-11-22T08:19:33.107Z","avatar_url":"https://github.com/AutomationPanda.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SpecFlow+ LivingDoc Scripts\n\nThis repository contains PowerShell scripts for modifying\n[SpecFlow+ LivingDoc](https://docs.specflow.org/projects/specflow-livingdoc/en/latest/index.html) reports.\nPlease read my article,\n[Improving Teamwork with SpecFlow+ LivingDoc](https://automationpanda.com/2021/02/09/improving-teamwork-with-specflow-livingdoc/),\nto learn more about the value LivingDoc provides.\n\n\n## Why Modify LivingDoc?\n\nSpecFlow+ LivingDoc is a great way to turn Gherkin feature files into living documentation.\nThey can also include high-level test results.\nHowever, you might need to modify some of the data you put into your reports.\nFor example, you may need to remove certain scenarios or scrub certain tags for data protection.\n\nBy default, LivingDoc generates an HTML report.\nHowever, you can make LivingDoc generate a JSON file containing\n[feature data JSON files](https://docs.specflow.org/projects/specflow-livingdoc/en/latest/LivingDocGenerator/CLI/livingdoc-feature-data.html).\nYou can then modify this feature data and use it to generate a modified HTML report.\n\n\n## Scripts\n\nThese scripts are written in PowerShell.\n\n1. [RemoveSkippedScenarios.ps1](RemoveSkippedScenarios.ps1):\n   * Takes in a feature data JSON file and a test execution JSON file\n   * Identifies all executed test scenarios in the test exection JSON file\n   * Removes all unexecuted scenarios from the feature data\n   * Generates a new feature data JSON file for the pruned data\n2. [RemoveTags.ps1](RemoveTags.ps1)\n   * Takes in a list of tags and a feature data JSON file\n   * Removes the tags from all features, scenarios, and examples tables in the feature data\n   * Generates a new feature data JSON file without the tags\n\n\n## Steps\n\nThe scripts in this repository modify feature data JSON files.\nHere are the steps for using them from PowerShell:\n\n1. Generate a feature data JSON file from a SpecFlow test assembly (.dll).\n   * `livingdoc test-assembly --output-type JSON \u003ctestAssembly\u003e`\n2. Remove skipped scenarios from the feature data JSON file.\n   * `RemoveSkippedScenarios.ps1 \u003ctestExecutionJson\u003e \u003cfeatureDataJson\u003e \u003cprunedFeatureDataJson\u003e`\n3. Remove a set of tags from the feature data JSON file.\n   * `RemoveTags.ps1 \u003ctagsToRemove\u003e \u003cfeatureDataJson\u003e \u003cprunedFeatureDataJson\u003e`\n4. Generate a LivingDoc HTML report with the modified feature data JSON file.\n   * `livingdoc feature-data \u003cfeatureDataJson\u003e`\n\n\n## Example Execution\n\nIn PowerShell:\n\n```powershell\nPS\u003e livingdoc test-assembly --output-type JSON .\\\u003cYourAssembly\u003e.dll  \nFramework: .NET 5.0.15\n\u003cOutputDir\u003e\\FeatureData.json was successfully generated.\n\nPS\u003e RemoveSkippedScenarios.ps1 \u003cOutputDir\u003e\\TestExecution.json \u003cOutputDir\u003e\\FeatureData.json NoSkippedFeatureData.json\nReading '\u003cOutputDir\u003e\\FeatureData.json'\nReading '\u003cOutputDir\u003e\\TestExecution.json'\nHashing each Test Execution scenario from '\u003cOutputDir\u003e\\TestExecution.json'\n1 Test Execution scenario(s) found\nPruning unexecuted scenarios from Feature Data\nSaving the pruned Feature Data to 'NoSkippedFeatureData.json'\n\nPS\u003e RemoveTags.ps1 -TagsToRemove web, mobile, ignore -FeatureDataPath NoSkippedFeatureData.json -PrunedFeatureDataPath FinalizedFeatureData.json\nReading 'NoSkippedFeatureData.json'\nRemoving tags from Feature Data\nTags to remove: web, mobile, ignore\nSaving the new Feature Data to 'FinalizedFeatureData.json'\n\nPS\u003e livingdoc feature-data FinalizedFeatureData.json --output-type HTML -t \u003cOutputDir\u003e\\TestExecution.json\nFramework: .NET 5.0.15\n\u003cOutputDir\u003e\\LivingDoc.html was successfully generated.\n```\n\n\n## Links\n\n* [SpecFlow](https://specflow.org/)\n* [SpecFlow+ LivingDoc](https://specflow.org/plus/livingdoc/)\n* [SpecFlow+ LivingDoc documentation](https://docs.specflow.org/projects/specflow-livingdoc/en/latest/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fautomationpanda%2Fspecflowpluslivingdocscripts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fautomationpanda%2Fspecflowpluslivingdocscripts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fautomationpanda%2Fspecflowpluslivingdocscripts/lists"}