Skip to content

Commit

Permalink
Add README.md for Shared/RepoTesting
Browse files Browse the repository at this point in the history
  • Loading branch information
radical committed Jul 17, 2024
1 parent 54b2037 commit 610bf1f
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/Shared/RepoTesting/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Running tests outside-of-repo

This provides support for running tests outside of the repo, for example on a helix agent.
- For this you need the source of the tests, and any dependencies.
- Instead of direct `ProjectReferences` to the various Aspire hosting, and component projects use
`@(ComponentReferenceForTests)`, and @(NonComponentReferenceForTests)`.
- These are converted to `ProjectReference` when `$(TestsRunningOutsideOfRepo) != true`.
- But converted to `PackageReference` when `$(TestsRunningOutsideOfRepo) == true`.

- To allow building such test projects, the build is isolated and patched to build outside the
repo by adding appropriate `Directory.Build.{props,targets}`, and `Directory.Packages.props`
- and using a custom `nuget.config` which resolves the Aspire packages from the locally built packages
- and a `Directory.Packages.Versions.props` is generated with PackageVersions taken from the repo
- This also adds properties named in `@(PropertyForHelixRun)` from the repo, like `$(NetCurrent)`.

## Adding new package versions

Add any new package versions used by test projects in `tests/Shared/RepoTesting/Directory.Packages.Helix.props`.

0 comments on commit 610bf1f

Please sign in to comment.