diff --git a/docs/build-server.md b/docs/build-server.md index 6578eeea49..f6d9776ead 100644 --- a/docs/build-server.md +++ b/docs/build-server.md @@ -102,3 +102,11 @@ if (BuildServerDetector.Detected) ``` snippet source | anchor + + +## Attachments + +For MSTest and NUnit, Verify will add new received files to the test context's attachments. So for build servers that respect MSTest or NUnit attachment APIs, no changes are required to build configurations. + + * [NUnit Attachments](https://docs.nunit.org/articles/nunit/writing-tests/TestContext.html#addformatter-32) + * [MSTest TestContext.AddResultFile](https://learn.microsoft.com/en-us/dotnet/api/microsoft.visualstudio.testtools.unittesting.testcontext.addresultfile?view=visualstudiosdk-2022#microsoft-visualstudio-testtools-unittesting-testcontext-addresultfile(system-string)) diff --git a/docs/mdsource/build-server.source.md b/docs/mdsource/build-server.source.md index b2df4b1f02..03c91bfacd 100644 --- a/docs/mdsource/build-server.source.md +++ b/docs/mdsource/build-server.source.md @@ -25,4 +25,9 @@ In some scenarios, as part of a build, the test assemblies are copied to a diffe For example a possible implementation for [AppVeyor](https://www.appveyor.com/) could be: -snippet: DerivePathInfoAppVeyor \ No newline at end of file +snippet: DerivePathInfoAppVeyor + + +## Attachments + +include: test-context-attachments \ No newline at end of file diff --git a/docs/mdsource/test-context-attachments.include.md b/docs/mdsource/test-context-attachments.include.md new file mode 100644 index 0000000000..b2e55900da --- /dev/null +++ b/docs/mdsource/test-context-attachments.include.md @@ -0,0 +1,4 @@ +For MSTest and NUnit, Verify will add new received files to the test context's attachments. So for build servers that respect MSTest or NUnit attachment APIs, no changes are required to build configurations. + + * [NUnit Attachments](https://docs.nunit.org/articles/nunit/writing-tests/TestContext.html#addformatter-32) + * [MSTest TestContext.AddResultFile](https://learn.microsoft.com/en-us/dotnet/api/microsoft.visualstudio.testtools.unittesting.testcontext.addresultfile?view=visualstudiosdk-2022#microsoft-visualstudio-testtools-unittesting-testcontext-addresultfile(system-string)) \ No newline at end of file