{"id":26584156,"url":"https://github.com/chrispsheehan/dotnetcore-api-bdd-test-framework","last_synced_at":"2025-09-16T03:44:20.268Z","repository":{"id":41519754,"uuid":"288829937","full_name":"chrispsheehan/dotnetcore-api-bdd-test-framework","owner":"chrispsheehan","description":"BDD test framework for API tests.","archived":false,"fork":false,"pushed_at":"2023-02-01T16:57:06.000Z","size":93,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2023-03-06T09:25:35.820Z","etag":null,"topics":["csharp","docker","dotnet","dotnet-core","restsharp","test-automation","test-framework"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chrispsheehan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-08-19T20:23:43.000Z","updated_at":"2023-01-22T18:05:16.000Z","dependencies_parsed_at":"2023-02-17T08:25:14.983Z","dependency_job_id":null,"html_url":"https://github.com/chrispsheehan/dotnetcore-api-bdd-test-framework","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrispsheehan%2Fdotnetcore-api-bdd-test-framework","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrispsheehan%2Fdotnetcore-api-bdd-test-framework/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrispsheehan%2Fdotnetcore-api-bdd-test-framework/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrispsheehan%2Fdotnetcore-api-bdd-test-framework/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chrispsheehan","download_url":"https://codeload.github.com/chrispsheehan/dotnetcore-api-bdd-test-framework/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245078872,"owners_count":20557376,"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":["csharp","docker","dotnet","dotnet-core","restsharp","test-automation","test-framework"],"created_at":"2025-03-23T09:19:12.459Z","updated_at":"2025-09-16T03:44:15.220Z","avatar_url":"https://github.com/chrispsheehan.png","language":"C#","readme":"# APITestFramework\n\n[Purgomalum](https://www.purgomalum.com/) is a simple, free RESTful web service for filtering and removing content of profanity, obscenity and other unwanted text.\n\nThis is a test automation framework written against it.\n\n##### Resources\n\n- [SpecFlow Project Template with dotnet new](https://specflow.org/blog/specflow-project-template-with-dotnet-new/)\n- [SpecFlow context injection](https://docs.specflow.org/projects/specflow/en/latest/Bindings/Context-Injection.html)\n- [RestSharp](https://restsharp.dev/)\n\n### Getting started\n\n- [Install Docker](https://www.docker.com/products/docker-desktop)\n- [Install .Net Core SDK](https://dotnet.microsoft.com/download)\n- [Clone this repositiry to your machine](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/cloning-a-repository)\n\n### Run tests\n\n#### Terminal/CMD\n\n- Mac: [Open the Terminal app](https://www.howtogeek.com/682770/how-to-open-the-terminal-on-a-mac/) and [navigate to the repository folder](https://www.macworld.com/article/2042378/master-the-command-line-navigating-files-and-folders.html)\n- Windows: [Open command prompt in repository folder](https://helpdeskgeek.com/how-to/open-command-prompt-folder-windows-explorer/)\n- Execute the below commands\n\n#### Run the tests on your machine OR...\n\n```bash\ncd src/Purgomalum.Test\ndotnet test\n```\n\n#### ...in [Docker](https://www.docker.com/)\n\nCreate image containing compiled test code and run it.\n\n```bash\ndocker build -t test-complied-box:1.0 .\ndocker run --rm test-complied-box:1.0\n```\n\nRun code from a volume - used in debug.\n\n```bash\ndocker run --rm -v ${PWD}/src:/src --entrypoint=\"dotnet\" -it mcr.microsoft.com/dotnet/core/sdk:3.1 test /src --filter Category=sweary\n```\n\n#### [To run with filters](\"https://docs.microsoft.com/en-us/dotnet/core/testing/selective-unit-tests\")\n\n- Has tag: ```dotnet test --filter Category=sweary```\n- Does not have tag: ```dotnet test --filter Category!=sweary```\n- Feature: ```dotnet test --filter FeatureTitle=Find_Profanity```\n- Scenario: ```dotnet test --filter Description=Profanity_Found```\n- Combinations: ```dotnet test --filter \"FeatureTitle=Find_Profanity\u0026Description=Profanity_Found\"```\n\n#### Expected output\n\n```bash\n-\u003e Using default config\nTest run for /APITestFramework/src/bin/Debug/netcoreapp3.1/APITestFramwwork.dll(.NETCoreApp,Version=v3.1)\nMicrosoft (R) Test Execution Command Line Tool Version 16.6.0\nCopyright (c) Microsoft Corporation.  All rights reserved.\n\nStarting test execution, please wait...\n\nA total of 1 test files matched the specified pattern.\n-\u003e Loading plugin /APITestFramework/src/bin/Debug/netcoreapp3.1/TechTalk.SpecFlow.xUnit.SpecFlowPlugin.dll\n-\u003e Using default config\n\nTest Run Successful.\nTotal tests: 16\n     Passed: 16\n Total time: 4.1265 Seconds\n ```\n\n### [Visual Studio Code](https://code.visualstudio.com/)\n\nDotnet core tests can be debugged and run from VS code.\n\nRequired extensions:\n\n- [.Net Core Test Explorer](https://marketplace.visualstudio.com/items?itemName=formulahendry.dotnet-test-explorer)\n- [C#](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csharp)\n- [Cucumber (Gherkin) Full Support](https://marketplace.visualstudio.com/items?itemName=alexkrechik.cucumberautocomplete)\n- [Specflow Tools](https://marketplace.visualstudio.com/items?itemName=amillard98.specflow-tools)\n\nInclude the below setting in .vscode/settings.json\n\n```json\n\"dotnet-test-explorer.testProjectPath\" : \"./src\"\n ```\n\n### Troubleshooting\n\n###### Mac MSBuild error\n\n- Issue: The below error when building the project\n\n ```bash\nerror MSB4018: The \"GenerateFeatureFileCodeBehindTask\" task failed unexpectedly.\n ```\n\n- Fix: Run the below in Terminal to set environmental variable\n\n ```bash\nexport MSBUILDSINGLELOADCONTEXT=1\n ```\n\n- Issue: cannot install dotnet executable on M1 machine\n- Fix:\n\n ```bash\nsudo ln -s /usr/local/share/dotnet/x64/dotnet /usr/local/bin\n ```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrispsheehan%2Fdotnetcore-api-bdd-test-framework","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchrispsheehan%2Fdotnetcore-api-bdd-test-framework","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrispsheehan%2Fdotnetcore-api-bdd-test-framework/lists"}