Skip to content

Commit 56ae7a0

Browse files
authored
docs: explain multi suite session (#219)
* pr-fix: correct merge w/ 'main' * chore: eat your own logging dog food * docs: explain multi-suite active session id
1 parent 4b1b3ae commit 56ae7a0

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

docs/preview/02-Features/06-Integration/01-data-factory.mdx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,16 @@ await TemporaryDataFlowDebugSession.StartDebugSessionAsync(..., options =>
4949
});
5050
```
5151

52-
> 💡 The `ActiveSessionId` is useful when developing locally when you do not want to start/stop the debug session on every run. But this also means that in case an active session is found, it will not be teardown when the test fixture disposes. This follows the 'clean environment' principle that test fixtures should only be responsible for the things they set up.
52+
> #### 💡 Leveraging the `ActiveSessionId` option
53+
> The `ActiveSessionId` is useful when developing locally when you do not want to start/stop the debug session on every run. But this also means that in case an active session is found, it will not be teardown when the test fixture disposes. This follows the 'clean environment' principle that test fixtures should only be responsible for the things they set up.
54+
>
55+
> ⚡ Because of this functionality, you can even use the same debug session across different test suites/projects. These things need to happen to set this up:
56+
>
57+
> 1. Run a **custom script** task before any of the test suites to start a debug session.
58+
> 2. Set a new **pipeline variable with the session ID** of the active debug session.
59+
> 3. Get the pipeline variable in your tests suites to assign it to the `ActiveSessionId` option.
60+
> 4. Run a custom script after all the test suites to stop the debug session.
61+
> * ⚠️ **_Make sure that this always runs, even if the tests fail._**
5362
5463
### Full example
5564
The following snippet provides a full examples of how the `TemporaryDataFlowDebugSession` test fixture can be used as a singleton test fixture across tests.

0 commit comments

Comments
 (0)