Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
89 commits
Select commit Hold shift + click to select a range
d791e53
setup tests and metrics
PlushevyiMishka May 14, 2025
603db93
Add: implement waitMs function, Logger class, and WebRTCMetricsCollec…
Regani May 19, 2025
ec729ee
Add: implement action interfaces and update event bus for improved ev…
Regani May 19, 2025
b96560f
Add: implement request action and enhance scenario context management
Regani May 19, 2025
eb1960b
Add: readme
Regani May 20, 2025
9a72f59
Default sounds
PlushevyiMishka May 21, 2025
564f77a
Default sounds
PlushevyiMishka May 21, 2025
fbdf707
Add: refactor test scenario structure and enhance action handling
Regani May 22, 2025
94add9a
telemetry setup
PlushevyiMishka May 23, 2025
15f6872
Merge remote-tracking branch 'origin/testSetup' into testSetup
PlushevyiMishka May 23, 2025
1bae864
Add: enhance WebSocket handling and improve action response management
Regani May 23, 2025
79b957c
Add: enhance telemetry logging and improve audio playback handling
Regani May 23, 2025
bd9c384
Add: implement QrynLogger for enhanced logging and metrics collection
Regani May 23, 2025
8276441
Add: implement headless-compatible audio system and enhance playClip …
Regani May 26, 2025
d2b9da7
create Dockerfile, gitlab-ci, start,sh
OksanaChulan May 26, 2025
8cb0962
Update .gitlab-ci.yml file
May 26, 2025
964a2c2
Update start.sh
May 26, 2025
492801b
qryn-client package added; send logs & metrics implementation
May 27, 2025
f46f150
Merge remote-tracking branch 'origin/testSetup' into testSetup
PlushevyiMishka May 27, 2025
09320e3
Update .gitlab-ci.yml
May 27, 2025
837fdbe
Merge branch 'testSetup' of github.com:OpenSIPS/opensips-js into test…
Regani May 27, 2025
4ca62e0
Update env.ts PARAMETERS type
May 27, 2025
0dd8e9b
Update TestScenariosBuilder.ts to handle PARAMETERS object
May 27, 2025
f653d75
Merge branch 'testSetup' of github.com:OpenSIPS/opensips-js into test…
Regani May 27, 2025
b33bcba
Update .gitlab-ci.yml
May 27, 2025
9dde84f
Merge branch 'testSetup' of github.com:OpenSIPS/opensips-js into test…
Regani May 27, 2025
04ebf1d
Merge remote-tracking branch 'origin/testSetup' into testSetup
PlushevyiMishka May 27, 2025
1800517
Update .gitlab-ci.yml
May 27, 2025
ca9f3fa
Add: support conditional WebSocket event handling based on checkSentE…
Regani May 27, 2025
f9491c9
Merge branch 'testSetup' of github.com:OpenSIPS/opensips-js into test…
Regani May 27, 2025
9d07527
Merge remote-tracking branch 'origin/testSetup' into testSetup
PlushevyiMishka May 27, 2025
fd70907
Update .gitlab-ci.yml
May 27, 2025
b1d7860
Update: ActionExecutor.ts
PlushevyiMishka May 27, 2025
19efe8b
Merge remote-tracking branch 'origin/testSetup' into testSetup
PlushevyiMishka May 27, 2025
ecb1082
Update .gitlab-ci.yml
May 27, 2025
83600c8
Update .gitlab-ci.yml file
May 27, 2025
8154f1c
Merge branch 'testSetup' of github.com:OpenSIPS/opensips-js into test…
Regani May 27, 2025
cd8029b
metrics send to grafana added
May 27, 2025
0dce155
Merge remote-tracking branch 'origin/testSetup' into testSetup
PlushevyiMishka May 27, 2025
969f75b
Merge branch 'testSetup' of github.com:OpenSIPS/opensips-js into test…
Regani May 27, 2025
527a5d1
Merge branch 'testSetupTraces' of github.com:OpenSIPS/opensips-js int…
Regani May 27, 2025
90beab3
Update .gitlab-ci.yml file
May 27, 2025
9521383
traces to grafana addded
May 27, 2025
fa7b1c6
Merge remote-tracking branch 'origin/testSetup' into testSetup
May 27, 2025
6f94806
changed env struct to be compatible with the gitlab ci variables
May 27, 2025
95b87cd
env headers zod handle fix
May 27, 2025
a49df14
Update .gitlab-ci.yml file
May 27, 2025
766d836
Update start.sh
May 28, 2025
35d2658
Refactor: reorganize test files and update imports for consistency
Regani May 28, 2025
3fd5d69
update true
OksanaChulan May 28, 2025
a76026c
Update Dockerfile
May 28, 2025
43b27ae
added logs to find scenario unhold issue
May 28, 2025
f7ddd6c
try catchs commented to avoid unhold issue for now; logs deleted
May 28, 2025
3566099
uncommented try catchs and status_code deleted
May 28, 2025
29be837
commented try catches again
May 28, 2025
2dde5f4
uncomment try catchs; status_code 100 instead of 200
May 28, 2025
60c46ae
Update: рщдв-гтрщдв
PlushevyiMishka May 28, 2025
f9e114d
branch oksana merged to testSetuo
May 29, 2025
6032b6f
Add: implement telemetry spans for actions and events in TestExecutor…
Regani May 29, 2025
e5ea8c0
Merge branch 'testSetup' of github.com:OpenSIPS/opensips-js into test…
Regani May 29, 2025
e49948f
webrtc send to qryn
May 29, 2025
6c42848
metrics fix
May 29, 2025
38cdbea
metrics documentation added
May 29, 2025
d95f2e4
telemetry service code clearing
May 30, 2025
114257a
deleted classes related to logs; logs commented
May 30, 2025
acd82f4
changes logger to qrynClient
Jun 2, 2025
78ed61b
commented some logs
Jun 2, 2025
e35efd3
commented some functionality
Jun 2, 2025
ccbd574
uncomment one log
Jun 2, 2025
7731bd2
Add: Added the ui section for management test JSON files
rostvuenet Jun 2, 2025
c2b6460
Update: remove pre tag
rostvuenet Jun 2, 2025
b0cc54f
Update: small update Readme file
rostvuenet Jun 2, 2025
114af08
Update: removed nuxt image modules from nuxt.config file
rostvuenet Jun 3, 2025
22e4748
Add: implement expectation handling for action responses in ActionsEx…
Regani Jun 5, 2025
30c14d1
Add: extend expectation handling with dynamic properties in scenarios…
Regani Jun 5, 2025
99bcec5
merged testSetup to testSetupQrynClient
Jun 19, 2025
fd0203b
qryn logs uncommented and added
Jun 19, 2025
efae439
Update: answer
PlushevyiMishka Jun 23, 2025
fadcb8d
Fix: handle potential undefined `status_code` and add error handling …
PlushevyiMishka Jun 23, 2025
b5da710
Fix: answer action
PlushevyiMishka Jun 23, 2025
3655877
Add room transfer functionality, including test scenarios and UI comp…
PlushevyiMishka Jul 4, 2025
7596f7b
[testSetup] Update: Transform waitUntil into a symphony of events 🎶✨
Regani Jul 7, 2025
0418140
Merge branch 'testSetupQrynClient' into testSetup
PlushevyiMishka Jul 7, 2025
cb41bc5
Added test duplication functionality
LiranSo Jul 16, 2025
4f4dab7
Added duplicate button and functionality in FileEditTab. To Fix - no …
LiranSo Jul 29, 2025
3b2720d
Merged changes from 'testSetup' branch
LiranSo Aug 18, 2025
c0419c9
Merged from testSetup
LiranSo Aug 18, 2025
763c04a
Latest tests version
PlushevyiMishka Nov 3, 2025
16debf6
Latest tests version
PlushevyiMishka Nov 3, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,5 +1,43 @@
# AWS S3 Configuration (existing)
S3_BUCKET=
S3_REGION=
S3_ACCESS_KEY_ID=
S3_SECRET_ACCESS_KEY=
S3_CLOUDFRONT_DISTRIBUTION_ID=

