Skip to content

Tool to backtest http endpoints results. Can be used to make sure no regression has appeared between two environments.

Notifications You must be signed in to change notification settings

anthonysyk/http-backtest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

http-backtest

HTTP Backtest in golang allows to run a series of comparison between two environments.

It can be used to verify that a migration, a new feature or a bug fix did not introduced a regression.

What is a regression

Regressions are a type of software bug. An example of regression is a feature that works but no longer works after new code releases. This issue is caused by several factors such as system upgrades, feature enhancements, and previous bug fixes through patching. The most common cause of regression is usually bug fixes.

Use Cases

You need to compare API responses between local and staging.

It can also be a safety net to catch divergence between two environments.

  • Version Upgrade
  • Migration
  • New Feature
  • Bug fixes

Supported body formats :

  • json
  • xml
  • csv
  • html
  • text

Requirements for best results :

  • Same data in both environment
  • Idempotent HTTP requests (An HTTP request is idempotent if the intended effect on the server of making a single request is the same as the effect of making several identical requests)

Result example :

{
  "name": "movies-backtest",
  "totalRequests": 6,
  "uniqueURLs": 6,
  "statusMatched": 6,
  "statusNoMatched": 0,
  "statusCodeSimilarity": "100%",
  "bodyMatched": 5,
  "bodyNoMatched": 1,
  "bodySimilarity": "100%",
  "bodyEquivalent": {
    "BothArgsAreInvalidJson": 1,
    "FullMatch": 4,
    "status code different": 1
  },
  "environmentDetailsA": {
    "stagingStatusCodes": {
      "200": 5,
      "404": 1
    }
  },
  "environmentDetailsB": {
    "stagingStatusCodes": {
      "200": 5,
      "404": 1
    }
  }
}

About

Tool to backtest http endpoints results. Can be used to make sure no regression has appeared between two environments.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages