SpecFlow icon indicating copy to clipboard operation
SpecFlow copied to clipboard

appsettings.json is not loading into IConfiguration

Open rgudkov-uss opened this issue 4 years ago • 0 comments

SpecFlow Version

3

Which test runner are you using?

SpecFlow+ Runner

Test Runner Version Number

3.9.7

.NET Implementation

.NET Core 3.1

Project Format of the SpecFlow project

Sdk-style project format

.feature.cs files are generated using

SpecFlow.Tools.MsBuild.Generation NuGet package

Test Execution Method

Visual Studio Test Explorer

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

No response

Issue Description

I took .Net 6 ASP NET Core API example (https://github.com/SpecFlowOSS/SpecFlow-Examples/tree/master/.NET%206/ASP.NET%20Core%20API) and converted it to .Net Core 3.1.

Problem occurs in .Net core 3.1, but works in .Net 6 example

Steps to Reproduce

  • set breakpoint on line 23 of CalculatorController
  • Debug 'add two numbers...' test

Once stopped on the breakpoint, you can see that releaseLabel variable is null, while it should have value

Link to Repro Project

https://github.com/rgudkov-uss/specflow-api-core-31

rgudkov-uss avatar Dec 09 '21 16:12 rgudkov-uss