Home

Awesome

<img width="135" height="120" alt="Zerocode" src="https://user-images.githubusercontent.com/12598420/51964581-e5a78e80-245e-11e9-9400-72c4c02ac555.png"> Zerocode

Kafka Data streams and Micro-services API automated regression testing via JSON or YAML

API Performance Testing Kafka Testing

Latest release:🏹 Maven <br/> CI Testing: example workflow <br/> Issue Discussions: Slack <br/> Mailing List: Mailing List <br/> License: Apache 2.0 <br/>

Zerocode makes it easy to create and maintain automated tests with absolute minimum overhead for REST,SOAP, Kafka Real Time Data Streams and much more. It has the best of best ideas and practices from the community to keep it super simple, and the adoption is rapidly growing among the developers & testers community.

Documentation

Visit here :

IDE Support By

<img width="135" height="120" alt="Jetbrains IDE" src="images/jetbrains.svg">

Maven Dependency

Introduction

Zerocode is a modern, lightweight, and extensible open-source framework designed for writing executable test scenarios using simple JSON or YAML formats. It supports both declarative configuration and automation, making it user-friendly and efficient.

In essence, Zerocode simplifies the complexities of modern API and data-streaming automation, including Kafka. The framework seamlessly handles response validations, target API invocations, load/stress testing, and security testing, all through straightforward YAML/JSON/Fluent steps.

For example, if your REST API URL https://localhost:8080/api/v1/customers/123 with GET method and "Content-Type": "application/json" returns the following payload and a http status code 200(OK) ,

Response:
{
    "id": 123,
    "type": "Premium High Value",
    "addresses": [
        {
            "type":"home",
            "line1":"10 Random St"
        }
    ]
}

then, we can easily validate the above API using Zerocode like below.

{
  "url": "api/v1/customers/123",
  "method": "GET",
  "request": {
    "headers": {
      "Content-Type": "application/json"
    }
  },
  "retry": {
    "max": 3,
    "delay": 1000
  },
  "verify": {
    "status": 200,
    "headers": {
      "Content-Type" : [ "application/json; charset=utf-8" ]
    },
    "body": {
      "id": 123,
      "type": "Premium Visa",
      "addresses": [
        {
          "type": "Billing",
          "line1": "10 Random St"
        }
      ]
    }    
  },
  "verifyMode": "LENIENT"
}

---
url: api/v1/customers/123
method: GET
request:
  headers:
    Content-Type: application/json
retry:
  max: 3
  delay: 1000
verify:
  status: 200
  headers:
    Content-Type:
    - application/json; charset=utf-8
  body:
    id: 123
    type: Premium Visa
    addresses:
    - type: Billing
      line1: 10 Random St
verifyMode: LENIENT

The beauty here is, we can use the payload/headers structure for validation as it is without any manipulation or use a flat JSON path to skip the hassles of the entire object hierarchies.

Looks simple & easy? Why not give it a try? Visit the quick-start guide or user's guide for more insight.

Zerocode-TDD is used by many companies such as Vocalink, HSBC, HomeOffice(Gov) and many others to achieve accurate production drop of their micro-services, data-pipelines etc.

Also, learn more about Validators Vs Matchers here.

Happy Testing! <g-emoji class="g-emoji" alias="panda_face" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f43c.png">🐼</g-emoji>

🔆 Visit Documentation - Indexed, searchable & instantly finds you the results