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

Using a percentage sign '%' as placeholders in scenario outlines #1694

Closed
florian-schmidinger opened this issue Aug 5, 2019 · 4 comments

Comments

@florian-schmidinger
Copy link

@florian-schmidinger florian-schmidinger commented Aug 5, 2019

using a percentage sign '%' as placeholder / column-name in scenario outlines.

SpecFlow Version:

  • 3.0
  • 2.4
  • 2.3
  • 2.2
  • 2.1
  • 2.0
  • 1.9

Used Test Runner

  • SpecFlow+Runner
  • MSTest
  • NUnit
  • Xunit

Version number:

Project Format of the SpecFlow project

  • Classic project format using packages.config
  • Classic project format using <PackageReference> tags
  • Sdk-style project format

.feature.cs files are generated using

  • SpecFlow.Tools.MsBuild.Generation NuGet package
  • SpecFlowSingleFileGenerator custom tool

Visual Studio Version

  • VS 2019
  • VS 2017
  • VS 2015

Enable SpecFlowSingleFileGenerator Custom Tool option in Visual Studio extension settings

  • Enabled
  • Disabled

Are the latest Visual Studio updates installed?

  • Yes
  • No, I use Visual Studio version <Major>.<Minor>.<Patch>

.NET Framework:

  • >= .NET 4.5
  • before .NET 4.5
  • .NET Core 2.0
  • .NET Core 2.1
  • .NET Core 2.2
  • .NET Core 3.0

Test Execution Method:

  • Visual Studio Test Explorer
  • TFS/VSTS/Azure DevOps – Task – PLEASE SPECIFY THE NAME OF THE TASK
  • Command line – PLEASE SPECIFY THE FULL COMMAND LINE

<SpecFlow> Section in app.config or content of specflow.json

neither app.config nor specflow.json

Issue Description

Using a percentage sign '%' as column-name for scenario outline placeholders results in not compiling code-behind file and no readable error message is shown.

Steps to Reproduce

Example:

Scenario Outline: Sum and percentage - single booking - Billable hours
	only billable hours are displayed 

	Given an employee has the following time entries:
		| billable   | minutes |
		| <billable> | 75      |

	When the billable hours display calculates this employees 'billable hours'

	Then this employee has in sum '<sum>' 'billable hours'
		
		And this employee has '<%>' % 'billable hours'

	Examples: 
		| case         | billable | sum  | %   |
		| billable     | yes      | 1,25 | 100 |
		| non billable | no       | 0    | 0   |

Implementing the bindings has no effect on this.

spirit11 added a commit to spirit11/SpecFlow that referenced this issue Oct 11, 2019
@spirit11

This comment has been minimized.

Copy link
Contributor

@spirit11 spirit11 commented Oct 11, 2019

Can suggest this solution
09ab619
It also handles issue with parameters that become equal, when special signs are removed from their names.

@SabotageAndi

This comment has been minimized.

Copy link
Collaborator

@SabotageAndi SabotageAndi commented Oct 14, 2019

@spirit11 please send a PR with your change. Looks good.

spirit11 added a commit to spirit11/SpecFlow that referenced this issue Oct 14, 2019
spirit11 added a commit to spirit11/SpecFlow that referenced this issue Oct 14, 2019
spirit11 added a commit to spirit11/SpecFlow that referenced this issue Oct 14, 2019
SabotageAndi added a commit that referenced this issue Oct 23, 2019
* Adjust parameter names generation (#1694)

* changelog entry added
@SabotageAndi

This comment has been minimized.

Copy link
Collaborator

@SabotageAndi SabotageAndi commented Oct 23, 2019

Fixed with #1753

@lock

This comment has been minimized.

Copy link

@lock lock bot commented Nov 22, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Nov 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
4 participants
You can’t perform that action at this time.