prix-r9 2.0.3 → 2.0.4
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 +17 -16
- package/import-curl.js +2 -1
- package/index.js +2 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -55,19 +55,19 @@ Este formato sigue funcionando sin cambios:
|
|
|
55
55
|
|
|
56
56
|
```json
|
|
57
57
|
{
|
|
58
|
-
"url": "https://api.
|
|
58
|
+
"url": "https://api.example.test/v1/usuarios",
|
|
59
59
|
"method": "POST",
|
|
60
60
|
"startRate": 5,
|
|
61
61
|
"targetRate": 50,
|
|
62
62
|
"rampUpTime": 5,
|
|
63
63
|
"duration": 10,
|
|
64
64
|
"headers": {
|
|
65
|
-
"Authorization": "Bearer
|
|
65
|
+
"Authorization": "Bearer {{uuid}}",
|
|
66
66
|
"X-Request-ID": "{{uuid}}"
|
|
67
67
|
},
|
|
68
68
|
"body": {
|
|
69
69
|
"id_unico": "{{uuid}}",
|
|
70
|
-
"correo_usuario": "prueba_{{timestamp}}@
|
|
70
|
+
"correo_usuario": "prueba_{{timestamp}}@example.test"
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
```
|
|
@@ -80,13 +80,14 @@ Si necesitas probar un endpoint local como `https://localhost:64847/...` con cer
|
|
|
80
80
|
|
|
81
81
|
```json
|
|
82
82
|
{
|
|
83
|
-
"url": "https://localhost:64847/
|
|
83
|
+
"url": "https://localhost:64847/api/reportes/GetByCompany",
|
|
84
84
|
"method": "POST",
|
|
85
85
|
"rate": 1,
|
|
86
86
|
"duration": 1,
|
|
87
87
|
"insecureHttps": true,
|
|
88
88
|
"headers": {
|
|
89
|
-
"Content-Type": "application/json"
|
|
89
|
+
"Content-Type": "application/json",
|
|
90
|
+
"ApiKey": "dev-local-api-key"
|
|
90
91
|
},
|
|
91
92
|
"body": {
|
|
92
93
|
"StartDate": "2026-03-01",
|
|
@@ -111,7 +112,7 @@ La forma mas simple es usar `steps` con el mismo formato que genera `prix-r9-cur
|
|
|
111
112
|
|
|
112
113
|
```json
|
|
113
114
|
{
|
|
114
|
-
"name": "Carga encadenada
|
|
115
|
+
"name": "Carga encadenada de aprobacion",
|
|
115
116
|
"startRate": 2,
|
|
116
117
|
"targetRate": 5,
|
|
117
118
|
"rampUpTime": 5,
|
|
@@ -119,19 +120,19 @@ La forma mas simple es usar `steps` con el mismo formato que genera `prix-r9-cur
|
|
|
119
120
|
"steps": [
|
|
120
121
|
{
|
|
121
122
|
"name": "uploadProcess",
|
|
122
|
-
"url": "https://
|
|
123
|
+
"url": "https://api.example.test/modulo-cargas/api/blob/uploadProcess",
|
|
123
124
|
"method": "post",
|
|
124
125
|
"headers": {
|
|
125
126
|
"Accept": "application/json, text/plain, */*",
|
|
126
|
-
"Authorization": "Bearer
|
|
127
|
+
"Authorization": "Bearer {{uuid}}"
|
|
127
128
|
},
|
|
128
129
|
"file": "./Plantillas/PlantillaMovimientoManual.csv",
|
|
129
130
|
"filekey": "File",
|
|
130
131
|
"body": {
|
|
131
132
|
"TypeFile": "1",
|
|
132
|
-
"ReasonProcess": "Carga
|
|
133
|
-
"CreatedBy": "
|
|
134
|
-
"TypeProcessId": "
|
|
133
|
+
"ReasonProcess": "Carga ejemplo {{timestamp}}",
|
|
134
|
+
"CreatedBy": "Usuario QA",
|
|
135
|
+
"TypeProcessId": "11111111-2222-3333-4444-555555555555"
|
|
135
136
|
},
|
|
136
137
|
"extract": {
|
|
137
138
|
"uploadFileProcessId": "$.uploadFileProcessId"
|
|
@@ -139,17 +140,17 @@ La forma mas simple es usar `steps` con el mismo formato que genera `prix-r9-cur
|
|
|
139
140
|
},
|
|
140
141
|
{
|
|
141
142
|
"name": "executeLoadProcess",
|
|
142
|
-
"url": "https://
|
|
143
|
+
"url": "https://api.example.test/modulo-cargas/api/approvals/ExecuteLoadProcess",
|
|
143
144
|
"method": "post",
|
|
144
145
|
"headers": {
|
|
145
146
|
"Accept": "application/json, text/plain, */*",
|
|
146
147
|
"Content-Type": "application/json",
|
|
147
|
-
"apiKey": "
|
|
148
|
+
"apiKey": "example-api-key"
|
|
148
149
|
},
|
|
149
150
|
"body": {
|
|
150
151
|
"UploadFileProcessId": "{{uploadFileProcessId}}",
|
|
151
152
|
"AprovalStatus": 1,
|
|
152
|
-
"ApprovedBy": "
|
|
153
|
+
"ApprovedBy": "Usuario QA"
|
|
153
154
|
}
|
|
154
155
|
}
|
|
155
156
|
]
|
|
@@ -202,10 +203,10 @@ Ejemplo:
|
|
|
202
203
|
|
|
203
204
|
```json
|
|
204
205
|
{
|
|
205
|
-
"url": "https://api/
|
|
206
|
+
"url": "https://api.example.test/uploads",
|
|
206
207
|
"method": "post",
|
|
207
208
|
"headers": {
|
|
208
|
-
"Authorization": "Bearer
|
|
209
|
+
"Authorization": "Bearer {{uuid}}"
|
|
209
210
|
},
|
|
210
211
|
"file": "./foto.jpg",
|
|
211
212
|
"filekey": "File",
|
package/import-curl.js
CHANGED
|
@@ -5,7 +5,7 @@ const { program } = require('commander');
|
|
|
5
5
|
const { toJsonString } = require('curlconverter');
|
|
6
6
|
|
|
7
7
|
program
|
|
8
|
-
.version('2.0.
|
|
8
|
+
.version('2.0.4')
|
|
9
9
|
.description('Importador de cURL a config JSON base para pruebas de carga')
|
|
10
10
|
.requiredOption('-i, --input <path>', 'Archivo de texto (.txt) que contiene el comando cURL crudo')
|
|
11
11
|
.requiredOption('-o, --output <path>', 'Ruta de destino para el config JSON de la prueba (ej: casos/az/nuevo-endpoint.json)')
|
|
@@ -117,3 +117,4 @@ try {
|
|
|
117
117
|
|
|
118
118
|
|
|
119
119
|
|
|
120
|
+
|
package/index.js
CHANGED
|
@@ -13,7 +13,7 @@ const BODY_METHODS = new Set(['POST', 'PUT', 'PATCH']);
|
|
|
13
13
|
const PLACEHOLDER_PATTERN = /\{\{([^{}]+)\}\}/g;
|
|
14
14
|
|
|
15
15
|
program
|
|
16
|
-
.version('2.0.
|
|
16
|
+
.version('2.0.4')
|
|
17
17
|
.description('Herramienta Avanzada HTTP/REST (Ramp-up y Datos Dinámicos)')
|
|
18
18
|
.option('-c, --config <path>', 'Ruta a un archivo JSON con toda la configuración')
|
|
19
19
|
.option('--prompt', 'Copia el template promptInforme.txt al directorio actual')
|
|
@@ -754,3 +754,4 @@ runTest()
|
|
|
754
754
|
|
|
755
755
|
|
|
756
756
|
|
|
757
|
+
|