What are the pro's and con's of writing an API test automation framework at code level as opposed to a tool



  • As I look into writing automation frameworks at the API layer(relatively new to this area), a question that keeps cropping up in my mind is.....why should I write an automation framework at code level in C#(with RestSharp) or Java(RestAssured), as opposed to using a tool like Postman or SoapUI and utilising what they have to create a framework?

    What would be the pro's and con's of each?



  • Pros of coding:

    • You can easily integrate your test into CI process
    • You can code any assertion logic you need in your tests
    • You can utilize any library that is suitable for your chosen coding platform
    • You can flexibly manage your test data
    • You can build whatever test report you want

    Cons of coding:

    • It requires coding skills

    Pros of tools:

    • They doesn't require coding skills at all or requires less coding skills
    • They have user-friendly interface
    • They are intended to address some general issues of API testing (see cons) so there are a lot of people who can help you with your problems

    Cons of tools:

    • They are intended to address some general issues of API testing so you wouldn't likely be able to introduce more or less complicated logic of your test
    • This is not trivial to integrate the tools into CI
    • Usually tools have their reporting standard that cannot be changed or you're limited in the changes
    • You either are not able to extend tool functionality or limited in the extension by the existing plugins


Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2