EndToEnd Test Framework for package creators

May 15, 2011 at 1:36 PM

I really love the EndToEnd test framework you have written for NuGet. I want to adapt it to allow end-to-end testing of custom nuget packages.

Specifically, this means that the workflow I want to achieve is the following:

  1. Build the library 
  2. Run Unit/Integration test
  3. Build NuGet Package
  4. Install built package into acceptance test project that verifies end-to-end functionality
  5. build acceptance tests project
  6. run acceptance test

Using the command line nuget.exe doesn't cut it since it won't install packages into csproj's. Any input on how to achieve step number 4? I imagine such a facility would be incredibly useful for package creators to test their nupkg.

May 16, 2011 at 10:18 PM

This is tricky to achieve, because the only reliable way to install a package to a VS project is to do it inside VS. The command line nuget.exe never touches the .project file.

That being said, we may consider adding support for this in the future. We also welcome contribution ;-)

May 16, 2011 at 11:12 PM

@dotnetjunky: I wonder if we could have the packages.config file have a section where it can handle autorun kind of scenarios? So that when VS is loading and we are initializing NuGet it could kick off what ever the script is especially things like PowerShell scripts. Although I am not sure if that could potentially introduce some sort of a security threat.

May 16, 2011 at 11:49 PM

Now I'm confused. JohannesRudolph said he wants to be able install the packages from nuget.exe. How does your suggestion help?

May 17, 2011 at 1:09 AM

@dotnetjunky: I did it again :) What I was thinking was the following:

We don't want to be modifying the project files outside of visual studio so what I was thinking of the process was this:

  1. Build the library
  2. Run Unit/Integration test
  3. Build NuGet Package using commandline pack command
  4. Update the packages.config file with something that would tell VS NuGet extension to execute it on Project Load (this could execute the powershell script to install the package(s) needed for the functional testing)
  5. Execute Functional Testing of the new NuGet package

Hopefully this makes more sense