Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add runbytestlist command #2219

Merged
merged 1 commit into from Jun 17, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -13,7 +13,7 @@ public partial class V2FeedTest : GalleryTestBase
{
[TestMethod]
[Description("Upload two packages and then issue the FindPackagesById request, expect to return both versions")]
[Priority(0)]
[Priority(1)]
public void FindPackagesByIdTest()
{
string packageId = "TestV2FeedFindPackagesById" + "." + DateTime.Now.Ticks.ToString();
Expand Down
65 changes: 65 additions & 0 deletions tests/Scripts/RunByTestList.cmd
@@ -0,0 +1,65 @@
@echo off

Echo Clear previulsly defined GalleryUrl
set GalleryURl=

SET List=%1
if "%List%"=="" (
goto Error1
)

SET Param=%2
if "%Param%" NEQ "" (
ECHO Param is defined. Setting GalleryUrl to %Param%.
SET GalleryUrl=%Param%
)

REM If GalleryUrl is still not defined, the default is to use int.nugettest.org
if "%GalleryUrl%"=="" (
ECHO Setting GalleryUrl to the default - int.nugettest.org
SET GalleryUrl=https://int.nugettest.org/
)
ECHO The NuGet gallery tests are running against %GalleryUrl%

If Exist ""%VS120COMNTOOLS%"\..\IDE\mstest.exe" (
set toolpath=%VS120COMNTOOLS%
set VisualStudioVersion=12.0
goto Run
)

If Exist ""%VS110COMNTOOLS%"..\IDE\mstest.exe" (
set toolpath=%VS110COMNTOOLS%
set VisualStudioVersion=11.0
goto Run
)

:Error
Echo The variable toolpath is not set correctly. check your visual studio install. Exiting without running tests...
goto End

:Run
Echo.
Echo. Build the NuGet Gallery solution...
call ..\..\build.cmd
Echo Done.
Echo.

Echo Build the NuGet Gallery test solution...
%WinDir%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe ..\NuGetGallery.FunctionalTests.sln
Echo Done.
Echo.

Echo Start running NuGet Gallery Functional tests by test list...
set
Echo The path to mstest.exe is "%toolpath%..\IDE\mstest.exe"
"%toolpath%..\IDE\mstest.exe" /testlist:%List% /testmetadata:"..\NuGetGallery.FunctionalTests.vsmdi"
Echo Finished running NuGet Gallery Functional tests...
Echo Exit.
goto End

:Error1
Echo The variable testlist is not set correctly. It must be set for tests to run...
goto End

:End
exit /b 0