This project is aimed at testing RESTful APIs using RestSharp and SpecFlow.
- RestSharp_API_Testing.Specs: Contains SpecFlow feature files, step definitions, and related code.
- Features: SpecFlow feature files describing test scenarios.
- Models: Classes representing data models used in the tests.
- Steps: Step definition files where SpecFlow steps are implemented.
- README.md: This file, providing an overview of the project.
-
Clone the repository:
git clone https://github.com/your-username/RestSharp_API_Testing.git
-
Open the solution file (
RestSharp_API_Testing.sln
) in Visual Studio. -
Build the solution to restore dependencies and ensure everything is set up correctly.
-
Explore the project structure and start adding your test scenarios in the feature files under the Features directory.
-
Implement step definitions in the Steps directory to define the behavior of each step in your scenarios.
-
Execute the tests using your preferred test runner.
To run the tests, follow these steps:
-
Build the solution if you haven't already done so.
-
Open the Test Explorer window in Visual Studio (
Test
>Test Explorer
). -
Click on
Run All
in the Test Explorer window to execute all tests.
Alternatively, you can use the command line to run the tests:
dotnet test
This command will build the solution and run all tests.
- RestSharp: A simple REST and HTTP API Client for .NET.
- SpecFlow: A pragmatic BDD framework for .NET, allowing you to define executable specifications.
Contributions are welcome! If you find any issues or have suggestions for improvements, feel free to open an issue or submit a pull request.