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
  1. USER GUIDES
  2. Node.js SDK
  3. Code coverage based features

Ignore differences for unmodified requests

How to ignore differences for unmodified requests?

PreviousOnly testing modified requestsNextExperimental flags

Last updated 5 months ago

After the test runs, there can be some requests that contain noises. Sometimes these noises can't be detected by hypertest and they are marked as errors. You can reduce the number of such noises using this feature. In this feature we will calculate the code coverage for a particular request, then check if there were any modifications in that part of code. Differences for unmodified requests are ignored. We use git diff to list the modifications. You are required to set your baseline branch to compute git diff in the cli config.

  1. Add nyc to your the command that starts your app. Follow for help

  2. Add this to your cli config

// Your cli config
{
    /*
        ...Rest of your cli config
    */
    shouldIgnoreDifferencesInUnmodifiedRequests: true,
    masterBranch: <your-baseline-branch>
}

This feature doesn't require you to store coverage for the baseline branch

this