Skip to content

Commit

Permalink
docs: explain multi suite session (#219)
Browse files Browse the repository at this point in the history
* pr-fix: correct merge w/ 'main'

* chore: eat your own logging dog food

* docs: explain multi-suite active session id
  • Loading branch information
stijnmoreels authored Nov 4, 2024
1 parent 4b1b3ae commit 56ae7a0
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion docs/preview/02-Features/06-Integration/01-data-factory.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,16 @@ await TemporaryDataFlowDebugSession.StartDebugSessionAsync(..., options =>
});
```

> 💡 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.
> #### 💡 Leveraging the `ActiveSessionId` option
> 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.
>
> ⚡ 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:
>
> 1. Run a **custom script** task before any of the test suites to start a debug session.
> 2. Set a new **pipeline variable with the session ID** of the active debug session.
> 3. Get the pipeline variable in your tests suites to assign it to the `ActiveSessionId` option.
> 4. Run a custom script after all the test suites to stop the debug session.
> * ⚠️ **_Make sure that this always runs, even if the tests fail._**
### Full example
The following snippet provides a full examples of how the `TemporaryDataFlowDebugSession` test fixture can be used as a singleton test fixture across tests.
Expand Down

0 comments on commit 56ae7a0

Please sign in to comment.