-
Notifications
You must be signed in to change notification settings - Fork 2
Testing
Testing
Organization
Running individual test scripts from Visual Studio
-
Build
- Build
NuGetSharedif necessary - Build the test project
- Build
-
Start or Stop NuGetShared
The NuGetShared module contains code shared by the other projects. This can cause problems when executing test scripts. The other projects' psm1 modules import NuGetShared if necessary. Tests don't always see it if it is already imported and import it again. This causes Pester to fail in Mock. The workaround is to preload NuGetShared. It needs to be removed and imported again when it has been rebuilt.
-
Set up the
PowerShell Interactive WindowSelect the
PowerShell Interactive Windowand enterGet-Moduleto to see the imported modules. UseRemove-Moduleto remove any of the solution's modules: NuGetShared, NuGetDebPacker and DbSolutionBuilder.-
When testing
NuGetSharedUse
Import-Moduleto import NuGetSharedImport-Module .\NugetShared\bin\Debug\NuGetShared\NuGetShared.psm1 -
When testing other projects
Use
Import-Moduleto import NuGetShared first then the module being testedImport-Module .\NugetShared\bin\Debug\NuGetShared\NuGetShared.psd1Import-Module .\DbSolutionBuilder\bin\Debug\DbSolutionBuilder\DbSolutionBuilder.psm1
-
-