endorphin-ai 0.9.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +149 -388
- package/dist/bin/cli-handlers.d.ts +1 -3
- package/dist/bin/cli-handlers.d.ts.map +1 -1
- package/dist/bin/cli-handlers.js +13 -12
- package/dist/bin/cli-handlers.js.map +1 -1
- package/dist/bin/endorphin.d.ts.map +1 -1
- package/dist/bin/endorphin.js +21 -28
- package/dist/bin/endorphin.js.map +1 -1
- package/dist/examples/README-ENDORPHIN.md +1 -1
- package/dist/examples/endorphin.config.ts +2 -6
- package/dist/examples/tests/MULTI-USER-001.ts +132 -0
- package/dist/framework/ai/agent-setup.d.ts +1 -1
- package/dist/framework/ai/agent-setup.d.ts.map +1 -1
- package/dist/framework/ai/agent-setup.js +140 -80
- package/dist/framework/ai/agent-setup.js.map +1 -1
- package/dist/framework/ai/config/agent-config.d.ts +2 -5
- package/dist/framework/ai/config/agent-config.d.ts.map +1 -1
- package/dist/framework/ai/config/agent-config.js +2 -5
- package/dist/framework/ai/config/agent-config.js.map +1 -1
- package/dist/framework/ai/validation-agent.d.ts.map +1 -1
- package/dist/framework/ai/validation-agent.js +10 -12
- package/dist/framework/ai/validation-agent.js.map +1 -1
- package/dist/framework/automation/browser/browser-framework.d.ts +1 -2
- package/dist/framework/automation/browser/browser-framework.d.ts.map +1 -1
- package/dist/framework/automation/browser/browser-framework.js +2 -2
- package/dist/framework/automation/browser/browser-framework.js.map +1 -1
- package/dist/framework/automation/browser/browser-manager.d.ts +35 -0
- package/dist/framework/automation/browser/browser-manager.d.ts.map +1 -1
- package/dist/framework/automation/browser/browser-manager.js +190 -4
- package/dist/framework/automation/browser/browser-manager.js.map +1 -1
- package/dist/framework/automation/engines/browser-engine.d.ts +2 -2
- package/dist/framework/automation/engines/browser-engine.d.ts.map +1 -1
- package/dist/framework/automation/engines/browser-engine.js +35 -30
- package/dist/framework/automation/engines/browser-engine.js.map +1 -1
- package/dist/framework/automation/tools/content.d.ts.map +1 -1
- package/dist/framework/automation/tools/content.js +6 -27
- package/dist/framework/automation/tools/content.js.map +1 -1
- package/dist/framework/automation/tools/index.d.ts +1 -2
- package/dist/framework/automation/tools/index.d.ts.map +1 -1
- package/dist/framework/automation/tools/index.js +6 -5
- package/dist/framework/automation/tools/index.js.map +1 -1
- package/dist/framework/automation/tools/interaction.d.ts +4 -4
- package/dist/framework/automation/tools/interaction.d.ts.map +1 -1
- package/dist/framework/automation/tools/interaction.js +12 -10
- package/dist/framework/automation/tools/interaction.js.map +1 -1
- package/dist/framework/automation/tools/navigation.d.ts +1 -2
- package/dist/framework/automation/tools/navigation.d.ts.map +1 -1
- package/dist/framework/automation/tools/navigation.js +1 -0
- package/dist/framework/automation/tools/navigation.js.map +1 -1
- package/dist/framework/automation/tools/verification.d.ts +54 -0
- package/dist/framework/automation/tools/verification.d.ts.map +1 -1
- package/dist/framework/automation/tools/verification.js +250 -6
- package/dist/framework/automation/tools/verification.js.map +1 -1
- package/dist/framework/cli/builtin-tools-command.d.ts.map +1 -1
- package/dist/framework/cli/builtin-tools-command.js +20 -2
- package/dist/framework/cli/builtin-tools-command.js.map +1 -1
- package/dist/framework/cli/init-command.d.ts.map +1 -1
- package/dist/framework/cli/init-command.js +38 -10
- package/dist/framework/cli/init-command.js.map +1 -1
- package/dist/framework/config/browser-config.d.ts +3 -3
- package/dist/framework/config/browser-config.d.ts.map +1 -1
- package/dist/framework/config/browser-config.js +5 -2
- package/dist/framework/config/browser-config.js.map +1 -1
- package/dist/framework/config/constants.d.ts +3 -5
- package/dist/framework/config/constants.d.ts.map +1 -1
- package/dist/framework/config/constants.js +4 -5
- package/dist/framework/config/constants.js.map +1 -1
- package/dist/framework/config/system-context.d.ts +1 -1
- package/dist/framework/config/system-context.d.ts.map +1 -1
- package/dist/framework/config/system-context.js +18 -8
- package/dist/framework/config/system-context.js.map +1 -1
- package/dist/framework/core/ci-performance.d.ts +60 -0
- package/dist/framework/core/ci-performance.d.ts.map +1 -0
- package/dist/framework/core/ci-performance.js +301 -0
- package/dist/framework/core/ci-performance.js.map +1 -0
- package/dist/framework/core/config-loader.d.ts.map +1 -1
- package/dist/framework/core/config-loader.js +0 -18
- package/dist/framework/core/config-loader.js.map +1 -1
- package/dist/framework/core/config-manager.d.ts.map +1 -1
- package/dist/framework/core/config-manager.js +2 -13
- package/dist/framework/core/config-manager.js.map +1 -1
- package/dist/framework/core/debug-manager.d.ts +1 -1
- package/dist/framework/core/debug-manager.d.ts.map +1 -1
- package/dist/framework/core/global-setup-manager.d.ts +8 -0
- package/dist/framework/core/global-setup-manager.d.ts.map +1 -1
- package/dist/framework/core/global-setup-manager.js +39 -6
- package/dist/framework/core/global-setup-manager.js.map +1 -1
- package/dist/framework/core/resource-manager.d.ts +4 -0
- package/dist/framework/core/resource-manager.d.ts.map +1 -1
- package/dist/framework/core/resource-manager.js +44 -1
- package/dist/framework/core/resource-manager.js.map +1 -1
- package/dist/framework/core/session-manager.d.ts +4 -0
- package/dist/framework/core/session-manager.d.ts.map +1 -1
- package/dist/framework/core/session-manager.js +15 -0
- package/dist/framework/core/session-manager.js.map +1 -1
- package/dist/framework/core/test-framework-di.d.ts +1 -1
- package/dist/framework/core/test-framework-di.d.ts.map +1 -1
- package/dist/framework/core/test-framework-di.js +1 -1
- package/dist/framework/core/test-framework-di.js.map +1 -1
- package/dist/framework/core/test-framework.d.ts +16 -2
- package/dist/framework/core/test-framework.d.ts.map +1 -1
- package/dist/framework/core/test-framework.js +302 -12
- package/dist/framework/core/test-framework.js.map +1 -1
- package/dist/framework/execution/discovery/cli-functions.d.ts +3 -9
- package/dist/framework/execution/discovery/cli-functions.d.ts.map +1 -1
- package/dist/framework/execution/discovery/cli-functions.js +28 -54
- package/dist/framework/execution/discovery/cli-functions.js.map +1 -1
- package/dist/framework/execution/discovery/discovery-types.d.ts +0 -3
- package/dist/framework/execution/discovery/discovery-types.d.ts.map +1 -1
- package/dist/framework/execution/discovery/test-discoverer.d.ts +4 -0
- package/dist/framework/execution/discovery/test-discoverer.d.ts.map +1 -1
- package/dist/framework/execution/discovery/test-discoverer.js +51 -22
- package/dist/framework/execution/discovery/test-discoverer.js.map +1 -1
- package/dist/framework/execution/runner/test-runner.d.ts +6 -6
- package/dist/framework/execution/runner/test-runner.d.ts.map +1 -1
- package/dist/framework/execution/runner/test-runner.js +116 -159
- package/dist/framework/execution/runner/test-runner.js.map +1 -1
- package/dist/framework/index.d.ts +1 -1
- package/dist/framework/index.d.ts.map +1 -1
- package/dist/framework/index.js +2 -1
- package/dist/framework/index.js.map +1 -1
- package/dist/framework/managers/content/snapshot-manager.d.ts +2 -4
- package/dist/framework/managers/content/snapshot-manager.d.ts.map +1 -1
- package/dist/framework/managers/content/snapshot-manager.js +15 -29
- package/dist/framework/managers/content/snapshot-manager.js.map +1 -1
- package/dist/framework/managers/system/framework-manager.d.ts +0 -1
- package/dist/framework/managers/system/framework-manager.d.ts.map +1 -1
- package/dist/framework/managers/system/framework-manager.js +0 -9
- package/dist/framework/managers/system/framework-manager.js.map +1 -1
- package/dist/framework/reporters/performance-reporter.d.ts +19 -0
- package/dist/framework/reporters/performance-reporter.d.ts.map +1 -0
- package/dist/framework/reporters/performance-reporter.js +763 -0
- package/dist/framework/reporters/performance-reporter.js.map +1 -0
- package/dist/framework/reporting/generators/html-generator.d.ts.map +1 -1
- package/dist/framework/reporting/generators/html-generator.js +1 -0
- package/dist/framework/reporting/generators/html-generator.js.map +1 -1
- package/dist/framework/templates/reporter/scripts.d.ts +10 -2
- package/dist/framework/templates/reporter/scripts.d.ts.map +1 -1
- package/dist/framework/templates/reporter/scripts.js +148 -12
- package/dist/framework/templates/reporter/scripts.js.map +1 -1
- package/dist/framework/templates/reporter/styles.css +112 -0
- package/dist/framework/test-recorder/interactive-recorder.js +1 -1
- package/dist/framework/test-recorder/interactive-recorder.js.map +1 -1
- package/dist/framework/test-recorder/session-recorder.d.ts +1 -1
- package/dist/framework/test-recorder/session-recorder.d.ts.map +1 -1
- package/dist/framework/test-recorder/session-recorder.js +6 -5
- package/dist/framework/test-recorder/session-recorder.js.map +1 -1
- package/dist/framework/types/agent.d.ts.map +1 -0
- package/dist/framework/types/agent.js.map +1 -0
- package/dist/framework/types/cli.d.ts +0 -2
- package/dist/framework/types/cli.d.ts.map +1 -1
- package/dist/framework/types/config.d.ts +1 -5
- package/dist/framework/types/config.d.ts.map +1 -1
- package/dist/framework/types/index.d.ts +2 -2
- package/dist/framework/types/index.d.ts.map +1 -1
- package/dist/framework/types/recorder.d.ts +1 -1
- package/dist/framework/types/recorder.d.ts.map +1 -1
- package/dist/framework/types/structured-response.d.ts +27 -41
- package/dist/framework/types/structured-response.d.ts.map +1 -1
- package/dist/framework/types/structured-response.js +11 -23
- package/dist/framework/types/structured-response.js.map +1 -1
- package/dist/framework/types/test.d.ts +11 -2
- package/dist/framework/types/test.d.ts.map +1 -1
- package/dist/framework/utils/test-helpers.d.ts +1 -5
- package/dist/framework/utils/test-helpers.d.ts.map +1 -1
- package/dist/framework/utils/test-helpers.js +9 -24
- package/dist/framework/utils/test-helpers.js.map +1 -1
- package/dist/framework/utils/user-utils.d.ts +32 -0
- package/dist/framework/utils/user-utils.d.ts.map +1 -0
- package/dist/framework/utils/user-utils.js +60 -0
- package/dist/framework/utils/user-utils.js.map +1 -0
- package/dist/package.json +5 -2
- package/examples/README-ENDORPHIN.md +1 -1
- package/examples/endorphin.config.ts +2 -6
- package/examples/tests/MULTI-USER-001.ts +132 -0
- package/package.json +5 -2
- package/dist/framework/ai/types/agent.d.ts.map +0 -1
- package/dist/framework/ai/types/agent.js.map +0 -1
- package/dist/framework/automation/tools/content-optimization.d.ts +0 -44
- package/dist/framework/automation/tools/content-optimization.d.ts.map +0 -1
- package/dist/framework/automation/tools/content-optimization.js +0 -504
- package/dist/framework/automation/tools/content-optimization.js.map +0 -1
- package/dist/framework/content/processors/content-processor.d.ts +0 -40
- package/dist/framework/content/processors/content-processor.d.ts.map +0 -1
- package/dist/framework/content/processors/content-processor.js +0 -291
- package/dist/framework/content/processors/content-processor.js.map +0 -1
- /package/dist/framework/{ai/types → types}/agent.d.ts +0 -0
- /package/dist/framework/{ai/types → types}/agent.js +0 -0
package/README.md
CHANGED
|
@@ -4,15 +4,18 @@
|
|
|
4
4
|
# 💜 ENDORPHIN
|
|
5
5
|
|
|
6
6
|
## E2E Testing Reinvented with AI
|
|
7
|
-
</div>
|
|
8
7
|
|
|
9
8
|
Write tests in plain English. Let AI generate, validate, and fix them
|
|
10
9
|
automatically.
|
|
11
10
|
|
|
11
|
+
🌐 https://endorphinai.dev
|
|
12
|
+
|
|
13
|
+
</div>
|
|
14
|
+
|
|
12
15
|
<div align="center">
|
|
13
|
-
<img src="./doc/images/playwright-logo.png" alt="Playwright" height="
|
|
14
|
-
|
|
15
|
-
<img src="./doc/images/langchain-logo.png" alt="LangChain" height="
|
|
16
|
+
<img src="./doc/images/playwright-logo.png" alt="Playwright" height="30" />
|
|
17
|
+
<strong>+</strong>
|
|
18
|
+
<img src="./doc/images/langchain-logo.png" alt="LangChain" height="30" />
|
|
16
19
|
</div>
|
|
17
20
|
|
|
18
21
|
A powerful, modular browser automation framework using AI-powered testing with
|
|
@@ -34,6 +37,38 @@ comprehensive test management.
|
|
|
34
37
|
📊 Explore beautiful HTML reports with screenshots<br />
|
|
35
38
|
⚡ From setup to test execution in 10 minutes
|
|
36
39
|
</p>
|
|
40
|
+
<p style="margin-top: 20px;">
|
|
41
|
+
<a href="https://endorphinai.dev" style="color: #007bff; text-decoration: none; font-size: 18px; font-weight: bold;">
|
|
42
|
+
🌐 Visit our website for more examples and tutorials
|
|
43
|
+
</a>
|
|
44
|
+
</p>
|
|
45
|
+
</div>
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## 🌐 Read in Your Language
|
|
50
|
+
|
|
51
|
+
<div align="center">
|
|
52
|
+
<a href="doc/languages/ua/README-UA.md">🇺🇦 Українська</a>
|
|
53
|
+
<a href="doc/languages/de/README-DE.md">🇩🇪 Deutsch</a> •
|
|
54
|
+
<a href="doc/languages/fr/README-FR.md">🇫🇷 Français</a> •
|
|
55
|
+
<a href="doc/languages/es/README-ES.md">🇪🇸 Español</a> •
|
|
56
|
+
<a href="doc/languages/it/README-IT.md">🇮🇹 Italiano</a> •
|
|
57
|
+
<a href="doc/languages/pt/README-PT.md">🇵🇹 Português</a> •
|
|
58
|
+
<a href="doc/languages/ja/README-JA.md">🇯🇵 日本語</a> •
|
|
59
|
+
<a href="doc/languages/ko/README-KO.md">🇰🇷 한국어</a> •
|
|
60
|
+
<a href="doc/languages/zh/README-ZH.md">🇨🇳 中文</a> •
|
|
61
|
+
<a href="doc/languages/tr/README-TR.md">🇹🇷 Türkçe</a> •
|
|
62
|
+
<a href="doc/languages/nl/README-NL.md">🇳🇱 Nederlands</a> •
|
|
63
|
+
<a href="doc/languages/sv/README-SV.md">🇸🇪 Svenska</a> •
|
|
64
|
+
<a href="doc/languages/no/README-NO.md">🇳🇴 Norsk</a> •
|
|
65
|
+
<a href="doc/languages/da/README-DA.md">🇩🇰 Dansk</a> •
|
|
66
|
+
<a href="doc/languages/fi/README-FI.md">🇫🇮 Suomi</a> •
|
|
67
|
+
<a href="doc/languages/pl/README-PL.md">🇵🇱 Polski</a> •
|
|
68
|
+
<a href="doc/languages/ar/README-AR.md">🇸🇦 العربية</a> •
|
|
69
|
+
<a href="doc/languages/he/README-HE.md">🇮🇱 עברית</a> •
|
|
70
|
+
<a href="doc/languages/id/README-ID.md">🇮🇩 Indonesia</a> •
|
|
71
|
+
|
|
37
72
|
</div>
|
|
38
73
|
|
|
39
74
|
---
|
|
@@ -95,6 +130,10 @@ npx endorphin-ai generate report && npx endorphin-ai open report
|
|
|
95
130
|
- Interactive HTML reports with screenshots
|
|
96
131
|
- Complete project structure for scaling
|
|
97
132
|
|
|
133
|
+
### 🎬 Demo Video
|
|
134
|
+
|
|
135
|
+
https://github.com/user-attachments/assets/166b27d5-5da8-4aab-baaa-6924435f07a9
|
|
136
|
+
|
|
98
137
|
### 🔧 Troubleshooting Installation
|
|
99
138
|
|
|
100
139
|
If `npx endorphin-ai` doesn't work, try these **guaranteed solutions**:
|
|
@@ -121,6 +160,17 @@ endorphin-ai init
|
|
|
121
160
|
resolution, not a problem with Endorphin AI. The npm scripts above always work
|
|
122
161
|
regardless of npx behavior.
|
|
123
162
|
|
|
163
|
+
**Alternative npm scripts in package.json:**
|
|
164
|
+
```json
|
|
165
|
+
{
|
|
166
|
+
"scripts": {
|
|
167
|
+
"endorphin:init": "./node_modules/.bin/endorphin init",
|
|
168
|
+
"endorphin:version": "./node_modules/.bin/endorphin --version",
|
|
169
|
+
"endorphin:help": "./node_modules/.bin/endorphin --help"
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
```
|
|
173
|
+
|
|
124
174
|
### Manual Setup (Alternative)
|
|
125
175
|
|
|
126
176
|
If you prefer manual setup:
|
|
@@ -168,9 +218,11 @@ If you prefer manual setup:
|
|
|
168
218
|
priority: 'High',
|
|
169
219
|
tags: ['authentication', 'login', 'smoke'],
|
|
170
220
|
site: 'https://qafromla.herokuapp.com/',
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
221
|
+
data: async () => {
|
|
222
|
+
return {
|
|
223
|
+
originalEmail: 'papapin888@gmail.com',
|
|
224
|
+
originalPassword: 'lalalend',
|
|
225
|
+
};
|
|
174
226
|
},
|
|
175
227
|
task: `Navigate to https://qafromla.herokuapp.com/.
|
|
176
228
|
Click on "Log In" button. Wait 2 seconds for page load.
|
|
@@ -210,18 +262,25 @@ If you prefer manual setup:
|
|
|
210
262
|
### 📊 Beautiful Reports
|
|
211
263
|
|
|
212
264
|
- **Interactive HTML reports** with screenshots and step-by-step execution
|
|
265
|
+
- **Cost & token tracking** - Monitor AI usage and optimize expenses
|
|
266
|
+
- **AI decision history** - See exactly how AI analyzes and executes tests
|
|
213
267
|
- **Real-time filtering and search** to quickly find issues
|
|
214
268
|
- **Visual debugging** with click-to-zoom screenshots
|
|
215
269
|
- **Export capabilities** for sharing with your team
|
|
216
270
|
|
|
271
|
+
### 🎬 Report Demo
|
|
272
|
+
|
|
273
|
+
https://github.com/user-attachments/assets/83a900c6-9279-496d-bc12-f16fb98cf6dc
|
|
274
|
+
|
|
217
275
|
### 🛠️ Developer Experience
|
|
218
276
|
|
|
219
277
|
- **Zero configuration** - Works out of the box
|
|
220
278
|
- **TypeScript support** with full type definitions
|
|
221
|
-
- **
|
|
279
|
+
- **Smart test structure** - Dynamic setup, data generation, and task functions
|
|
280
|
+
- **Built-in tools system** - 12 comprehensive automation tools included
|
|
281
|
+
- **VS Code debugging** - Professional debugging with debug object access
|
|
222
282
|
- **Multiple browsers** - Chrome, Firefox, Safari support
|
|
223
|
-
- **
|
|
224
|
-
- **Hot reload** for rapid test development
|
|
283
|
+
- **Sequential execution** for reliable test runs
|
|
225
284
|
|
|
226
285
|
### 🎮 Interactive Tools
|
|
227
286
|
|
|
@@ -234,7 +293,7 @@ If you prefer manual setup:
|
|
|
234
293
|
|
|
235
294
|
## 🔄 Staying Updated
|
|
236
295
|
|
|
237
|
-
### Current Version: v0.
|
|
296
|
+
### Current Version: v0.9.0
|
|
238
297
|
|
|
239
298
|
```bash
|
|
240
299
|
# Check your current version
|
|
@@ -247,16 +306,18 @@ npm update endorphin-ai
|
|
|
247
306
|
npx endorphin-ai --help
|
|
248
307
|
```
|
|
249
308
|
|
|
250
|
-
### What's New in v0.
|
|
309
|
+
### What's New in v0.9.0
|
|
251
310
|
|
|
252
|
-
- ✅ **
|
|
253
|
-
|
|
254
|
-
- ✅ **
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
- ✅ **
|
|
258
|
-
- ✅ **
|
|
259
|
-
|
|
311
|
+
- ✅ **Smart Test Structure** - New async `setup()`, `data()`, and `task()`
|
|
312
|
+
functions for dynamic test preparation
|
|
313
|
+
- ✅ **Enhanced HTML Reports** - Interactive reports with cost tracking and AI
|
|
314
|
+
decision history
|
|
315
|
+
- ✅ **Cost & Token Tracking** - Monitor AI usage costs per test and per step
|
|
316
|
+
- ✅ **AI Decision History** - See exactly how AI analyzes and executes tests
|
|
317
|
+
- ✅ **Built-in Tools System** - 12 comprehensive browser automation tools (no
|
|
318
|
+
custom tools needed)
|
|
319
|
+
- ✅ **Professional Debugging** - VS Code integration with debug object access
|
|
320
|
+
- ✅ **CI/CD Ready** - Ready-to-use GitHub Actions workflows included
|
|
260
321
|
|
|
261
322
|
## 🚀 Project Initialization
|
|
262
323
|
|
|
@@ -316,9 +377,6 @@ npx endorphin-ai init
|
|
|
316
377
|
|
|
317
378
|
# What gets created:
|
|
318
379
|
# ├── tests/sample-test.ts # Ready-to-run TypeScript test
|
|
319
|
-
# ├── tools/ # Custom tools directory
|
|
320
|
-
# │ ├── jsonplaceholder-api.ts # Working API tool example
|
|
321
|
-
# │ └── README.md # Custom tools documentation
|
|
322
380
|
# ├── .env # API key configuration
|
|
323
381
|
# ├── endorphin.config.ts # Framework settings (TypeScript)
|
|
324
382
|
# ├── tsconfig.json # TypeScript configuration
|
|
@@ -421,22 +479,6 @@ npx endorphin open report report-2025-06-22.html
|
|
|
421
479
|
- **Responsive Design**: Works on desktop, tablet, and mobile
|
|
422
480
|
- **Performance Optimized**: Fast loading even with large test suites
|
|
423
481
|
|
|
424
|
-
### 🛠️ Report Management
|
|
425
|
-
|
|
426
|
-
```bash
|
|
427
|
-
# Clean up old test results (keep 10 most recent per test)
|
|
428
|
-
npx endorphin cleanup results
|
|
429
|
-
|
|
430
|
-
# Keep only 5 most recent results per test
|
|
431
|
-
npx endorphin cleanup results 5
|
|
432
|
-
|
|
433
|
-
# Clean up old report files (older than 30 days)
|
|
434
|
-
npx endorphin cleanup reports
|
|
435
|
-
|
|
436
|
-
# Clean up report files older than 7 days
|
|
437
|
-
npx endorphin cleanup reports 7
|
|
438
|
-
```
|
|
439
|
-
|
|
440
482
|
### 📖 Complete Guide
|
|
441
483
|
|
|
442
484
|
For detailed usage instructions, advanced features, and best practices, see the
|
|
@@ -448,7 +490,7 @@ Endorphin AI is built with a modular, extensible architecture designed for
|
|
|
448
490
|
reliability and maintainability.
|
|
449
491
|
|
|
450
492
|
📖
|
|
451
|
-
**[View detailed Framework Architecture documentation](./doc/Framework-Architecture.md)**
|
|
493
|
+
**[View detailed Framework Architecture documentation](./doc/framework-development/Framework-Architecture.md)**
|
|
452
494
|
|
|
453
495
|
### Key Components
|
|
454
496
|
|
|
@@ -502,7 +544,7 @@ npm run test:single QE-001 -- --no-headless
|
|
|
502
544
|
npx endorphin run test all --browser firefox
|
|
503
545
|
npx endorphin run test QE-001 --no-headless
|
|
504
546
|
npx endorphin run test all --viewport 1920x1080
|
|
505
|
-
npx endorphin run test all
|
|
547
|
+
npx endorphin run test all
|
|
506
548
|
npx endorphin run test all --model gpt-4
|
|
507
549
|
npx endorphin run test all --env staging
|
|
508
550
|
```
|
|
@@ -554,120 +596,61 @@ export const LOGOUT_TEST: TestCase = {
|
|
|
554
596
|
};
|
|
555
597
|
```
|
|
556
598
|
|
|
557
|
-
## 🔧
|
|
558
|
-
|
|
559
|
-
Endorphin AI supports custom tools that extend the framework's capabilities with
|
|
560
|
-
your own AI-powered functionality.
|
|
561
|
-
|
|
562
|
-
### 🚀 Quick Start with Custom Tools
|
|
563
|
-
|
|
564
|
-
When you run `npx endorphin-ai init`, you automatically get a working custom
|
|
565
|
-
tool example:
|
|
566
|
-
|
|
567
|
-
```bash
|
|
568
|
-
npx endorphin-ai init
|
|
569
|
-
# Creates tools/jsonplaceholder-api.ts - a working API testing tool
|
|
570
|
-
```
|
|
571
|
-
|
|
572
|
-
### 📝 Creating Custom Tools
|
|
573
|
-
|
|
574
|
-
Use the CLI to create new tools from templates:
|
|
599
|
+
## 🔧 Smart Test Structure (v0.9.0)
|
|
575
600
|
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
npx endorphin create tool my-custom-tool
|
|
579
|
-
|
|
580
|
-
# Create an API testing tool
|
|
581
|
-
npx endorphin create tool api-validator --template api
|
|
582
|
-
|
|
583
|
-
# Create a UI automation tool
|
|
584
|
-
npx endorphin create tool ui-helper --template ui
|
|
585
|
-
```
|
|
586
|
-
|
|
587
|
-
### ✅ Validate Your Tools
|
|
601
|
+
Endorphin AI v0.9.0 introduces a powerful new test structure with async
|
|
602
|
+
functions for dynamic test preparation.
|
|
588
603
|
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
```bash
|
|
592
|
-
# Validate all custom tools
|
|
593
|
-
npx endorphin validate tools
|
|
594
|
-
|
|
595
|
-
# List all available tools (built-in + custom)
|
|
596
|
-
npx endorphin list tools
|
|
597
|
-
|
|
598
|
-
# Show detailed information
|
|
599
|
-
npx endorphin list tools --verbose
|
|
600
|
-
```
|
|
601
|
-
|
|
602
|
-
### 🛠️ Tool Development
|
|
603
|
-
|
|
604
|
-
Create powerful custom tools in TypeScript:
|
|
605
|
-
|
|
606
|
-
```typescript
|
|
607
|
-
// tools/my-api-tool.ts
|
|
608
|
-
import { z } from 'zod';
|
|
609
|
-
import type { EnhancedBrowserTestFramework } from 'endorphin-ai';
|
|
610
|
-
|
|
611
|
-
export function createApiTool(framework: EnhancedBrowserTestFramework) {
|
|
612
|
-
return {
|
|
613
|
-
name: 'api-validator',
|
|
614
|
-
description: 'Validate API responses and data',
|
|
615
|
-
schema: z.object({
|
|
616
|
-
endpoint: z.string().describe('API endpoint to test'),
|
|
617
|
-
method: z.enum(['GET', 'POST', 'PUT', 'DELETE']).default('GET'),
|
|
618
|
-
expectedStatus: z.number().default(200),
|
|
619
|
-
}),
|
|
620
|
-
call: async ({ endpoint, method, expectedStatus }) => {
|
|
621
|
-
framework.logTestStep(`Testing ${method} ${endpoint}`);
|
|
622
|
-
|
|
623
|
-
const response = await fetch(endpoint, { method });
|
|
624
|
-
const data = await response.json();
|
|
625
|
-
|
|
626
|
-
if (response.status !== expectedStatus) {
|
|
627
|
-
throw new Error(`Expected ${expectedStatus}, got ${response.status}`);
|
|
628
|
-
}
|
|
629
|
-
|
|
630
|
-
return {
|
|
631
|
-
status: response.status,
|
|
632
|
-
data,
|
|
633
|
-
message: `API test passed: ${method} ${endpoint}`,
|
|
634
|
-
};
|
|
635
|
-
},
|
|
636
|
-
};
|
|
637
|
-
}
|
|
638
|
-
```
|
|
639
|
-
|
|
640
|
-
### ⚙️ Configuration
|
|
641
|
-
|
|
642
|
-
Add custom tools to your `endorphin.config.ts`:
|
|
604
|
+
### 🚀 New Test Format
|
|
643
605
|
|
|
644
606
|
```typescript
|
|
645
|
-
|
|
646
|
-
import type { FrameworkConfig } from 'endorphin-ai';
|
|
607
|
+
import type { TestCase } from 'endorphin-ai';
|
|
647
608
|
|
|
648
|
-
const
|
|
649
|
-
|
|
650
|
-
|
|
609
|
+
export const SMART_TEST: TestCase = {
|
|
610
|
+
id: 'LOGIN-001',
|
|
611
|
+
name: 'User Login Test',
|
|
612
|
+
description: 'Test login with generated credentials',
|
|
613
|
+
priority: 'High',
|
|
614
|
+
tags: ['auth', 'smoke'],
|
|
615
|
+
|
|
616
|
+
// Generate test data dynamically
|
|
617
|
+
data: async () => {
|
|
618
|
+
const timestamp = Date.now();
|
|
619
|
+
return {
|
|
620
|
+
email: `testuser${timestamp}@example.com`,
|
|
621
|
+
password: 'SecurePassword123!',
|
|
622
|
+
firstName: 'Test',
|
|
623
|
+
lastName: 'User',
|
|
624
|
+
};
|
|
625
|
+
},
|
|
651
626
|
|
|
652
|
-
//
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
627
|
+
// Set up test environment
|
|
628
|
+
setup: async () => {
|
|
629
|
+
return {
|
|
630
|
+
baseUrl: process.env.TEST_URL || 'https://example.com',
|
|
631
|
+
startTime: new Date().toISOString(),
|
|
632
|
+
};
|
|
633
|
+
},
|
|
658
634
|
|
|
659
|
-
//
|
|
635
|
+
// Main test instructions using generated data
|
|
636
|
+
task: async (data, setupData) => {
|
|
637
|
+
return `
|
|
638
|
+
Navigate to ${setupData.baseUrl}/login
|
|
639
|
+
Fill email with "${data.email}"
|
|
640
|
+
Fill password with "${data.password}"
|
|
641
|
+
Click Submit button
|
|
642
|
+
Verify welcome message contains "${data.firstName}"
|
|
643
|
+
`;
|
|
644
|
+
},
|
|
660
645
|
};
|
|
661
|
-
|
|
662
|
-
export default config;
|
|
663
646
|
```
|
|
664
647
|
|
|
665
|
-
###
|
|
666
|
-
|
|
667
|
-
For detailed documentation on creating, configuring, and using custom tools,
|
|
668
|
-
see:
|
|
648
|
+
### ✨ Key Benefits
|
|
669
649
|
|
|
670
|
-
**
|
|
650
|
+
- **Dynamic Data Generation** - Create unique test data for each run
|
|
651
|
+
- **Environment Setup** - Prepare test environment before execution
|
|
652
|
+
- **Type Safety** - Full TypeScript support for all functions
|
|
653
|
+
- **Backward Compatibility** - Old test format still works perfectly
|
|
671
654
|
|
|
672
655
|
## 📁 Project Structure
|
|
673
656
|
|
|
@@ -680,10 +663,6 @@ my-test-project/
|
|
|
680
663
|
│ ├── login-test.ts # Authentication tests
|
|
681
664
|
│ ├── checkout-test.ts # E-commerce tests
|
|
682
665
|
│ └── navigation-test.ts # UI/Navigation tests
|
|
683
|
-
├── tools/ # Custom tools (optional)
|
|
684
|
-
│ ├── jsonplaceholder-api.ts # API testing tool
|
|
685
|
-
│ ├── database-tool.ts # Database operations
|
|
686
|
-
│ └── custom-validators.ts # Custom validation tools
|
|
687
666
|
├── endorphin.config.ts # Optional configuration (TypeScript)
|
|
688
667
|
├── tsconfig.json # TypeScript configuration
|
|
689
668
|
└── package.json # Project config
|
|
@@ -703,10 +682,11 @@ export const QE001: TestCase = {
|
|
|
703
682
|
priority: 'High', // High, Medium, Low
|
|
704
683
|
tags: ['authentication', 'login', 'smoke'], // Categories
|
|
705
684
|
site: 'https://example.com/', // Target website
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
685
|
+
data: async () => {
|
|
686
|
+
return {
|
|
687
|
+
email: 'test@example.com',
|
|
688
|
+
password: 'password123',
|
|
689
|
+
};
|
|
710
690
|
},
|
|
711
691
|
task: `Your test instructions in plain English...`,
|
|
712
692
|
};
|
|
@@ -769,53 +749,6 @@ Create tests on-the-fly with guided prompts:
|
|
|
769
749
|
- Login test automation
|
|
770
750
|
- Content verification
|
|
771
751
|
|
|
772
|
-
## 🔍 Browser Automation Tools
|
|
773
|
-
|
|
774
|
-
Intelligent AI-powered tools for navigation, interaction, verification, and
|
|
775
|
-
utilities.
|
|
776
|
-
|
|
777
|
-
📖
|
|
778
|
-
**[View detailed tool documentation](./doc/Framework-Architecture.md#browser-automation-tools)**
|
|
779
|
-
|
|
780
|
-
---
|
|
781
|
-
|
|
782
|
-
## 💡 Common Use Cases
|
|
783
|
-
|
|
784
|
-
### 🔐 Authentication Testing
|
|
785
|
-
|
|
786
|
-
```bash
|
|
787
|
-
# Test login flows across different user types
|
|
788
|
-
npx endorphin run test --tag authentication
|
|
789
|
-
```
|
|
790
|
-
|
|
791
|
-
### 🛒 E-commerce Workflows
|
|
792
|
-
|
|
793
|
-
```bash
|
|
794
|
-
# Test complete purchase flows
|
|
795
|
-
npx endorphin run test --tag checkout
|
|
796
|
-
```
|
|
797
|
-
|
|
798
|
-
### 📱 Responsive Testing
|
|
799
|
-
|
|
800
|
-
```bash
|
|
801
|
-
# Test mobile, tablet, and desktop layouts
|
|
802
|
-
npx endorphin run test --tag responsive
|
|
803
|
-
```
|
|
804
|
-
|
|
805
|
-
### 🔍 Search & Navigation
|
|
806
|
-
|
|
807
|
-
```bash
|
|
808
|
-
# Test site search and menu navigation
|
|
809
|
-
npx endorphin run test --tag navigation
|
|
810
|
-
```
|
|
811
|
-
|
|
812
|
-
### 📊 Form Validation
|
|
813
|
-
|
|
814
|
-
```bash
|
|
815
|
-
# Test form submissions and validation
|
|
816
|
-
npx endorphin run test --tag forms
|
|
817
|
-
```
|
|
818
|
-
|
|
819
752
|
---
|
|
820
753
|
|
|
821
754
|
## 🏆 Why Choose Endorphin AI?
|
|
@@ -840,186 +773,6 @@ npx endorphin run test --tag forms
|
|
|
840
773
|
✅ **Type Safe**: Full TypeScript support
|
|
841
774
|
✅ **Extensible**: Modular architecture for custom needs
|
|
842
775
|
|
|
843
|
-
## 🎮 Complete CLI Reference
|
|
844
|
-
|
|
845
|
-
### Core Commands
|
|
846
|
-
|
|
847
|
-
#### Test Execution
|
|
848
|
-
|
|
849
|
-
```bash
|
|
850
|
-
# Run a specific test
|
|
851
|
-
npx endorphin run test TEST-001
|
|
852
|
-
|
|
853
|
-
# Run all tests
|
|
854
|
-
npx endorphin run test all
|
|
855
|
-
|
|
856
|
-
# Run tests by tag
|
|
857
|
-
npx endorphin run test --tag smoke
|
|
858
|
-
npx endorphin run test --tag authentication
|
|
859
|
-
|
|
860
|
-
# Run tests by priority
|
|
861
|
-
npx endorphin run test --priority High
|
|
862
|
-
npx endorphin run test --priority Medium
|
|
863
|
-
```
|
|
864
|
-
|
|
865
|
-
#### Test Creation & Recording
|
|
866
|
-
|
|
867
|
-
```bash
|
|
868
|
-
# Start interactive test recorder
|
|
869
|
-
npx endorphin run test-recorder
|
|
870
|
-
|
|
871
|
-
# List all available tests
|
|
872
|
-
npx endorphin list
|
|
873
|
-
```
|
|
874
|
-
|
|
875
|
-
#### Custom Tools Management
|
|
876
|
-
|
|
877
|
-
```bash
|
|
878
|
-
# Create a new custom tool
|
|
879
|
-
npx endorphin create tool my-tool
|
|
880
|
-
npx endorphin create tool api-tool --template api
|
|
881
|
-
npx endorphin create tool ui-tool --template ui
|
|
882
|
-
|
|
883
|
-
# Validate all custom tools
|
|
884
|
-
npx endorphin validate tools
|
|
885
|
-
|
|
886
|
-
# List all tools (built-in + custom)
|
|
887
|
-
npx endorphin list tools
|
|
888
|
-
npx endorphin list tools --verbose
|
|
889
|
-
```
|
|
890
|
-
|
|
891
|
-
#### Project Setup
|
|
892
|
-
|
|
893
|
-
```bash
|
|
894
|
-
# Initialize new project (recommended for new projects)
|
|
895
|
-
npx endorphin-ai init
|
|
896
|
-
|
|
897
|
-
# Show help and available commands
|
|
898
|
-
npx endorphin-ai --help
|
|
899
|
-
npx endorphin help
|
|
900
|
-
|
|
901
|
-
# Check current version
|
|
902
|
-
npx endorphin-ai --version
|
|
903
|
-
```
|
|
904
|
-
|
|
905
|
-
### HTML Reports & Analytics
|
|
906
|
-
|
|
907
|
-
#### Report Generation
|
|
908
|
-
|
|
909
|
-
```bash
|
|
910
|
-
# Generate full interactive HTML report
|
|
911
|
-
npx endorphin generate report
|
|
912
|
-
|
|
913
|
-
# Generate lightweight summary report
|
|
914
|
-
npx endorphin generate report --summary
|
|
915
|
-
```
|
|
916
|
-
|
|
917
|
-
#### Report Management
|
|
918
|
-
|
|
919
|
-
```bash
|
|
920
|
-
# Open latest report in browser
|
|
921
|
-
npx endorphin open report
|
|
922
|
-
|
|
923
|
-
# Open specific report file
|
|
924
|
-
npx endorphin open report report-2025-06-22.html
|
|
925
|
-
npx endorphin open report summary-report.html
|
|
926
|
-
```
|
|
927
|
-
|
|
928
|
-
#### Cleanup Commands
|
|
929
|
-
|
|
930
|
-
```bash
|
|
931
|
-
# Clean old test results (keep 10 most recent per test)
|
|
932
|
-
npx endorphin cleanup results
|
|
933
|
-
|
|
934
|
-
# Keep only 5 most recent results per test
|
|
935
|
-
npx endorphin cleanup results 5
|
|
936
|
-
|
|
937
|
-
# Clean old report files (older than 30 days)
|
|
938
|
-
npx endorphin cleanup reports
|
|
939
|
-
|
|
940
|
-
# Clean report files older than 7 days
|
|
941
|
-
npx endorphin cleanup reports 7
|
|
942
|
-
```
|
|
943
|
-
|
|
944
|
-
### Advanced Options
|
|
945
|
-
|
|
946
|
-
#### Browser Configuration
|
|
947
|
-
|
|
948
|
-
```bash
|
|
949
|
-
# Use different browsers
|
|
950
|
-
npx endorphin run test all --browser firefox
|
|
951
|
-
npx endorphin run test all --browser webkit
|
|
952
|
-
|
|
953
|
-
# Headless/headed mode
|
|
954
|
-
npx endorphin run test all --no-headless
|
|
955
|
-
npx endorphin run test all --headless
|
|
956
|
-
|
|
957
|
-
# Custom viewport
|
|
958
|
-
npx endorphin run test all --viewport 1920x1080
|
|
959
|
-
npx endorphin run test all --viewport 1366x768
|
|
960
|
-
```
|
|
961
|
-
|
|
962
|
-
#### AI & Performance
|
|
963
|
-
|
|
964
|
-
```bash
|
|
965
|
-
# Use different AI models
|
|
966
|
-
npx endorphin run test all --model gpt-4
|
|
967
|
-
npx endorphin run test all --model gpt-4o-mini
|
|
968
|
-
|
|
969
|
-
# Parallel execution
|
|
970
|
-
npx endorphin run test all --parallel 3
|
|
971
|
-
npx endorphin run test all --parallel 5
|
|
972
|
-
|
|
973
|
-
# Environment selection
|
|
974
|
-
npx endorphin run test all --env staging
|
|
975
|
-
npx endorphin run test all --env production
|
|
976
|
-
```
|
|
977
|
-
|
|
978
|
-
### npm Scripts Integration
|
|
979
|
-
|
|
980
|
-
Add these to your `package.json`:
|
|
981
|
-
|
|
982
|
-
```json
|
|
983
|
-
{
|
|
984
|
-
"scripts": {
|
|
985
|
-
"test": "endorphin run test all",
|
|
986
|
-
"test:smoke": "endorphin run test --tag smoke",
|
|
987
|
-
"test:auth": "endorphin run test --tag authentication",
|
|
988
|
-
"test:single": "endorphin run test",
|
|
989
|
-
"test:record": "endorphin run test-recorder",
|
|
990
|
-
"test:report": "endorphin generate report",
|
|
991
|
-
"test:summary": "endorphin generate report --summary",
|
|
992
|
-
"test:open": "endorphin open report",
|
|
993
|
-
"test:cleanup": "endorphin cleanup results",
|
|
994
|
-
"tools:create": "endorphin create tool",
|
|
995
|
-
"tools:validate": "endorphin validate tools",
|
|
996
|
-
"tools:list": "endorphin list tools",
|
|
997
|
-
"endorphin:init": "./node_modules/.bin/endorphin-ai init",
|
|
998
|
-
"endorphin:version": "./node_modules/.bin/endorphin --version",
|
|
999
|
-
"endorphin:help": "./node_modules/.bin/endorphin --help"
|
|
1000
|
-
}
|
|
1001
|
-
}
|
|
1002
|
-
```
|
|
1003
|
-
|
|
1004
|
-
Then use npm scripts:
|
|
1005
|
-
|
|
1006
|
-
```bash
|
|
1007
|
-
npm test # Run all tests
|
|
1008
|
-
npm run test:smoke # Run smoke tests
|
|
1009
|
-
npm run test:report # Generate HTML report
|
|
1010
|
-
npm run test:open # Open latest report
|
|
1011
|
-
|
|
1012
|
-
# Custom tools management:
|
|
1013
|
-
npm run tools:create my-tool # Create new tool
|
|
1014
|
-
npm run tools:validate # Validate all tools
|
|
1015
|
-
npm run tools:list # List all tools
|
|
1016
|
-
|
|
1017
|
-
# Guaranteed to work (bypasses npx issues):
|
|
1018
|
-
npm run endorphin:init # Initialize project
|
|
1019
|
-
npm run endorphin:version # Check version
|
|
1020
|
-
npm run endorphin:help # Get help
|
|
1021
|
-
```
|
|
1022
|
-
|
|
1023
776
|
## 🔄 Staying Updated
|
|
1024
777
|
|
|
1025
778
|
### Check Your Version
|
|
@@ -1050,7 +803,9 @@ npx endorphin-ai --version
|
|
|
1050
803
|
|
|
1051
804
|
### Version History & Features
|
|
1052
805
|
|
|
1053
|
-
- **v0.
|
|
806
|
+
- **v0.9.0** _(Latest)_: Smart test structure, enhanced HTML reports with cost
|
|
807
|
+
tracking, AI decision history, built-in tools system
|
|
808
|
+
- **v0.8.0**: Custom tools support with CLI management and templates
|
|
1054
809
|
- **v0.6.1**: Fixed npx resolution issues, enhanced user experience
|
|
1055
810
|
- **v0.6.0**: Enhanced CLI, security-first publishing, cross-platform CI/CD
|
|
1056
811
|
- **v0.5.0**: Advanced HTML reporting with interactive features
|
|
@@ -1076,13 +831,18 @@ Update with confidence - your existing tests won't break!
|
|
|
1076
831
|
|
|
1077
832
|
### 📚 Documentation
|
|
1078
833
|
|
|
1079
|
-
- **[Quick Start Guide](./
|
|
1080
|
-
|
|
1081
|
-
|
|
834
|
+
- **[Quick Start Guide](./doc/user-guide/Quick-Start.md)** - Get up and running
|
|
835
|
+
quickly
|
|
836
|
+
- **[Test Writing Tips](./doc/user-guide/Test-Writing-Tips.md)** - Enterprise &
|
|
837
|
+
small app examples
|
|
1082
838
|
- **[HTML Reporter Guide](./doc/user-guide/HTML-Reporter-Guide.md)** -
|
|
1083
|
-
Interactive reporting
|
|
1084
|
-
- **[
|
|
1085
|
-
|
|
839
|
+
Interactive reporting with cost tracking
|
|
840
|
+
- **[VS Code Debugging Guide](./doc/user-guide/VSCode-Debugging-Guide.md)** -
|
|
841
|
+
Professional debugging setup
|
|
842
|
+
- **[CI/CD Setup Guide](./doc/user-guide/CI-CD-Setup-Guide.md)** - GitHub
|
|
843
|
+
Actions integration
|
|
844
|
+
- **[Framework Architecture](./doc/framework-development/Framework-Architecture.md)** -
|
|
845
|
+
Technical deep dive
|
|
1086
846
|
|
|
1087
847
|
### 🐛 Issues & Feature Requests
|
|
1088
848
|
|
|
@@ -1114,10 +874,11 @@ questions
|
|
|
1114
874
|
---
|
|
1115
875
|
|
|
1116
876
|
<div align="center">
|
|
1117
|
-
<p><strong>⚡
|
|
877
|
+
<p><strong>⚡ Happy Vibetesting!</strong></p>
|
|
1118
878
|
<p>
|
|
1119
879
|
<a href="#-installation--setup">Get Started Now</a> •
|
|
1120
880
|
<a href="https://youtu.be/ev_71RBO6g8?si=F9xTPSJNp36Mr1wx">Watch Demo</a> •
|
|
1121
|
-
<a href="./doc/">Documentation</a>
|
|
881
|
+
<a href="./doc/">Documentation</a> •
|
|
882
|
+
<a href="https://endorphinai.dev">Website</a>
|
|
1122
883
|
</p>
|
|
1123
884
|
</div>
|