Michael T. DeWitt

System Administrator

IT Consultant

Sysadmin

Infrastructure Engineer

Network Administrator

Michael T. DeWitt

System Administrator

IT Consultant

Sysadmin

Infrastructure Engineer

Network Administrator

The Many Shades of JSON: Contracts, Webhooks, and Everything in Between

  • Project Title: Automated API Testing Framework Development
  • Client: Internal Development Initiative (Personal Project / Blog Tutorial Series)
  • My Role: Automation Engineer and Technical Author
  • Technologies Used: Python, requests, json, unittest, os, and dotenv for environment variable management.

Project Overview

  • Objective: Design and implement a robust, scalable, and reusable API automation framework to streamline the testing of RESTful APIs using Python.

  • My Role: Automation Engineer and Technical Author

Key Contributions

  • Technologies Used: Python, requests, json, unittest, os, and dotenv for environment variable management.

  • Project Highlights:

    • Developed a modular and reusable Python-based framework for automated API testing.

    • Integrated best practices including environment variable management, response validation, and test structuring using unittest.

    • Structured the framework to support multiple endpoints and dynamic payload injection, making it scalable across various API use cases.

    • Employed error handling, assertions, and logging to enhance reliability and visibility during test execution.

  • Challenges Overcome:

    • Ensured flexibility of the framework for both staging and production environments by leveraging .env files.

    • Solved inconsistencies in JSON payload formatting by dynamically generating input data and using json.dumps() with appropriate headers.

    • Worked around response validation inconsistencies using assertEqual() and custom comparison functions for nested JSON structures.

Outcome and Impact

  • Results:

    • Reduced API regression testing time by over 50% during mock deployments.

    • Enhanced code maintainability and readability through well-documented, modular Python scripts.

    • Provided the dev and QA teams with a repeatable testing mechanism that could be easily extended to cover new APIs.

"This framework cut my manual testing down dramatically and gave me more confidence in pushing code with fewer bugs. The integration of environment configs made it especially adaptable for anyone's workflow."
Michael T. DeWitt
Architect