
Product
A Fresh Look for the Socket Dashboard
We’ve redesigned the Socket dashboard with simpler navigation, less visual clutter, and a cleaner UI that highlights what really matters.
cypress-plugin-network-shim
Advanced tools
A plugin for Cypress.io tests enabling record and replay of application network requests.
This is a utility for Cypress.io end-to-end testing which enables recording snapshots of real backend traffic.
The generated snapshots can then be used to replay or "stub" the network on subsequent test runs, effectively mocking out the server to increase test repeatability and performance.
There are three modes of operation:
Your project must be using Cypress:
yarn install --dev cypress
yarn install --dev cypress-plugin-network-shim
In cypress/support/index.js
initialize the Network Shim:
import initNetworkShim from 'cypress-plugin-network-shim'
initNetworkShim();
// Cypress.NetworkShim should now be accessible from any Cypress support or test file
In a test file, i.e. cypress/integration/test.spec.js
, add the following:
before(() => {
Cypress.NetworkShim.enable({
specName: 'test',
});
});
At this point, the network shim will be enabled whenever this test is run.
> export CYPRESS_NETWORK_SHIM_HOST_API=https://api.example.com
> export CYPRESS_NETWORK_SHIM_MODE=GENERATE
> cypress
OR
> cypress --env NETWORK_SHIM_HOST_API=https://api.example.com --env NETWORK_SHIM_MODE=GENERATE
To set default app-wide network shim configuration, pass a configuration object to initNetworkShim
in cypress/support/index.js
:
import initNetworkShim from 'cypress-plugin-network-shim'
initNetworkShim({
hosts: {
'api': 'https://api.example.com'
}
});
FAQs
A plugin for Cypress.io tests enabling record and replay of application network requests.
The npm package cypress-plugin-network-shim receives a total of 2 weekly downloads. As such, cypress-plugin-network-shim popularity was classified as not popular.
We found that cypress-plugin-network-shim demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
We’ve redesigned the Socket dashboard with simpler navigation, less visual clutter, and a cleaner UI that highlights what really matters.
Industry Insights
Terry O’Daniel, Head of Security at Amplitude, shares insights on building high-impact security teams, aligning with engineering, and why AI gives defenders a fighting chance.
Security News
MCP spec updated with structured tool output, stronger OAuth 2.1 security, resource indicators, and protocol cleanups for safer, more reliable AI workflows.