Home - acikgozmehmet/APITestingAutomationSuite GitHub Wiki
Welcome to the APITestingAutomationSuite wiki!
Mehmet Acikgoz
1 . Create a Unit Test Project (NET Framework)
-
Add the following dependencies with NuGet Manager
-
Nunit ( Deleting by removing from the NuGet Manager -> Microsoft.VisualStudio.TestPLatform.TestFramework )
-
NUnit3TestAdaptor
-
RestSharp
-
SpecFlow
-
NewtonSoft.json ( This library is good for serialization/deserialization)
-
SpecFlow.NUnit should be also installed with NuGet Manager (Otherwise the BDD-style tests will not work and you will have the following error message in th TestExplorer)
OneTimeSetUp: BoDi.ObjectContainerException : Interface cannot be resolved:
TechTalk.SpecFlow.UnitTestProvider.IUnitTestRuntimeProvider('nunit')
-
SpecFlow.Tools.MsBuild.Generation ( This is important to see the BDD-style tests in TestExplorer, If it is not installed as NuGet, you will not be able to see the BDD-style tests in TestExplorer)
-
SpecFlow.Assist.Dynamic - For data table and used for the dynamic way of retrieving tables
-
JsonPath
-
ExtentReports (for reporting)
-
Please update the app.config file with the followings
<appSettings>
`<add key="baseUrl" value="https://gorest.co.in" />`
`<add key="accessToken" value="YOUR_ACCESS_TOKEN" />`
</appSettings>
Note: Please add "System.Configuration" to the references so that you will be able to use ConfigurationManager to get the predefined values in app.config