Home - acikgozmehmet/APITestingAutomationSuite GitHub Wiki

Welcome to the APITestingAutomationSuite wiki!

Mehmet Acikgoz


1 . Create a Unit Test Project (NET Framework)

  1. 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

https://github.com/acikgozmehmet/APITestingAutomationSuite/blob/master/Documentation/APITestingAutomationSuite%20-%20Microsoft%20Visual%20Studio%202_14_2020%203_03_12%20PM.png

https://github.com/acikgozmehmet/APITestingAutomationSuite/blob/master/Documentation/APITestingAutomationSuite%20-%20Microsoft%20Visual%20Studio%202_14_2020%203_03_54%20PM.png

https://github.com/acikgozmehmet/APITestingAutomationSuite/blob/master/Documentation/Extent%20Framework%20-%20Google%20Chrome%202_14_2020%203_04_17%20PM.png

https://github.com/acikgozmehmet/APITestingAutomationSuite/blob/master/Documentation/Extent%20Framework%20-%20Google%20Chrome%202_14_2020%203_04_36%20PM.png