Skip to content

Commit cfb410d

Browse files
authored
[VBLOCKS:4237] feat: upload integration tests to Datadog (#320)
* feat: data-dog integration * add dd to node_modules * nit * nit * remove sudo * bin * update dd version * reports to ignore files and clean up
1 parent ffa1ed0 commit cfb410d

File tree

6 files changed

+7243
-1581
lines changed

6 files changed

+7243
-1581
lines changed

.circleci/config.yml

+17-3
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,9 @@ commands:
101101
destination: coverage
102102
integration-tests:
103103
parameters:
104+
datadog-test-service:
105+
type: string
106+
default: ""
104107
start_relay_server:
105108
type: boolean
106109
default: false
@@ -116,6 +119,9 @@ commands:
116119
- run:
117120
name: Running integration tests
118121
command: bash scripts/run-integration-tests.sh
122+
- run:
123+
name: Upload test results to Datadog
124+
command: ./node_modules/.bin/datadog-ci junit upload --service <<parameters.datadog-test-service>> reports/junit-report.xml
119125
network-tests:
120126
steps:
121127
- get-code
@@ -165,6 +171,9 @@ jobs:
165171
type: string
166172
build_label:
167173
type: string
174+
datadog-test-service:
175+
type: string
176+
default: ""
168177
integration_test_files:
169178
type: string
170179
default: ""
@@ -182,6 +191,7 @@ jobs:
182191
INTEGRATION_TEST_FILES: <<parameters.integration_test_files>>
183192
steps:
184193
- integration-tests:
194+
datadog-test-service: <<parameters.datadog-test-service>>
185195
start_relay_server: <<parameters.start_relay_server>>
186196
run-release:
187197
parameters:
@@ -246,6 +256,7 @@ workflows:
246256
- dockerhub-pulls
247257
- vblocks-js
248258
start_relay_server: false
259+
datadog-test-service: "healthcheck-integration-tests-<<matrix.browser>>-<<matrix.bver>>"
249260
matrix:
250261
parameters:
251262
browser: ["chrome"]
@@ -265,13 +276,14 @@ workflows:
265276
context:
266277
- vblocks-js
267278
name: Build Checks
268-
datadog-test-service: "daily-build-workflow"
279+
datadog-test-service: "daily-build-unit-tests"
269280
- run-integration-tests:
270281
name: Integration tests <<matrix.browser>> <<matrix.bver>>
271282
context:
272283
- dockerhub-pulls
273284
- vblocks-js
274285
start_relay_server: true
286+
datadog-test-service: "daily-build-integration-tests-<<matrix.browser>>-<<matrix.bver>>"
275287
matrix:
276288
parameters:
277289
browser: ["chrome", "firefox"]
@@ -287,13 +299,14 @@ workflows:
287299
context:
288300
- vblocks-js
289301
name: Build Checks
290-
datadog-test-service: "pull-request-workflow"
302+
datadog-test-service: "pull-request-unit-tests"
291303
- run-integration-tests:
292304
name: Integration tests <<matrix.browser>> <<matrix.bver>>
293305
context:
294306
- dockerhub-pulls
295307
- vblocks-js
296308
start_relay_server: true
309+
datadog-test-service: "pull-request-integration-tests-<<matrix.browser>>-<<matrix.bver>>"
297310
matrix:
298311
parameters:
299312
browser: ["chrome", "firefox"]
@@ -324,13 +337,14 @@ workflows:
324337
context:
325338
- vblocks-js
326339
name: Build Checks
327-
datadog-test-service: "release-workflow"
340+
datadog-test-service: "release-unit-tests"
328341
- run-integration-tests:
329342
name: Integration tests <<matrix.browser>> <<matrix.bver>>
330343
context:
331344
- dockerhub-pulls
332345
- vblocks-js
333346
start_relay_server: true
347+
datadog-test-service: "release-integration-tests-<<matrix.browser>>-<<matrix.bver>>"
334348
matrix:
335349
parameters:
336350
browser: ["chrome", "firefox"]

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ docs
1212
lib/twilio/constants.ts
1313
nodemon.json
1414
tests/webpack/package-lock.json
15+
reports

.npmignore

+1
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,4 @@ server.js
2323
templates
2424
tests
2525
tslint.json
26+
reports

karma.conf.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,15 @@ module.exports = function(config: any) {
110110
'lib/**/*.ts': 'karma-typescript',
111111
'tests/integration/**/*.ts': 'karma-typescript',
112112
},
113-
reporters: ['spec', 'karma-typescript'],
113+
reporters: ['spec', 'karma-typescript', 'junit'],
114114
singleRun: true,
115115
browserDisconnectTolerance: 3,
116116
browserDisconnectTimeout : 5000,
117117
browserNoActivityTimeout : 120000,
118+
junitReporter: {
119+
outputDir: 'reports',
120+
outputFile: 'junit-report.xml',
121+
useBrowserName: false
122+
}
118123
});
119124
};

0 commit comments

Comments
 (0)