-
Notifications
You must be signed in to change notification settings - Fork 24
3.0 Code Updates #204
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
base: master
Are you sure you want to change the base?
3.0 Code Updates #204
Changes from 1 commit
2fb758d
1f46733
d0b84bf
2db10c4
fa8f0a8
18d2533
1c3e9a7
bed518c
02062be
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,146 @@ | ||
| # This is a basic workflow to help you get started with Actions | ||
|
|
||
| name: CI | ||
|
|
||
| # Controls when the action will run. | ||
| on: | ||
| # Triggers the workflow on push or pull request events but only for the master branch | ||
| push: | ||
| branches: [ master ] | ||
| pull_request: | ||
| branches: [ master ] | ||
|
|
||
| # Allows you to run this workflow manually from the Actions tab | ||
| workflow_dispatch: | ||
|
|
||
| env: | ||
| VERSION: 2.1.1.${{ github.run_number }} | ||
| CONFIGURATION: Release | ||
| PACKAGE_DIR: NuGet_Packages | ||
| DevEnvDir: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\ | ||
|
|
||
| # A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
| jobs: | ||
| # This workflow contains a single job called "build" | ||
| build: | ||
| # The type of runner that the job will run on | ||
| runs-on: windows-2019 | ||
|
|
||
| # Steps represent a sequence of tasks that will be executed as part of the job | ||
| steps: | ||
| # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
| - uses: actions/checkout@v2 | ||
|
|
||
| - name: Dump environment variables | ||
| run: env | ||
|
|
||
| # https://github.com/marketplace/actions/file-regex-replace | ||
| - name: Update AsesmblyInfo version | ||
| uses: mingjun97/file-regex-replace@v1 | ||
| with: | ||
| # regex to apply (regex) | ||
| regex: '\d+\.\d+\.\d+\.\d+' | ||
| # flags of the regex | ||
| flags: g | ||
| # replacement string | ||
| replacement: '${{ env.VERSION }}' | ||
| # Files to be replaced (regex) | ||
| include: 'AssemblyInfo.cs' | ||
| # Files not to be replaced (regex) | ||
| exclude: '.^' | ||
| # String file encoding | ||
| encoding: 'utf8' | ||
| # Path to the folder to be replaced | ||
| path: 'src' | ||
|
|
||
| - name: Setup NuGet.exe for use with actions | ||
| uses: NuGet/setup-nuget@v1.0.5 | ||
|
|
||
| - name: NuGet restore SpecBind.sln | ||
| run: nuget restore src\SpecBind.sln | ||
|
|
||
| - name: NuGet restore ContosoUniversity.sln | ||
| run: nuget restore examples\FullDemo\ContosoUniversity.sln | ||
|
|
||
| - name: Setup MSBuild | ||
| uses: microsoft/setup-msbuild@v1 | ||
|
|
||
| - name: Build SpecBind.sln | ||
| run: msbuild.exe src\SpecBind.sln /p:Configuration=${{env.CONFIGURATION}} /verbosity:normal /maxcpucount | ||
|
|
||
| - name: Build ContosoUniversity.sln | ||
| run: msbuild.exe examples\FullDemo\ContosoUniversity.sln /p:Configuration=${{env.CONFIGURATION}} /verbosity:normal /maxcpucount | ||
|
|
||
| - name: Add IIS Web Application for ContosoUniversity | ||
| run: | | ||
| & $env:WINDIR\system32\inetsrv\AppCmd.exe add app /site.name:"Default Web Site" /path:/ContosoUniversity /physicalPath:"${{ github.workspace }}\examples\FullDemo\ContosoUniversity" | ||
|
|
||
| - name: Grant modify permissions to ContosoUniversity database | ||
| run: | | ||
| & icacls "${{ github.workspace }}\examples\FullDemo\ContosoUniversity\App_Data\School.sdf" /grant IIS_IUSRS:M | ||
|
|
||
| - name: Grant full permissions to Temp folder | ||
| run: | | ||
| & icacls "C:\Windows\Temp" /grant "IIS_IUSRS:(OI)(CI)F" /T | ||
|
|
||
| - name: Setup VSTest.console.exe | ||
| uses: darenm/Setup-VSTest@v1 | ||
|
|
||
| - name: Run tests with code coverage | ||
| run: | | ||
| & $env:UserProfile\.nuget\packages\OpenCover\4.6.519\tools\OpenCover.Console.exe -register:user -target:"vstest.console.exe" -targetargs:"/Settings:.\src\test.runsettings /Logger:trx;LogFileName=${{ github.workspace }}\src\TestResults\TestResults.trx .\src\SpecBind.Tests\bin\${{env.CONFIGURATION}}\net472\SpecBind.Tests.dll .\src\SpecBind.Selenium.Tests\bin\${{env.CONFIGURATION}}\net472\SpecBind.Selenium.Tests.dll .\src\SpecBind.CodedUI.Tests\bin\${{env.CONFIGURATION}}\net472\SpecBind.CodedUI.Tests.dll .\src\SpecBind.CodedUI.IntegrationTests\bin\${{env.CONFIGURATION}}\SpecBind.CodedUI.IntegrationTests.dll" -filter:"+[SpecBind]* +[SpecBind.Selenium]* +[SpecBind.CodedUI]* -[SpecBind]SpecBind.Properties.* -[SpecBind.Selenium]SpecBind.Selenium.Properties.* -[SpecBind.CodedUI]SpecBind.CodedUI.Properties.*" -excludebyattribute:*.ExcludeFromCodeCoverage* -hideskipped:All -output:.\SpecBind_coverage.xml -mergebyhash -returntargetcode | ||
|
|
||
| - name: Find files to upload | ||
| if: always() | ||
| run: | | ||
| Get-ChildItem "${{ github.workspace }}\src\TestResults" -Recurse -Include "*.trx", "*.coverage", "*.jpg", "*.html" | select-object FullName | ||
|
|
||
| - name: Upload TestResults | ||
| uses: actions/upload-artifact@v2.2.2 | ||
| if: always() | ||
| with: | ||
| name: SpecBind TestResults ${{ env.VERSION }} | ||
| if-no-files-found: error | ||
| path: | | ||
| src/TestResults/TestResults.trx | ||
| src/TestResults/**/*.coverage | ||
| src/TestResults/**/*.html | ||
| src/TestResults/**/*.jpg | ||
|
|
||
| - name: Publish Unit Test Results | ||
| uses: dorny/test-reporter@v1.0.0 | ||
| if: always() | ||
| with: | ||
| # Name of the check run | ||
| name: Tests | ||
| # Coma separated list of paths to test reports | ||
| path: src/TestResults/TestResults.trx | ||
| # Format of test report. Supported options: | ||
| reporter: dotnet-trx | ||
| # Limits which test suites are listed: | ||
| list-suites: 'failed' | ||
| # Limits which test cases are listed: | ||
| list-tests: 'failed' | ||
| # Limits number of created annotations with error message and stack trace captured during test execution. | ||
| max-annotations: 50 | ||
|
|
||
| - name: Install CodeCov | ||
| run: pip install codecov | ||
|
|
||
| - name: Run tests with code coverage | ||
| run: codecov -f "SpecBind_coverage.xml" | ||
|
|
||
| - name: NuGet pack SpecBind | ||
| run: nuget pack src\SpecBind\SpecBind.nuspec -OutputDirectory ${{env.PACKAGE_DIR}} -BasePath src\SpecBind -Verbosity Detailed -Version ${{env.VERSION}} -Symbols -Properties Configuration=${{env.CONFIGURATION}} | ||
|
|
||
| - name: NuGet pack SpecBind.CodedUI | ||
| run: nuget pack src\SpecBind.CodedUI\SpecBind.CodedUI.nuspec -OutputDirectory ${{env.PACKAGE_DIR}} -BasePath src\SpecBind.CodedUI -Verbosity Detailed -Version ${{env.VERSION}} -Symbols -Properties Configuration=${{env.CONFIGURATION}} | ||
|
|
||
| - name: NuGet pack SpecBind.Selenium | ||
| run: nuget pack src\SpecBind.Selenium\SpecBind.Selenium.nuspec -OutputDirectory ${{env.PACKAGE_DIR}} -BasePath src\SpecBind.Selenium -Verbosity Detailed -Version ${{env.VERSION}} -Symbols -Properties Configuration=${{env.CONFIGURATION}} | ||
|
|
||
| - name: Upload Build Artifacts | ||
| uses: actions/upload-artifact@v2.2.2 | ||
| with: | ||
| name: SpecBind NuGet Packages ${{ env.VERSION }} | ||
| path: ${{ env.PACKAGE_DIR }}\*.nupkg | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -94,7 +94,6 @@ AppPackages/ | |
| [Oo]bj | ||
| sql | ||
| TestResults | ||
| [Tt]est[Rr]esult* | ||
| *.Cache | ||
| ClientBin | ||
| [Ss]tyle[Cc]op.* | ||
|
|
@@ -115,3 +114,4 @@ UpgradeLog*.XML | |
| src/SpecBind.sln.DotSettings | ||
| examples/FullDemo/ContosoUniversity/App_Data/School.sdf | ||
| /examples/FullDemo/ContosoUniversity/Properties/PublishProfiles/ContosoUniversity.pubxml | ||
| *.feature.cs | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should feature files really be excluded from SCM?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Only the generated code-behind is being excluded. They're automatically generated when you build the project anyway. Otherwise, if the feature file is changed, then you will always see two changed files, when actually you just changed one. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I also started to exclude the generated Code. The Feature Folder looks neat now, so that 'Business' Users have fewer excuses. |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,9 +13,5 @@ | |
| <stepAssemblies> | ||
| <stepAssembly assembly="SpecBind"/> | ||
| </stepAssemblies> | ||
| <unitTestProvider name="MsTest"/> | ||
| <plugins> | ||
| <add name="SpecBindGeneratorPlugin" type="Generator"/> | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What's the new plugin strategy here? does it follow: https://docs.specflow.org/projects/specflow/en/latest/Extend/Plugins.html
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. From https://docs.specflow.org/projects/specflow/en/latest/Integrations/CodedUI.html#introduction, "Coded UI is no longer supported with SpecFlow 3." Instead of using a plugin to add attributes to the generated test class, there are explicit calls This requires adding I'm thinking we can add this to |
||
| </plugins> | ||
| </specFlow> | ||
| </configuration> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,84 +1,34 @@ | ||
| <Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
| <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | ||
| <Project Sdk="Microsoft.NET.Sdk"> | ||
| <PropertyGroup> | ||
| <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
| <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
| <ProductVersion> | ||
| </ProductVersion> | ||
| <SchemaVersion>2.0</SchemaVersion> | ||
| <ProjectGuid>{297B4A00-E56B-4CF2-98A1-1072BD2FA955}</ProjectGuid> | ||
| <TargetFramework>net472</TargetFramework> | ||
| <OutputType>Library</OutputType> | ||
| <AppDesignerFolder>Properties</AppDesignerFolder> | ||
| <RootNamespace>ContosoUniversity.AcceptanceTests</RootNamespace> | ||
| <AssemblyName>ContosoUniversity.AcceptanceTests</AssemblyName> | ||
| <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> | ||
| <FileAlignment>512</FileAlignment> | ||
| <ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> | ||
| <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion> | ||
| <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath> | ||
| <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages</ReferencePath> | ||
| <IsCodedUITest>True</IsCodedUITest> | ||
| <TestProjectType>CodedUITest</TestProjectType> | ||
| </PropertyGroup> | ||
| <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
| <DebugSymbols>true</DebugSymbols> | ||
| <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir> | ||
| <RestorePackages>true</RestorePackages> | ||
| <OldToolsVersion>4.0</OldToolsVersion> | ||
| <GenerateAssemblyInfo>false</GenerateAssemblyInfo> | ||
| <GenerateDocumentationFile>true</GenerateDocumentationFile> | ||
| <DebugType>full</DebugType> | ||
| <Optimize>false</Optimize> | ||
| <OutputPath>bin\Debug\</OutputPath> | ||
| <DefineConstants>DEBUG;TRACE</DefineConstants> | ||
| <ErrorReport>prompt</ErrorReport> | ||
| <WarningLevel>4</WarningLevel> | ||
| </PropertyGroup> | ||
| <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
| <DebugType>pdbonly</DebugType> | ||
| <Optimize>true</Optimize> | ||
| <OutputPath>bin\Release\</OutputPath> | ||
| <DefineConstants>TRACE</DefineConstants> | ||
| <ErrorReport>prompt</ErrorReport> | ||
| <WarningLevel>4</WarningLevel> | ||
| <DebugSymbols>true</DebugSymbols> | ||
| <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> | ||
| <GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType> | ||
| <UseWindowsForms>true</UseWindowsForms> | ||
| </PropertyGroup> | ||
| <ItemGroup> | ||
| <Reference Include="System" /> | ||
| <Reference Include="System.Data" /> | ||
| <Reference Include="System.Drawing" /> | ||
| <Reference Include="System.Windows.Forms" /> | ||
| <Reference Include="WindowsBase" /> | ||
| </ItemGroup> | ||
| <ItemGroup> | ||
| <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies"> | ||
| <Visible>False</Visible> | ||
| </CodeAnalysisDependentAssemblyPaths> | ||
| </ItemGroup> | ||
| <ItemGroup> | ||
| <Compile Include="Pages\HomePage.cs" /> | ||
| <Compile Include="Pages\StudentsSearchPage.cs" /> | ||
| <Compile Include="Properties\AssemblyInfo.cs" /> | ||
| <Compile Include="Scenarios\SearchForAStudent.feature.cs"> | ||
| <AutoGen>True</AutoGen> | ||
| <DesignTime>True</DesignTime> | ||
| <DependentUpon>SearchForAStudent.feature</DependentUpon> | ||
| </Compile> | ||
| </ItemGroup> | ||
| <ItemGroup> | ||
| <None Include="App.config" /> | ||
| <None Include="Scenarios\SearchForAStudent.feature"> | ||
| <Generator>SpecFlowSingleFileGenerator</Generator> | ||
| <LastGenOutput>SearchForAStudent.feature.cs</LastGenOutput> | ||
| </None> | ||
| <None Include="Scenarios\SearchForAStudent.feature" /> | ||
| </ItemGroup> | ||
| <ItemGroup> | ||
| <PackageReference Include="MSTest.TestAdapter"> | ||
| <Version>1.3.2</Version> | ||
| </PackageReference> | ||
| <PackageReference Include="MSTest.TestFramework"> | ||
| <Version>1.3.2</Version> | ||
| </PackageReference> | ||
| <PackageReference Include="SpecBind.CodedUI"> | ||
| <Version>1.4.1.170</Version> | ||
| </PackageReference> | ||
| <PackageReference Include="SpecFlow" Version="3.5.14" /> | ||
| <PackageReference Include="SpecFlow.MsTest" Version="3.5.14" /> | ||
| <PackageReference Include="SpecFlow.Tools.MsBuild.Generation" Version="3.5.14" /> | ||
| </ItemGroup> | ||
| <Import Project="$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets" Condition="Exists('$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets')" /> | ||
| <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> | ||
| <Import Project="$(SolutionDir)\..\..\src\CodedUI.targets" /> | ||
| <!-- To modify your build process, add your task inside one of the targets below and uncomment it. | ||
| Other similar extension points exist, see Microsoft.Common.targets. | ||
| <Target Name="BeforeBuild"> | ||
| </Target> | ||
| <Target Name="AfterBuild"> | ||
| </Target> | ||
| --> | ||
| </Project> |
Uh oh!
There was an error while loading. Please reload this page.