{"id":22415005,"url":"https://github.com/nitor-infotech-oss/api-specflow-test-framework","last_synced_at":"2025-08-01T00:32:04.100Z","repository":{"id":38082554,"uuid":"215765146","full_name":"nitor-infotech-oss/api-specflow-test-framework","owner":"nitor-infotech-oss","description":"Generic API Test Automation Framework using C# and Specflow","archived":false,"fork":false,"pushed_at":"2023-03-04T00:59:40.000Z","size":72,"stargazers_count":1,"open_issues_count":2,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-10-16T16:08:04.054Z","etag":null,"topics":["api-testing","bdd","specflow"],"latest_commit_sha":null,"homepage":null,"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/nitor-infotech-oss.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":"2019-10-17T10:24:27.000Z","updated_at":"2023-10-16T16:08:04.060Z","dependencies_parsed_at":"2023-01-24T21:45:45.889Z","dependency_job_id":null,"html_url":"https://github.com/nitor-infotech-oss/api-specflow-test-framework","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nitor-infotech-oss%2Fapi-specflow-test-framework","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nitor-infotech-oss%2Fapi-specflow-test-framework/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nitor-infotech-oss%2Fapi-specflow-test-framework/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nitor-infotech-oss%2Fapi-specflow-test-framework/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nitor-infotech-oss","download_url":"https://codeload.github.com/nitor-infotech-oss/api-specflow-test-framework/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228321331,"owners_count":17901604,"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":["api-testing","bdd","specflow"],"created_at":"2024-12-05T15:10:41.924Z","updated_at":"2024-12-05T15:10:43.512Z","avatar_url":"https://github.com/nitor-infotech-oss.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"REST API AUTOMATION USING BDD FRAMEWORK\nPurpose of API Automation Framework:\nThe purpose for this API automation framework is to serve a technical implementation guideline for automation testing. With the help for BDD implementation this framework not only helps to reuse the code but also helps to set standard for test scripts.\n\nOverview:\nTo automate REST API this framework uses SpecFlow which is a testing framework that supports Behaviour Driven Development (BDD). In order to consume web API I have used Web Client class. The Web Client class provides methods to send and receive data from the server. Depending upon the security, an API may or may not require any authentication or authorization. This framework covers the three scenarios with two most commonly user authentication methods.\n1.\tConsume API which do not have authentication or authorization. (GET and POST requests covered)\n2.\tConsume API which requires Basic Authentication (Get request covered. POST request process same as first scenario).\n3.\tConsume API which requires Bearer Authentication/Token Authentication (Get request covered. POST request process same as first scenario).\n\nFramework structure:\n1.Tests Folder:\n All the feature files and step definition files are kept under the Test folder. These tests are described here in a simple English language called as Gherkin language.\n2.Test Class Folder:\nThis folder contains the class file for the tests which helps us to convert JSON inputs or JSON response to .Net type.\n3.Test Data Folder:\n This folder contains various combination of json inputs/params required to provide for an API. These files are in json format. You can provide positive as well as negative inputs to the API.\n4.Reports Folder:\nThe test results are under this folder. This report is in html format.\n5.Helper Folder:\nThe helper folder contains helper classes which intends to give quick implementation of basic methods that can be used again and again.\n\nPackages used: \nMicrosoft.AspNet.WebApi.Client, Version: 5.2.7 NUnit, Version: 3.12.0 Newtonsoft.Json, Verison: 12.0.2 Specflow, Version: 2.3.2 ExtentReports, Version: 3.1.3\n\nReporting:\nThe test execution report is generated in Html format. This report allows to filter tests according to pass/ fail criteria.\n\n\nAdvantages:\nSupports Html reporting.\nSupports execution for testing multiple environments by simply providing required test environment name.\nSupports Database connection.\nSupports different types for authorization like Basic Authentication and OAuth2 (bearer token).\nCan be used for Unit testing by developers.\nUse of BDD framework allows every person like Testers, Developers, business analyst, etc., to participate actively.\nEnhanced speed at which testing progresses.\n\nLimitation:\nSupports only REST APIs. Does not support SOAP APIs.\n\nWhere and how to use:\nThis framework can support any project that requires Rest API automation testing in C#.\nTo use this framework you need to perform following steps:\n1.\tInstall Visual Studio (VS 2017 ,2019 recommended)\n2.\tInstall supporting packages.\n3.\tUpdate the API_Data_Config.json file with your project specific API base URLs and endpoints.\n4.\tUpdate the app.config by simply entering the environment name to execute all the tests for that environment.\n5.\tSegregate the test data as per the test environment. \n6.\tTest data should be in .json format.\n7.\tFollow the specflow feature file scenario standards (scenario standards can also be customized).\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnitor-infotech-oss%2Fapi-specflow-test-framework","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnitor-infotech-oss%2Fapi-specflow-test-framework","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnitor-infotech-oss%2Fapi-specflow-test-framework/lists"}