Skip to content
Subodh Singh edited this page Nov 2, 2023 · 1 revision

Welcome to the api-automation-framework wiki!

RestClient

  1. Creating Request → RequestSpecification
    1. URI → baseUri, basePath
    2. Path Param → HashMap pathParams → setPathParams()
    3. Query Param → HashMap queryParam → setQueryParams()
    4. Header → HashMap requestHeaders → setRequestHeaders()
    5. Body → Object requestBody → setRequestBody()
  2. Sending Request → get(),post(),put(),delete(),patch()
  3. Parsing Response
    1. Status Code
    2. Headers
    3. Body → JsonPath

Properties

  1. app_name.env_name.properties → gorest.qa.properties, gorest.stage.properties, gorest.dev.properties
  2. Add option to parameterize appname and envname → Done
  3. TODO → Create [framework properties](http://framework.properties)
    1. enable_log
    2. env dir path

Exception

  1. Added custom exceptions for property keys - NoPropertyFoundException → Done
  2. TODO → Add exceptions to report errors in framework

Reports

  1. Reports → Logging request, response, test steps and assertion details in report

Others

  1. Execution using TestNG XML
  2. Run using maven → surefire plugin
  3. Integrate with Jenkins