Hypertest v2 Docs
HyperTest
  • Overview
    • How It Works?
  • SETUP GUIDE
    • Installation
      • Deploy HyperTest Server
      • Creating your first User
      • Adding your first service
      • Integrate SDK
        • Node.js
          • Node.js SDK with CJS
          • Node.js SDK with ESM
        • Java
    • Start a Test Run
      • CLI Login
      • Type References
      • Java
  • Interpreting Test Results
    • Test Results
    • Understanding Results Categories
    • Mock Not Found
    • AI Match Mocks
    • Accepting Changes
  • USER GUIDES
    • Node.js SDK
      • Limit memory usage
      • Supported NPM packages
      • Mock Dependencies Manually
      • Unmocking/Passing Through
      • Sampling and blocking requests
      • Manage Global Variables
      • Mocking Environment Variables
      • Tags
      • Set HTTP path patterns
      • Discard a test case(Request) while recording
      • Set Git Commit Hash
      • Code coverage based features
        • Continuous Coverage
        • Updating test coverage
        • Running post test deduplication
        • Only testing modified requests
        • Ignore differences for unmodified requests
      • Experimental flags
      • Manual Request
      • Only testing modified requests
      • Server hooks
    • Java SDK
      • Sampling and blocking requests
      • Mock Dependencies Manually
      • Tags
      • Unmocking/Passing Through
      • Code Coverage Setup and Report Generation
      • Supported Java packages
    • Build your own Docker Image
    • CLI Config
    • Ignoring Differences
      • Type References for Filter functions
  • Impact Features
    • Fast Mode
    • Code Coverage Report
    • Delete Recorded Requests
    • Inter Service Testing
  • Release History
    • Slack Integration
    • Version History
Powered by GitBook
On this page
  • Real World Scenario:
  • Testing:
  1. Overview

How It Works?

PreviousOverviewNextInstallation

Last updated 1 year ago

HyperTest operates in two modes: RECORD & REPLAY. The test case generation happens in RECORD mode and the Test Run is called the REPLAY.

There are 3 major components at play here:

  • SDK: Facilitates capturing incoming/outgoing traffic by instrumenting libraries thus generating test cases and mocks, also it provides appropriate mocks in REPLAY mode.

  • CLI: Runs Test by spinning up your app in isolation by injecting required mocks, replay's recorded traffic, and generates the report.

  • HyperTest Server: Serves the HyperTest Dashboard and stores all the test cases and results.

Real World Scenario:

With HyperTest SDK integration in place, when a Client makes an API call to the UI Gateway Service it in turn makes some requests to external services to give a response.

All the outbound calls to the downstream services such as Redis or Catalog Services are being recorded by HyperTest SDK with their responses to be mocked during REPLAY. The Catalog service is also instrumented with the SDK it captures the Incoming Request from Gateway Service and records it as a test case with its mocks.

Testing:

Whenever a Test is Initiated by HT CLI, it spawns a new process of the Application Under Test and supplies the mocks required for boot via SDK.

After successfully starting the App it starts running the same requests(Test Cases) with the mocks and generates a regression report which can be accessed by the Dashboard.