Skip to content

Commit

Permalink
Merge branch 'main' into testthreadid
Browse files Browse the repository at this point in the history
* main:
  Reqnroll.Verify: Support for Verify v24 (Verify.Xunit v24.2.0) for .NET 4.7.2+ and .NET 6.0+. (#151, #170)
  use pull_request_template.md from the .github repo
  Fix spelling mistake in CONTRIBUTING.md
  Bump version
  fix config docs
  Add release contributors to CHANGELOG (#171)
  Update CONTRIBUTING with "draft PR" workflow and no force push after review
  fix CHANGELOG
  Fix project template binding (#169)
  • Loading branch information
gasparnagy committed Jun 12, 2024
2 parents 634a064 + cac1020 commit 0c31425
Show file tree
Hide file tree
Showing 25 changed files with 125 additions and 216 deletions.
27 changes: 0 additions & 27 deletions .github/pull_request_template.md

This file was deleted.

20 changes: 18 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,26 @@

## Improvements:

* Reqnroll.Verify: Support for Verify v24 (Verify.Xunit v24.2.0) for .NET 4.7.2+ and .NET 6.0+. For earlier versions of Verify or for .NET 4.6.2, use the latest 2.0.3 version of the plugin that is compatible with Reqnroll v2.*. (#151)

## Bug fixes:

*Contributors of this release (in alphabetical order):* @ajeckmans

# v2.0.3 - 2024-06-10

## Improvements:

* Update [versioning policy for plugins](https://docs.reqnroll.net/latest/installation/compatibility.html#versioning-policy) and set plugin dependencies accordingly (#160)
* Generate symbol packages, use deterministic build and update package metadata (#161)
* Optimize creation of test-thread context using test framework independent resource pooling (#144)

## Bug fixes:

* Fix: Project created with `dotnet new reqnroll-project` contains an invalid binding class (`[Binding]` attribute missing) (#169)

*Contributors of this release (in alphabetical order):* @gasparnagy, @mcraa

# v2.0.2 - 2024-05-31

## Bug fixes:
Expand Down Expand Up @@ -38,15 +54,15 @@
## Bug fixes:

* Fix: User code namespaces that included "Reqnroll" within them caused the code generation to fail (#44)
* Fix: Dependencies of [BeforeTestRun] / [AfterTestRun] hooks are wonrly resolved from the test thread context instead of the test run (global) context instead (#58)
* Fix: Dependencies of [BeforeTestRun] / [AfterTestRun] hooks are wrongly resolved from the test thread context instead of the test run (global) context instead (#58)
* Fix: Cucumber Expressions fail when two enums or two custom types with the same short name (differing namespaces) are used as parameters (#81)
* Fix: Adding `@ignore` to an Examples block generates invalid code for NUnit v3+ (#103)
* Fix: `@ignore` attribute is not inherited to the scenarios from Rule (#111)
* Fix: Capture ExecutionContext after every binding invoke (#120)
* Fix: StackOverflowException when using `[StepArgumentTransformation]` with same input and output type, for example string (#71)
* Fix: Autofac without hook does not run GlobalDependencies (#127)
* Fix: Reqnroll.Autofac shows wrongly ambiguous step definition (#56)
* Fix: Dispose objects registred in test thread container at the end of test execution (#123)
* Fix: Dispose objects registered in test thread container at the end of test execution (#123)

# v1.0.1 - 2024-02-16

Expand Down
23 changes: 15 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,35 +66,42 @@ Please adhere to the coding conventions in the project (indentation, accurate co

in order to craft an excellent pull request:

1. [Fork](https://docs.github.com/articles/fork-a-repo) the project, clone your fork, and configure the remotes.
1. [Fork](https://docs.github.com/articles/fork-a-repo) the project, clone your fork, and configure the remotes. If you are already in the [contributors team](https://github.com/orgs/reqnroll/teams/contributors), you can just clone the project.

2. Configure your local setup. Information to do this can be found below.

3. If you cloned a while ago, get the latest changes from upstream.

4. Create a new topic branch (off of `main`) to contain your feature, change, or fix.

**IMPORTANT**: Making changes in `main` is discouraged. You should always keep your local `main` in sync with upstream `main` and make your changes in topic branches.
**IMPORTANT**: Making changes in `main` is not enabled. You should always keep your local `main` in sync with upstream `main` and make your changes in topic branches.

5. Commit your changes in logical chunks. Keep your commit messages organized, with a short description in the first line and more detailed information on the following lines. Feel free to use Git's [interactive rebase](https://docs.github.com/articles/interactive-rebase) feature to tidy up your commits before making them public.
5. Commit your changes in logical chunks. Keep your commit messages organized, with a short description in the first line and more detailed information on the following lines. Before submitting to review, feel free to use Git's [interactive rebase](https://docs.github.com/articles/interactive-rebase) feature to tidy up your commits before making them public.

6. Newly added tests should pass and be green, same applies to unit tests:

![unittests](https://raw.githubusercontent.com/reqnroll/Reqnroll/main/docs/_static/images/unittests.png)

7. Push your topic branch up to your fork.

8. [Open a Pull Request ](https://docs.github.com/articles/using-pull-requests/) with a clear title and description.
8. [Open a Draft Pull Request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests#draft-pull-requests) with a clear title and description.

9. If you haven't updated your pull request for a while, you should consider rebasing on `main` and resolving any conflicts.
9. Make sure the CI validation passes and all the changes you see in the "Files changed" tab was intentional.

10. If everything is fine, mark your draft pull request [Ready for Review](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/changing-the-stage-of-a-pull-request).

11. Make the necessary code changed requested by the reviewers as new commits and push your branch again.

**IMPORTANT**: Once the review process has been started, do not apply rebase or force push on the branch, because the
reviewers will need to review the entire change again (full review) instead of just reviewing the fixes. Don't worry about the commit structure, we will squash the changes to a single commit anyway.

12. If you haven't updated your pull request for a while, need to resolve a conflict, or require any new change from the `main`, merge the upstream `main` into your branch. Do not rebase your branch on `main` once the pull request has been reviewed.

Some important notes to keep in mind:

- _Never ever_ merge upstream `main` into your branches. You should always `git rebase` on `main` to bring your changes up to date when necessary.
- Do not send code style changes as pull requests like changing the indentation of some particular code snippet or how a function is called.
Those will not be accepted as they pollute the repository history with non functional changes and are often based on personal preferences.
- By submitting a patch, you agree that your work will be licensed under the license used by the project.
- If you have any large pull request in mind (e.g. Implementing features, refactoring code, etc), **please ask first** otherwise you risk spending a lot of time working on something that the project's developers might not want to merge into the project.
- Do not send code style changes as pull requests like changing the indentation of some particular code snippet or how a function is called. Those will not be accepted as they pollute the repository history with non functional changes and are often based on personal preferences.

## Building sources

Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</PropertyGroup>

<PropertyGroup>
<VersionPrefix>2.0.3</VersionPrefix>
<VersionPrefix>2.1.0</VersionPrefix>
<VersionSuffix>local</VersionSuffix>
<AssemblyVersion>2.0.0</AssemblyVersion>
<CompatibilityVersionUpperRange>3</CompatibilityVersionUpperRange>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="Utf8Json" Version="1.3.7" />

<PackageReference Include="CsvHelper" Version="27.2.1" />

<PackageReference Include="ExcelDataReader" Version="3.6.0" />
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,55 +1,48 @@
<Project>

<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
<Import Project="..\..\..\Tests\Reqnroll.Specs\build/Reqnroll.Tools.MsBuild.Generation.OwnTests.props" />
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk"/>
<Import Project="..\..\..\Tests\Reqnroll.Specs\build/Reqnroll.Tools.MsBuild.Generation.OwnTests.props"/>

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>true</ImplicitUsings>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.5.0" />
<PackageReference Include="Verify.Xunit" Version="17.7.0" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.console" Version="2.4.2">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0"/>
<PackageReference Include="Verify.Xunit" Version="24.2.0"/>
<PackageReference Include="xunit" Version="2.8.1"/>
<PackageReference Include="xunit.runner.console" Version="2.8.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\Plugins\Reqnroll.xUnit.ReqnrollPlugin\Reqnroll.xUnit.ReqnrollPlugin.csproj" />
<ProjectReference Include="..\Reqnroll.Verify.ReqnrollPlugin\Reqnroll.Verify.ReqnrollPlugin.csproj" />
<ProjectReference Include="..\..\..\Plugins\Reqnroll.xUnit.ReqnrollPlugin\Reqnroll.xUnit.ReqnrollPlugin.csproj"/>
<ProjectReference Include="..\Reqnroll.Verify.ReqnrollPlugin\Reqnroll.Verify.ReqnrollPlugin.csproj"/>
</ItemGroup>

<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />

<PropertyGroup>
<_VerifyGeneratorPluginFramework Condition=" '$(MSBuildRuntimeType)' == 'Core'">netstandard2.0</_VerifyGeneratorPluginFramework>
<_VerifyGeneratorPluginFramework Condition=" '$(MSBuildRuntimeType)' != 'Core'">net462</_VerifyGeneratorPluginFramework>
</PropertyGroup>
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk"/>

<Target Name="PreBuild">
<MSBuild Projects="..\..\..\Reqnroll.Tools.MsBuild.Generation\Reqnroll.Tools.MsBuild.Generation.csproj" ContinueOnError="false" Properties="TargetFramework=$(_Reqnroll_Needed_MSBuildGenerator)" />
<MSBuild Projects="..\..\..\Plugins\Reqnroll.xUnit.Generator.ReqnrollPlugin\Reqnroll.xUnit.Generator.ReqnrollPlugin.csproj" ContinueOnError="false" Properties="TargetFramework=netstandard2.0" />
<MSBuild Projects="..\Reqnroll.Verify.ReqnrollPlugin\Reqnroll.Verify.ReqnrollPlugin.csproj" ContinueOnError="false" Properties="TargetFramework=$(_VerifyGeneratorPluginFramework)" />
<MSBuild Projects="..\..\..\Reqnroll.Tools.MsBuild.Generation\Reqnroll.Tools.MsBuild.Generation.csproj" ContinueOnError="false" Properties="TargetFramework=$(_Reqnroll_Needed_MSBuildGenerator)"/>
<MSBuild Projects="..\..\..\Plugins\Reqnroll.xUnit.Generator.ReqnrollPlugin\Reqnroll.xUnit.Generator.ReqnrollPlugin.csproj" ContinueOnError="false" Properties="TargetFramework=netstandard2.0"/>
</Target>

<ItemGroup>
<ReqnrollGeneratorPlugins Include="$(MSBuildThisFileDirectory)..\Reqnroll.Verify.ReqnrollPlugin\bin\$(Configuration)\$(_VerifyGeneratorPluginFramework)\Reqnroll.Verify.ReqnrollPlugin.dll" />
<ReqnrollGeneratorPlugins Include="$(MSBuildThisFileDirectory)..\..\Reqnroll.xUnit.Generator.ReqnrollPlugin\bin\$(Configuration)\netstandard2.0\Reqnroll.xUnit.Generator.ReqnrollPlugin.dll" />
<ReqnrollGeneratorPlugins Include="$(MSBuildThisFileDirectory)..\..\Reqnroll.xUnit.Generator.ReqnrollPlugin\bin\$(Configuration)\netstandard2.0\Reqnroll.xUnit.Generator.ReqnrollPlugin.dll"/>
</ItemGroup>

<ItemGroup>
<Folder Include="Features\" />
<Folder Include="Features\"/>
</ItemGroup>

<Import Project="..\..\..\Reqnroll.Tools.MsBuild.Generation\build\Reqnroll.Tools.MsBuild.Generation.targets" />
<Import Project="..\..\..\Reqnroll.Tools.MsBuild.Generation\build\Reqnroll.Tools.MsBuild.Generation.targets"/>
<!-- has to be before the PropertyGroup change-->
<PropertyGroup>
<BuildDependsOn>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net462;netstandard2.0</TargetFrameworks>
<NuspecFile>$(MSBuildThisFileDirectory)Reqnroll.Verify.nuspec</NuspecFile>
<TargetFrameworks>net472;net6.0</TargetFrameworks>
<AssemblyOriginatorKeyFile>$(Reqnroll_KeyFile)</AssemblyOriginatorKeyFile>
<SignAssembly>$(Reqnroll_EnableStrongNameSigning)</SignAssembly>
<PublicSign>$(Reqnroll_PublicSign)</PublicSign>

<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<NuspecFile>$(MSBuildThisFileDirectory)Reqnroll.Verify.nuspec</NuspecFile>

<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="Verify" Version="17.7.0" />
<PackageReference Include="Verify.Xunit" Version="24.2.0"/>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\Reqnroll.Generator\Reqnroll.Generator.csproj" />
<ProjectReference Include="..\..\..\Reqnroll\Reqnroll.csproj"/>
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -13,29 +13,26 @@
<icon>images\reqnroll-icon.png</icon>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<license type="expression">BSD-3-Clause</license>
<tags>reqnroll externaldata json</tags>
<tags>reqnroll verify</tags>
<copyright>$copyright$</copyright>

<dependencies>
<group targetFramework=".NETFramework4.6.2">
<group targetFramework="net472">
<dependency id="Reqnroll" version="$CompatibilityVersionRange$" />
<dependency id="Verify" version="17.7.0" />
<dependency id="Verify" version="24.2.0" />
</group>
<group targetFramework="netstandard2.0">
<group targetFramework="net6.0">
<dependency id="Reqnroll" version="$CompatibilityVersionRange$" />
<dependency id="Verify" version="17.7.0" />
<dependency id="Verify" version="24.2.0" />
</group>
</dependencies>

</metadata>
<files>
<file src="build\**\*" target="build"/>

<file src="bin\$config$\net462\**\*" target="build\net462"/>
<file src="bin\$config$\netstandard2.0\*" target="build\netstandard2.0"/>

<file src="bin\$config$\net462\Reqnroll.Verify.ReqnrollPlugin.*" target="lib\net462"/>
<file src="bin\$config$\netstandard2.0\Reqnroll.Verify.ReqnrollPlugin.*" target="lib\netstandard2.0"/>
<file src="bin\$config$\net472\Reqnroll.Verify.ReqnrollPlugin.*" target="lib\net472"/>
<file src="bin\$config$\net6.0\Reqnroll.Verify.ReqnrollPlugin.*" target="lib\net6.0"/>

<file src="$SolutionDir$LICENSE" target="LICENSE" />
<file src="$SolutionDir$reqnroll-icon.png" target="images\" />
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using System.Collections;
using System.IO;
using Reqnroll.Verify.ReqnrollPlugin;
using Reqnroll;
using Reqnroll.Plugins;
using Reqnroll.UnitTestProvider;
using Reqnroll.Verify.ReqnrollPlugin;
using VerifyTests;
using VerifyXunit;

[assembly: RuntimePlugin(typeof(VerifyRuntimePlugin))]

Expand All @@ -28,7 +28,7 @@ private void RuntimePluginTestExecutionLifecycleEvents_BeforeScenario(object sen
var scenarioContext = e.ObjectContainer.Resolve<ScenarioContext>();
var featureContext = e.ObjectContainer.Resolve<FeatureContext>();

VerifierSettings.DerivePathInfo(
Verifier.DerivePathInfo(
(sourceFile, projectDirectory, type, method) =>
{
string scenarioInfoTitle = scenarioContext.ScenarioInfo.Title;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" TreatAsLocalProperty="TaskFolder;TaskAssembly">
<ItemGroup>
<ReqnrollGeneratorPlugins Include="$(_VerifyGeneratorPluginPath)" />
</ItemGroup>
<ItemGroup>
<None Include="$(_VerifyRuntimePluginPath)">
<Link>%(Filename)%(Extension)</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Visible>False</Visible>
</None>
</ItemGroup>
</Project>
Loading

0 comments on commit 0c31425

Please sign in to comment.