Skip to content

Commit

Permalink
1.0.7000.0 Release
Browse files Browse the repository at this point in the history
  • Loading branch information
JiajunW committed Sep 9, 2019
2 parents 6e1e9e9 + 1b62c9f commit 5496c8b
Show file tree
Hide file tree
Showing 13 changed files with 313 additions and 244 deletions.
39 changes: 28 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,33 @@ It implements the fundamentals to support Protocol Test Suite, including logging

PTF is based on Windows platform.
You should install the softwares listed below based on your testing purpose, including their own dependencies.
* [Visual Studio 2017](https://visualstudio.microsoft.com/downloads/) with some individual components required by installing in Visual Studio Installer:

|Individual Component\Purpose|Run test suites based on Protocol Test Framework (PTF)|Build Protocol Test Framework (PTF) from source code|
|---|---|---|
|.NET Framework 4.7.1 targeting pack|Required|Required|
|Testing tools core features|Required|Required|
|.NET Framework 4.7.1 SDK||Required|
|C# and Visual Basic Roslyn compilers||Required|
* [Spec Explorer 2010 v3.5.3146.0](https://visualstudiogallery.msdn.microsoft.com/271d0904-f178-4ce9-956b-d9bfa4902745/). It is required if you want to build Protocol Test Framework (PTF) from source code.
* [Wix Toolset v3.11](https://github.com/wixtoolset/wix3/releases/tag/wix3111rtm) and [Wix Toolset Visual Studio 2017 Extension](https://marketplace.visualstudio.com/items?itemName=RobMensching.WixToolsetVisualStudio2017Extension). It is required if you want to build Protocol Test Framework (PTF) from source code.
1. [Visual Studio](https://visualstudio.microsoft.com/downloads/) 2017 or higher ([Visual Studio 2017 Community](https://aka.ms/vs/15/release/vs_community.exe) recommended), installed with these individual components from the installer:

|Section|Individual Component in Visual Studio 2017|Individual Component in Visual Studio 2019|Run Windows Protocol Test Suites|Build Windows Protocol Test Suites from source code|
|---|---|---|---|---|
|.NET|.NET Framework 4.7.1 SDK|.NET Framework 4.7.1 SDK||Required|
|.NET|.NET Framework 4.7.1 targeting pack|.NET Framework 4.7.1 targeting pack|Required|Required|
|Compilers, build tools, and runtime|C# and Visual Basic Roslyn compilers|C# and Visual Basic Roslyn compilers||Required|
|Debugging and testing|Testing tools core features||Required<sup>[1](#footnote1)</sup>|Required<sup>[1](#footnote1)</sup>|

Note:

<a name="footnote1">1</a>: This individual component is installed in Visual Studio 2019 by default.

1. [Spec Explorer 2010 v3.5.3146.0](https://visualstudiogallery.msdn.microsoft.com/271d0904-f178-4ce9-956b-d9bfa4902745/)

It is only required if you want to build or run the test suites that contain Model-Based Test cases. If you want to regenerate Model-Based Test cases, you must install Visual Studio 2012.
1. Enable .NET Framework 3.5.1

1. _Turn Windows features on or off_
1. Enable _.NET Framework 3.5 (includes .NET 2.0 and 3.0)_

This is necessary for WiX Toolset.
1. [WiX Toolset v3.14](https://wixtoolset.org/releases/v3-14-0-2927/)

1. [WiX Toolset Visual Studio 2017 Extension](https://marketplace.visualstudio.com/items?itemName=WixToolset.WixToolsetVisualStudio2017Extension) or [Wix Toolset Visual Studio 2019 Extension](https://marketplace.visualstudio.com/items?itemName=WixToolset.WixToolsetVisualStudio2019Extension)

WiX Toolset components required if you want to build test suites or Protocol Test Manager from source code.


You can use the script in **InstallPrerequisites** folder to automatically download and install these software.
Expand Down Expand Up @@ -56,7 +73,7 @@ Change to src directory and run build.cmd:
build.cmd
```

After the build succeeds, ProtocolTestFrameworkInstaller.msi should be generated in the folder drop\ProtocolTestFramework\installer\.
After the build succeeds, ProtocolTestFrameworkInstaller.msi should be generated in the folder `drop\ProtocolTestFramework\installer\`.


## Samples
Expand Down
2 changes: 1 addition & 1 deletion src/SharedAssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@

[assembly: AssemblyCompany("Microsoft")]
[assembly: AssemblyProduct("Protocol Test Framework")]
[assembly: AssemblyVersion("1.0.6500.0")]
[assembly: AssemblyVersion("1.0.7000.0")]
25 changes: 16 additions & 9 deletions src/common/setBuildTool.cmd
Original file line number Diff line number Diff line change
@@ -1,23 +1,30 @@
:: Copyright (c) Microsoft. All rights reserved.
:: Licensed under the MIT license. See LICENSE file in the project root for full license information.

:: Get the path to MSBuild.exe and set it to buildtool.
:: Calls to setVsPath.cmd.

@echo off

:: Find installed path of Visual Studio 2017
set buildtool=

set _currentPath=%~dp0
call "%_currentPath%setVs2017Path.cmd"
call "%_currentPath%setVsPath.cmd"
if ErrorLevel 1 (
exit /b 1
)

:: Set buildtool
if exist "%vs2017path%\MSBuild\15.0\Bin\MSBuild.exe" (
set buildtool="%vs2017path%\MSBuild\15.0\Bin\MSBuild.exe"
if not exist "%vspath%\MSBuild" (
echo Error: could not find MSBuild.exe, please make sure you have installed "C# and Visual Basic Roslyn compilers" in Visual Studio 2017 or later.
exit /b 1
)

if not defined buildtool (
echo No msbuild.exe was found. Please install visual studio 2017.
exit /b 1
for /d %%i in ("%vspath%\MSBuild\*") do (
if exist "%%~fi\Bin\MSBuild.exe" (
set buildtool="%%~fi\Bin\MSBuild.exe"
exit /b 0
)
)

exit /b 0
echo Error: could not find MSBuild.exe, please make sure you have installed "C# and Visual Basic Roslyn compilers" in Visual Studio 2017 or later.
exit /b 1
45 changes: 0 additions & 45 deletions src/common/setVs2017Path.cmd

This file was deleted.

38 changes: 21 additions & 17 deletions src/common/setVsPath.cmd
Original file line number Diff line number Diff line change
@@ -1,28 +1,32 @@
:: Copyright (c) Microsoft. All rights reserved.
:: Licensed under the MIT license. See LICENSE file in the project root for full license information.

::Get the root path of Visual Studio installation folder and set it to vspath.

@echo off

:: Find installed path of Visual Studio 2017
set _currentPath=%~dp0
call "%_currentPath%setVs2017Path.cmd"
if ErrorLevel 1 (
exit /b 1
set vswhere=

for /d %%i in ("%ProgramFiles(x86)%","%ProgramFiles%") do (
if exist "%%~i\Microsoft Visual Studio\Installer\vswhere.exe" (
set "vswhere=%%~i\Microsoft Visual Studio\Installer\vswhere.exe"
break
)
)

:: Set VS150COMNTOOLS
if exist "%vs2017path%\Common7\Tools\" (
set VS150COMNTOOLS="%vs2017path%\Common7\Tools\"
if [vswhere] equ [] (
echo Error: please make sure you have installed Visual Studio 2017 or later.
exit /b 1
)

:: Set vspath
if defined VS150COMNTOOLS (
set vspath=%VS150COMNTOOLS%
goto end
) else (
echo Error: Please install visual studio 2017.
exit /b 1
set vspath=

for /f "usebackq tokens=1*" %%i in (`"%vswhere%"`) do (
if %%i equ installationPath: (
set vspath=%%j
exit /b 0
)
)

:end
exit /b 0
echo Error: please make sure you have installed Visual Studio 2017 or later.
exit /b 1
23 changes: 23 additions & 0 deletions src/common/setVsTestPath.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
:: Copyright (c) Microsoft. All rights reserved.
:: Licensed under the MIT license. See LICENSE file in the project root for full license information.

:: Get the path to vstest.console.exe and set it to vstest.
:: Calls to setVsPath.cmd.

@echo off

set vstest=

set _currentPath=%~dp0
call "%_currentPath%setVsPath.cmd"
if ErrorLevel 1 (
exit /b 1
)

if not exist "%vspath%\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe" (
echo Error: could not find vstest.console.exe, please make sure you have installed "Testing tools core features" in Visual Studio 2017 or later.
exit /b 1
)

set vstest="%vspath%\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe"
exit /b 0
50 changes: 28 additions & 22 deletions src/deploy/Installer/PTFProduct.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -55,37 +55,32 @@
Property="DOTNET471_NOT_INSTALLED_WARNING_TEXT"
Value="• .NET Framework 4.7.1 targeting pack&#xA;" />

<!-- Visual Studio 2017 dependency check-->
<Property Id="VS2017SEARCH">
<RegistrySearch Id="Vs2017Search64"
Root="HKLM"
Key="SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VS7"
Name="15.0"
Type="raw"
Win64="yes" />
<RegistrySearch Id="Vs2017Search"
Root="HKLM"
Key="SOFTWARE\Microsoft\VisualStudio\SxS\VS7"
Name="15.0"
Type="raw" />
<!-- Visual Studio dependency check-->
<PropertyRef Id="VS2017_ROOT_FOLDER" />
<PropertyRef Id="VS2019_ROOT_FOLDER" />
<Property Id="VSTEST2019">
<DirectorySearch Id="Vs2019VsTestSearch" Path="[VS2019_ROOT_FOLDER]\Common7\IDE\CommonExtensions\Microsoft\TestWindow\">
<FileSearch Name="vstest.console.exe" />
</DirectorySearch>
</Property>

<Property Id="VSTEST2017">
<DirectorySearch Id="Vs2017VsTestSearch" Path="[VS2017SEARCH]\Common7\IDE\CommonExtensions\Microsoft\TestWindow" Depth="1">
<FileSearch Name="vstest.console.exe"
Languages="0" />
<DirectorySearch Id="Vs2017VsTestSearch" Path="[VS2017_ROOT_FOLDER]\Common7\IDE\CommonExtensions\Microsoft\TestWindow\">
<FileSearch Name="vstest.console.exe" />
</DirectorySearch>
</Property>
<SetProperty Id="VSInstalled" After="AppSearch" Value="1">
<![CDATA[VSTEST2017 OR VSTEST2019]]>
</SetProperty>

<InstallUISequence>
<Custom Action="SET_VSTEST_AGENT_OR_VS_NOT_INSTALLED_WARNING_TEXT_2017ORHigher" After="AppSearch">
<![CDATA[NOT VSTEST2017]]>
<![CDATA[NOT VSInstalled]]>
</Custom>
</InstallUISequence>

<CustomAction Id="SET_VSTEST_AGENT_OR_VS_NOT_INSTALLED_WARNING_TEXT_2017ORHigher"
Property="VSTEST_AGENT_NOT_INSTALLED_WARNING_TEXT"
Value="• Microsoft Visual Studio 2017 or Agents for Visual Studio 2017&#xA;" />
Value="• Microsoft Visual Studio 2017 or higher&#xA;" />

<!-- Spec Explorer dependency check-->
<Property Id="SPEC_EXPLORER_INSTALLED">
Expand All @@ -106,7 +101,18 @@

<!-- Directory Structure -->
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="VS2017SEARCH">
<Directory Id="VS2019_ROOT_FOLDER">
<Directory Id="VS2019_Common7" Name="Common7">
<Directory Id="VS2019_IDE" Name="IDE">
<Directory Id="VS2019_Extensions" Name="Extensions">
<Directory Id="VS2019_TestPlatform" Name="TestPlatform">
<Directory Id="VS2019_HtmlTestLogger_InstallLocation" Name="Extensions" />
</Directory>
</Directory>
</Directory>
</Directory>
</Directory>
<Directory Id="VS2017_ROOT_FOLDER">
<Directory Id="VS2017_Common7" Name="Common7">
<Directory Id="VS2017_IDE" Name="IDE">
<Directory Id="VS2017_Extensions" Name="Extensions">
Expand Down Expand Up @@ -225,9 +231,9 @@

<Publish Dialog="CustomizeDlg" Control="Back" Event="NewDialog" Value="MaintenanceTypeDlg" Order="1">Installed</Publish>
<Publish Dialog="CustomizeDlg" Control="Back" Event="NewDialog" Value="PrivacyDlg" Order="2">NOT Installed</Publish>
<Publish Dialog="CustomizeDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg" Order="1"><![CDATA[DOTNET471 AND VSTEST2017 AND SPEC_EXPLORER_INSTALLED]]></Publish>
<Publish Dialog="CustomizeDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg" Order="1"><![CDATA[DOTNET471 AND VSInstalled AND SPEC_EXPLORER_INSTALLED]]></Publish>
<Publish Dialog="CustomizeDlg" Control="Next" Event="NewDialog" Value="DependencyCheckWarningDlg" Order="2">
<![CDATA[(NOT DOTNET471) OR (NOT VSTEST2017) OR (NOT SPEC_EXPLORER_INSTALLED)]]>
<![CDATA[(NOT DOTNET471) OR (NOT VSInstalled) OR (NOT SPEC_EXPLORER_INSTALLED)]]>
</Publish>
<Publish Dialog="DependencyCheckWarningDlg" Control="Back" Event="NewDialog" Value="CustomizeDlg">1</Publish>
<Publish Dialog="DependencyCheckWarningDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
Expand Down
32 changes: 29 additions & 3 deletions src/deploy/Installer/ProtocolTestFrameworkSDK.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,14 @@
<Directory Id="PTF_ProgramsMenuFolder" Name="Protocol Test Framework" />
</DirectoryRef>

<DirectoryRef Id="VS2017SEARCH">
<DirectoryRef Id="VS2019_ROOT_FOLDER">
<!-- visual studio schemas -->
<Directory Id="VS2019XML" Name="Xml" >
<Directory Id="VS2019SCHEMAS" Name="Schemas">
</Directory>
</Directory>
</DirectoryRef>
<DirectoryRef Id="VS2017_ROOT_FOLDER">
<!-- visual studio schemas -->
<Directory Id="VS2017XML" Name="Xml" >
<Directory Id="VS2017SCHEMAS" Name="Schemas">
Expand All @@ -33,6 +40,18 @@
</DirectoryRef>

<!-- If Visual Studio is not installed, then do not install HtmlLogger. -->
<DirectoryRef Id ="VS2019_HtmlTestLogger_InstallLocation">
<Component Id="VS2019_HtmlTestLogger.dll" Guid="0AAE6391-FE90-444B-8072-46B49FE25F3C" Feature="PTF_All">
<Condition>VSTEST2019</Condition>
<File Id="VS2019_HtmlTestLogger.dll"
Source="$(var.SRCDIR)\HtmlTestLogger\Microsoft.Protocols.TestTools.Html.TestLogger.dll" />
</Component>
<Component Id="VS2019_HtmlTestLogger.pdb" Guid="D3364382-01A5-47F7-97CD-FC53EDCB7124" Feature="PTF_All">
<Condition>VSTEST2019</Condition>
<File Id="VS2019_HtmlTestLogger.pdb"
Source="$(var.SRCDIR)\HtmlTestLogger\Microsoft.Protocols.TestTools.Html.TestLogger.pdb" />
</Component>
</DirectoryRef>
<DirectoryRef Id ="VS2017_HtmlTestLogger_InstallLocation">
<Component Id="VS2017_HtmlTestLogger.dll" Guid="817DF6E7-6169-4A10-AF67-A064CDBB38E5" Feature="PTF_All">
<Condition>VSTEST2017</Condition>
Expand Down Expand Up @@ -250,12 +269,19 @@
</Component>
</DirectoryRef>

<!-- ptf testconfig schema for VS 2017 -->
<!-- ptf testconfig schema for VS 2017 and 2019 -->
<DirectoryRef Id="VS2019SCHEMAS">
<Component Id="VS2019_TestConfig.xsd" Guid="{9D552581-B43B-4794-B3B2-2E02F96B9198}" Feature="PTF_All">
<File Id="VS2019_TestConfig.xsd" Vital="yes"
Source="$(var.PTF_SRC_ROOT)\testtools\config\TestConfig.xsd" />
<Condition>VSTEST2019</Condition>
</Component>
</DirectoryRef>
<DirectoryRef Id="VS2017SCHEMAS">
<Component Id="VS2017_TestConfig.xsd" Guid="{edb0f822-6334-432c-b39e-42633d491b90}" Feature="PTF_All">
<File Id="VS2017_TestConfig.xsd" Vital="yes"
Source="$(var.PTF_SRC_ROOT)\testtools\config\TestConfig.xsd" />
<Condition>VS2017SEARCH</Condition>
<Condition>VSTEST2017</Condition>
</Component>
</DirectoryRef>

Expand Down
Loading

0 comments on commit 5496c8b

Please sign in to comment.