# OpenSIPS-JS Testing Framework Environment Configuration

# Test execution
SAMPLETOEXECUTE=tests2/samples/e2e/sample.json
PORT=5173

# GIGAPIPE Configuration for qryn integration
# DEFAULT configuration is used as fallback for all services if no specific config provided

# Default configuration (fallback for all services)
GIGAPIPE.DEFAULT.url=https://your-qryn-instance.com
GIGAPIPE.DEFAULT.scope=test
GIGAPIPE.DEFAULT.headers.Authorization=Bearer your-token
GIGAPIPE.DEFAULT.headers.X-Scope-OrgID=your-org-id

# Service-specific overrides (optional)
# GIGAPIPE.TRACING.url=https://your-qryn-tracing.com
# GIGAPIPE.TRACING.scope=tracing
# GIGAPIPE.TRACING.headers.Authorization=Bearer your-tracing-token

# GIGAPIPE.METRICS.url=https://your-qryn-metrics.com
# GIGAPIPE.METRICS.scope=metrics
# GIGAPIPE.METRICS.headers.Authorization=Bearer your-metrics-token

# GIGAPIPE.LOGS.url=https://your-qryn-logs.com
# GIGAPIPE.LOGS.scope=logs
# GIGAPIPE.LOGS.headers.Authorization=Bearer your-logs-token

