You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: sdk/test-utils/recorder/MIGRATION.md
+13-12Lines changed: 13 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,6 +15,7 @@ The new recorder is version 2.0.0 of the `@azure-tools/test-recorder` package. U
15
15
// ...
16
16
"devDependencies": {
17
17
// ...
18
+
"@azure-tools/test-credential" : "^1.0.0", // If you're using `@azure/identity` in your tests
18
19
"@azure-tools/test-recorder": "^2.0.0"
19
20
}
20
21
}
@@ -40,6 +41,8 @@ Note the difference between the dev-tool `node-ts-input` and `node-js-input` com
40
41
-`node-ts-input` runs the tests using `ts-node`, without code coverage.
41
42
-`node-js-input` runs the tests using the built JavaScript output, and generates coverage reporting using `nyc`.
42
43
44
+
Compare with the older test runs to make sure you're running all the tests/files as before.
45
+
43
46
## Initializing the recorder
44
47
45
48
The approach taken to initialize the recorder depends on whether the SDK being tested uses Core v1 ([`core-http`]) or Core v2 ([`core-rest-pipeline`]). If your SDK is on Core v2, read on. If you're still on Core v1, [jump to the section on Core v1 below](#for-core-v1-sdks).
@@ -49,6 +52,8 @@ The approach taken to initialize the recorder depends on whether the SDK being t
49
52
The recorder is implemented as a custom policy which should be attached to your client's pipeline. Firstly, initialize the recorder:
@@ -213,13 +218,9 @@ Other sanitizers for more complex use cases are also available.
213
218
214
219
## AAD and the new `NoOpCredential`
215
220
216
-
The new recorder does not record AAD traffic at present. As such, tests with clients using AAD should make use of the new `@azure-tools/test-credential` package, installed as follows:
The new recorder does not record AAD traffic at present. As such, tests with clients using AAD should make use of the new `@azure-tools/test-credential` package.
221
222
222
-
This package provides a `NoOpCredential` implementation of `TokenCredential` which makes no network requests, and should be used in playback mode. The provided `createTestCredential` helper will handle switching between NoOpCredential in playback and ClientSecretCredential when recording for you:
223
+
This package provides a `NoOpCredential` implementation of `TokenCredential` which makes no network requests, and should be used in playback mode. The provided `createTestCredential` helper will handle switching between `NoOpCredential` in playback and `ClientSecretCredential` when recording for you:
0 commit comments