In order to test a package, I would like to use a test environment which would include many other packages, on which the tested package does not depend. I think it should be possible to have an ad hoc environment in the test folder (is that a thing?), but so far I have not been able to make it work.
BTW when developing a package pkgname I got used to start Julia with julia --project=@pkgname which creates an environment in the .julia/environments folder (I think since 1.7). This avoids accidental addition of dependecies to the package (which itself needs to be dev-d to that environment).
And you can do ]test pkgname.
@PetrKryslUCSD , not to add to give information overload, but I wrote up a tutorial for this for the Julia docs for the upcoming 1.9 release: Unit Testing · The Julia Language I wrote it for my student assistants who were having trouble writing tests – let me know if it could use some improvements!