# SIP test parameters
PARAMETERS.CALLER.sip_domain=your-sip-domain.com
PARAMETERS.CALLER.username=caller
PARAMETERS.CALLER.password=your-password

PARAMETERS.CALLEE.sip_domain=your-sip-domain.com
PARAMETERS.CALLEE.username=callee
PARAMETERS.CALLEE.password=your-password
6 changes: 4 additions & 2 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@ module.exports = {
],
ignorePatterns: [
'src/helpers/webrtcmetrics/',
'docs'
'docs',
'tests/ui'
],
rules: {
'space-before-blocks': 'off'
'space-before-blocks': 'off',
'no-dupe-class-members': 'off'
},
env: {
es2021: true,
Expand Down
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -188,3 +188,9 @@ fabric.properties
# .pnp.*

# End of https://www.toptal.com/developers/gitignore/api/webstorm,node,yarn

# Playwright
/test-results/
/playwright-report/
/blob-report/
/playwright/.cache/
63 changes: 63 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
stages:
- test_stage
- build_stage
- deploy_stage

variables:
IMAGE_NAME: "registry.voicenter.co/voicenter/mirrored-opensips-js"
GITHUB_IMAGE_NAME: "ghcr.io/voicenterteam/opensipsjs-test"

test:
stage: test_stage
image: mcr.microsoft.com/playwright:v1.52.0-jammy
script:
- yarn install --frozen-lockfile
- npx playwright install
- chmod +x start.sh
- ./start.sh
only:
- branches
artifacts:
paths:
- node_modules/
- dist/
expire_in: 1 hour
tags:
- gitRunCT


build:
stage: build_stage
image: docker:latest
services:
- docker:dind
script:
- docker login registry.voicenter.co -u $dplUser -p $dplPswd
- docker build -t $IMAGE_NAME:$CI_COMMIT_BRANCH .
- docker tag $IMAGE_NAME:$CI_COMMIT_BRANCH $IMAGE_NAME:latest
- docker push $IMAGE_NAME:${CI_COMMIT_BRANCH}
- docker push $IMAGE_NAME:latest
dependencies:
- test
only:
- branches
tags:
- gitRunCT

deploy:
stage: deploy_stage
image: docker:latest
services:
- docker:dind
script:
- docker login registry.voicenter.co -u $dplUser -p $dplPswd
- docker pull $IMAGE_NAME:$CI_COMMIT_BRANCH
- echo "$GHCR_TOKEN" | docker login ghcr.io -u $GHCR_USER --password-stdin
- docker tag $IMAGE_NAME:$CI_COMMIT_BRANCH $GITHUB_IMAGE_NAME:$CI_COMMIT_BRANCH
- docker push $GITHUB_IMAGE_NAME:$CI_COMMIT_BRANCH
only:
- branches
dependencies:
- build
tags:
- gitRunCT
140 changes: 140 additions & 0 deletions DEBUG_SETUP.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
# Debug Server Setup for OpenSIPS-JS Testing Framework

This setup provides a local debug server to collect and visualize logs, metrics, and traces from your OpenSIPS-JS testing framework.

## Quick Start

### 1. Start the Debug Server

```bash
yarn debug-server
```

This starts the debug server at `http://localhost:3001`

### 2. Access the Dashboard

Open your browser and go to:
```
http://localhost:3001
```

You'll see a real-time dashboard showing:
- 📝 **Logs**: All QrynLogger output with structured metadata
- 📊 **Metrics**: Test event metrics and custom metrics
- 🔗 **Traces**: OpenTelemetry traces with spans
- 🎵 **WebRTC**: Real-time audio quality metrics

### 3. Run Tests with Debug Mode

```bash
yarn run-test-debug
```

This automatically:
1. Copies the debug configuration (`.env.debug` → `.env`)
2. Runs your tests with all telemetry pointing to the local debug server

## What You'll See

### Dashboard Features

- **Real-time Updates**: Auto-refreshes every 5 seconds
- **Scenario Correlation**: All data tagged with scenario names for easy filtering
- **Structured Data**: Logs include metadata, metrics include labels
- **Clear Functionality**: Reset collected data anytime
- **Color Coding**: Errors highlighted in red, different data types color-coded

### Logs Section
```
2024-01-15T10:30:15.123Z [My Test Scenario] [ActionsExecutor] - Executing register action
{
"data": {
"username": "caller",
"sip_domain": "example.com"
}
}
```

### Metrics Section
```
opensips_test_events_total: 1
Labels: {
"scenario_name": "My Test Scenario",
"event_name": "register",
"stage": "triggered",
"status": "success"
}
```

### WebRTC Section
```
opensips_webrtc_jitter_ms: 12.5
Labels: {
"scenario_name": "My Test Scenario",
"metric_type": "webrtc_audio"
}
```

## Debug Server Endpoints

The server exposes the same endpoints that qryn would use:

- **Logs**: `POST /loki/api/v1/push` (Loki format)
- **Traces**: `POST /v1/traces` (OpenTelemetry format)
- **Metrics**: `POST /v1/metrics` (OpenTelemetry format)
- **Prometheus**: `POST /api/v1/prom/remote/write` (Prometheus format)
- **Legacy**: `POST /collect-metrics` (Fallback format)

## Configuration

The debug configuration (`.env.debug`) sets:

```bash
# Local debug server configuration
GIGAPIPE.DEFAULT.url=http://localhost:3001
GIGAPIPE.DEFAULT.scope=debug
GIGAPIPE.DEFAULT.headers.Content-Type=application/json
```

This makes all services (logs, traces, metrics) use the local debug server.

## Troubleshooting

### No Data Appearing?

1. **Check Server**: Ensure debug server is running on port 3001
2. **Check Configuration**: Verify `.env` points to `http://localhost:3001`
3. **Check Console**: Look for connection errors in the debug server console
4. **Check Browser**: Open browser dev tools to see any frontend errors

### Port Conflicts?

If port 3001 is busy, edit `debug-server.js`:
```javascript
const PORT = 3002 // Change to available port
```

And update `.env.debug`:
```bash
GIGAPIPE.DEFAULT.url=http://localhost:3002
```

### Clear Old Data

Click "Clear All" in the dashboard or restart the debug server.

## Production vs Debug

- **Debug Mode**: Uses local server for easy visualization
- **Production Mode**: Configure real qryn endpoints in `.env`

The same code works for both - just change the endpoint URLs!

## Benefits

- ✅ **Verify Integration**: See that all telemetry is working
- ✅ **Debug Issues**: Trace problems across logs/metrics/traces
- ✅ **Performance Monitoring**: Watch WebRTC quality in real-time
- ✅ **Scenario Correlation**: Filter by scenario name
- ✅ **No External Dependencies**: Works offline locally
17 changes: 17 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM mcr.microsoft.com/playwright:v1.52.0-jammy

WORKDIR /app

COPY package.json yarn.lock ./
RUN apt-get update && yarn install --ignore-engines
RUN npx playwright install


COPY . .

EXPOSE 5173

COPY start.sh ./
RUN chmod +x start.sh

CMD ["./start.sh"]
Loading