MCPcopy Index your code
hub / github.com/DevExpress/testcafe-hammerhead

github.com/DevExpress/testcafe-hammerhead @v31.7.8

Chat with this repo
repository ↗ · DeepWiki ↗ · release v31.7.8 ↗ · + Follow
2,732 symbols 7,212 edges 394 files 1 documented · 0% 2 cross-repo links
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

testcafe-hammerhead

testcafe-hammerhead is a powerful Web proxy used as a core for the TestCafe testing framework.

Core Concepts

testcafe-hammerhead is a URL-rewriting proxy. This means that it rewrites all properties of the appropriate JavaScript objects that contain a URL value (Location, HTMLLinkElement.href, etc). You can see it if you open a proxied page, invoke the browser's DevTools and inspect any element.

In addition, the proxied web page does not know that it is opened under a proxy. The proxy intercepts access attempts to all URL-containing properties and provides the original values.

First Look

  1. Clone the Hammerhead repository cmd git clone https://github.com/DevExpress/testcafe-hammerhead.git
  2. Go to the testcafe-hammerhead folder cmd cd testcafe-hammerhead
  3. Install the dependencies cmd npm install
  4. Run the Hammerhead playground to see our proxy in action cmd node node_modules/gulp/bin/gulp http-playground

This opens a playground page where you can specify a webpage to proxy. Enter the page URL and hit Proxy!.

Features

  • HTTP/HTTPS requests
  • WebSockets, EventSource
  • file upload
  • request events (onRequest, onResponse)
  • bypassing requests
  • custom UI on a web page

Reporting Issues and Contributing

Read our Contributing Guide to learn how to contribute to the project.

Build Status

Sauce Test Status

Extension points exported contracts — how you extend this code

StorageSandboxStrategy (Interface)
(no doc) [5 implementers]
src/client/sandbox/storages/index.ts
DestinationRequestEvents (Interface)
(no doc) [4 implementers]
src/request-pipeline/destination-request/index.ts
Cookies (Interface)
(no doc) [1 implementers]
ts-defs/index.d.ts
ParsedPath (Interface)
(no doc)
src/utils/asar.ts
Route (Interface)
(no doc)
src/proxy/router.ts
UserScript (Interface)
(no doc)
src/session/index.ts
CopiedFileInfo (Interface)
(no doc)
src/upload/storage.ts
Dictionary (Interface)
(no doc)
src/typings/common.ts

Core symbols most depended-on inside this repo

appendChild
called by 428
src/client/sandbox/node/element.ts
get
called by 286
src/client/settings.ts
removeChild
called by 271
src/client/sandbox/node/element.ts
toString
called by 265
src/request-pipeline/request-hooks/request-filter-rule/index.ts
setAttribute
called by 227
src/client/sandbox/node/element.ts
openSession
called by 185
src/proxy/index.ts
on
called by 164
src/request-pipeline/destination-request/index.ts
request
called by 163
src/client/transport-worker/request.ts

Shape

Method 1,176
Function 1,162
Class 257
Interface 126
Enum 11

Languages

TypeScript100%

Modules by API surface

src/client/utils/dom.ts109 symbols
src/client/sandbox/node/window.ts94 symbols
src/client/sandbox/node/element.ts73 symbols
ts-defs/index.d.ts72 symbols
src/client/sandbox/shadow-ui.ts62 symbols
src/client/sandbox/event/simulator.ts62 symbols
src/client/sandbox/storages/index.ts47 symbols
src/request-pipeline/context/index.ts41 symbols
src/processing/dom/index.ts41 symbols
src/processing/script/node-builder.ts36 symbols
src/client/sandbox/cookie/index.ts33 symbols
test/client/fixtures/sandbox/event/focus-blur-change-test.js32 symbols

Used by 2 indexed graphs manifest dependencies, hub-wide

For agents

$ claude mcp add testcafe-hammerhead \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact