Implementation:DevExpress Testcafe EmbeddingUtils
| Knowledge Sources | |
|---|---|
| Domains | API, Extensibility |
| Last Updated | 2026-02-12 12:00 GMT |
Overview
Concrete utility module exposing internal TestCafe types and utilities for third-party tools and IDE plugins that embed TestCafe as a library.
Description
The embedding-utils module exports internal TestCafe utilities that are not part of the public user-facing API but are needed by tools that embed TestCafe. These include test run internals, command types, error handling, browser management, and compiler functions. This module serves as the integration surface for IDE plugins, custom reporters, and other tooling that needs access to TestCafe's internal machinery.
Usage
Import this module from third-party tools that integrate with TestCafe, such as IDE test runners, custom automation frameworks, or debugging tools.
Code Reference
Source Location
- Repository: DevExpress_Testcafe
- File: src/embedding-utils.js
- Lines: 1-103
Signature
module.exports = {
TestRun,
TestRunErrorFormattableAdapter,
testRunErrors,
COMMAND_TYPE,
TEST_RUN_PHASE,
BrowserConnection,
BrowserConnectionGateway,
createTestCafe,
// ... additional internal utilities
};
Import
const embeddingUtils = require('testcafe/lib/embedding-utils');
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| (module import) | require | Yes | Import the module to access internal types |
Outputs
| Name | Type | Description |
|---|---|---|
| TestRun | class | Internal test run class |
| BrowserConnection | class | Browser connection class |
| COMMAND_TYPE | enum | All test run command types |
| createTestCafe | function | Factory for creating TestCafe instances |
Usage Examples
// IDE plugin accessing TestCafe internals
const { TestRun, BrowserConnection, COMMAND_TYPE } = require('testcafe/lib/embedding-utils');
// Access command types for custom reporting
console.log(COMMAND_TYPE.click);
console.log(COMMAND_TYPE.typeText);