How yogesh2511/specflowwithrestassuredframework works
Project type and purpose
• This is a BDD‐style API automation framework built on .NET (6/8), SpecFlow, RestSharp, and NUnit/xUnit.
• It drives Trello REST API scenarios (create boards, lists, cards, etc.) using Gherkin feature files, step definitions, a core API client layer, utilities for configuration/logging, and generates HTML reports via ExtentReports.
File structure
• Top‐level:
• README.md, solution file (.sln), NuGet packages.config
• “SpecFlowProjectRestAssured” root folder containing most code & config
• Key directories under SpecFlowProjectRestAssured:
• Base: BaseAPIClass.cs – central HTTP wrapper
• Features: .feature files (Gherkin) + auto‐generated .feature.cs
• StepDefinitions: mapping Gherkin steps to C# methods
• Hooks: SpecFlow hooks (before/after scenario) for setup/teardown
• TestData/Resources: JSON endpoints & schemas for validation
• TrelloApi.Core:
– Clients (BaseTrelloClient, TrelloService)
– Models (Requests/Responses)
– Services (BoardService, CardService, etc.)
– Utilities (ConfigManager, RequestFactory, ApiLogger, etc.)
• Utility: alias management, env‐validation, scenario‐context, logging
• appsettings.json / .env for API key/token/base URL
• bin/ obj/ for build artifacts & generated reports
README for additional insights
• Tech stack, BDD scenarios, reporting, configuration instructions, sample Gherkin.
Elements
• Clear labels: “Feature Files”, “Step Definitions”, “BaseAPIClass”, “RequestFactory”, “BoardService”, “Trello REST API”, etc.
Detail is key
• Don’t just show “API call”—break out RequestFactory, ConfigManager, ApiLogger.
• Separate clients (HTTP wrapper) from services (business operations).
• Hooks & ScenarioContextManager to show context initialization.
• Test Runner → SpecFlow Engine → Test execution path.
• TestData folder as a source for endpoint URLs and JSON schemas.