Hypertest v2 Docs
HyperTest
  • Overview
    • How It Works?
  • SETUP GUIDE
    • Node.js QuickStart 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
      • Node
      • 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
      • CLI Login
      • 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
      • Update HT-CLI and Node-SDK
      • Type References
    • 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

Only testing modified requests

How to only test modified requests ?

This feature enables you to test only those requests that were modified in the new commits added. Hypertest considers a request to be modified when the code covered in that request gets modified. So this feature requires the code coverage of the requests to be updated using htcli update-coverage command. Requests not having code coverage are not tested.

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

  2. Add shouldExcludeUnmodifiedRequests in cli config

// Your cli config
{
    /*
        ...Rest of your cli config
    */
    shouldExcludeUnmodifiedRequests: true
}

We don't need to know your master branch for this feature, we store the commitId while updating coverage. We use that to calculate git diff.

  1. Run cli test

PreviousManual RequestNextServer hooks

Last updated 6 months ago