Questions tagged [specflow]
SpecFlow is a Behavior-Driven Development (BDD) tool for .NET.
2,140
questions
0
votes
0
answers
9
views
Need help to compare a SpecFlow table with a DataTable
I am trying to use SpecFlow BDD testing with data collected from an SQL Analysis services cube (got ideas from this article https://notesfromthelifeboat.com/post/analysis-services-2-testing/)
Most of ...
0
votes
0
answers
21
views
Using DbContextFactory for Data Seeding with SpecFlow tests
We are working on creating a suite of automated playwright tests for our app through specflow. I have been trying to come up with a way to use specflow hooks to seed data before/clean up data after ...
0
votes
1
answer
22
views
Using Javascript Cucumberjs is it possible to call a function from Scenario outline?
I have a framework that I am building from the ground up using webdriver-IO cucumber and javascript. I have a drop down control to select from and I can only select the option based on 'text()='
I am ...
0
votes
1
answer
14
views
How to Exit a Dropdown Surrounded by Un-Interactable Transparent Overlay in Selenium
I am writing a test with selenium specflow where I must open a dropdown and select a category. The way that the devs have it set up, the only way to close the dropdown after selection is by clicking ...
0
votes
1
answer
19
views
SpecFlow: Can I resolve objects from Specflow's dependency-injection dynamically?
The typical way in SpecFlow to resolve dependencies is via constructor injection:
public class DependentClass
{
private readonly DependencyClass dependency;
public ...
-1
votes
0
answers
14
views
How to check network status code and response while running tests in the browser using selenium c#
I know we can use others libraries to get the same but for that i will have to run those api tests separately.
I aim to run tests from selenium and also check network api calls
0
votes
0
answers
10
views
how to run "only" single test in specflow while running it normally (ignore all tests except one)
is there "only" (like in mocha) in specflow to run only this tests and ignore all the others?
I have thousands of tests so don't want to ignore 1 by 1.
I know that I can run only 1 manually, ...
0
votes
0
answers
11
views
Specflow Living Doc - TestExecution.json file is not updating when using "dotnet test" or "vstest.console"
So I've been trying to implement a script to run the tests in my suite and then run the LivingDoc generate command, this is all fine except for some reason when I run the tests via "dotnet test&...
0
votes
1
answer
18
views
.Net Core Micro-Service Test Automation
We are well into our journey down the road with micro-services (.net core apis with postgres dbs) and things are going well but I am beginning to question our automation test strategy and wanted to ...
0
votes
0
answers
17
views
How to update BDD feature file scenario result (Pass/Fail) in the excel sheet based on any tags?
C# Specflow Playwright - My lead want me to update the test case result in the excel sheet after the feature file is executed.
So in her excel sheet, she has given an unique tag (tag: test name) to ...
0
votes
1
answer
11
views
Specflow obtain all steps in current scenario using BeforeScenario hook
I'd like to be able to get a list of the steps that a scenario is about to run in BeforeScenario hook, because I want to parse the steps and run some preliminary actions based on what the steps are. ...
-1
votes
1
answer
29
views
GenerateFeatureFileCodeBehindTask task failed unexpectedly
when I try to build I am getting this error.
I am using VS studio 2019, and Specflow 3.9.69
Severity Code Description Project File Line Suppression State
Error The
"...
0
votes
0
answers
23
views
No **\*Test.DLL sources found matching the given filter: Release Pipeline
I am a newbie with Azure CI/CD. I was trying to setup a release pipeline to run the Specflow tests. However I am getting the below error after running the Vstest agent
VSTest Agent Log Screenshot
I ...
0
votes
0
answers
24
views
What is the difference between appium C# compared with appium C# with specflow?
I am trying to automate the testing for Xamarin forms application. I have come across appium framework. I have seen appium C# with specflow. What's the difference in addition of specflow to the ...
0
votes
0
answers
21
views
open clip board failed when generating step definition
I upgraded visual studio to vs2022 and installed spec flow extension for visual studio 2022. When I click on a step in feature file and then go to step definition, a dialog box opens. When I click ok ...
0
votes
1
answer
33
views
Cannot find all SpecFlow Options in Add New Item in Visual Studio 2022
I am using SpecFlow in Visual Studio 2022. I have installed SpecFlow for Visual Studio 2022 extension. But I cannot find all SpecFlow templates when I want to Add New Item. I can find only three of ...
1
vote
1
answer
45
views
Await not returning in SpecFlow async test step
I'm having trouble with some async SpecFlow unit tests where an await is never returning. I think that it is to do with the SpecFlow SynchronizationContext, but I'm not really sure how this works.
The ...
-1
votes
0
answers
38
views
error: unknown error: net::ERR_CONNECTION_REFUSED
I am running my selenium test in Azure DevOps and this is the error message I get. "error: unknown error: net::ERR_CONNECTION_REFUSED"
The test runs successfully in my local with no issue. ...
0
votes
1
answer
16
views
How to modify SpecFlow code generation behaviour
We have a feature file with 15061 lines ( auto-generated through another system ).
Specflow (version 3.9.7) manages to generate a cs file through MSbuild task with 39017 lines.
However build of the ...
0
votes
1
answer
24
views
specflow/cucumber with complex logic
I am considering using SpecFlow for a new automation project. Since SpecFlow is similar to Cucumber in the Java world this question applies to Cucumber as well.
In real world applications there are ...
0
votes
1
answer
22
views
How can I make sure SpecFlow features do not run simultaneously?
I have built some SpecFlow scenarios to test features of a HTTP REST interface. When I run the features separately, they work fine, but when run all together, some of the scenarios sometimes fail. The ...
1
vote
0
answers
42
views
SignalR C# Client not receiving data when executed in unit test (SpecFlow)
I'm trying to do an end-to-end testing of an application using SpecFlow. The system under test is some kind of ticketing system; a new ticket can (only) be created by calling a Web API, and when a new ...
1
vote
0
answers
49
views
"@RunWith" class from Cucumber in xUnit SpecFlow
I have tests written in SpecFlow with xUnit.
I have few feature files with scenarios with different tags.
I want to run tests with specific tag.
In Cucumber we have runner classes with annotations ...
0
votes
1
answer
56
views
Unable to click web element by xpath via selenium chrome driver
Hellow, i have pop-up window with 'select' element in chrome browser, i need to click this 'select' element in my ui-test scenario. It is on image: my web page
I am using c# and TechTalk.SpecFlow. I ...
1
vote
1
answer
67
views
C# SendKeys command is not working in full execution
Sendkeys is entering the value for below search dropdown only in debug mode.It doesn't work in full run even after adding waits or clicking and entering the value.
Using Javascript, I'm able to enter ...
0
votes
0
answers
24
views
Unable to run my specFlow code through nunit.consolerunner
I have tried running my test using nunit.consolerunner:
C:\Users\\.nuget\packages\nunit.consolerunner\3.11.1\tools>nunit3-console.exe "D:\Automation\bin\Debug\netcoreapp3.1\la-automation.dll&...
0
votes
1
answer
35
views
Giving to FLAUI the command for hit a key combination (such as ALT + F4) changes the keyboard controls
i'm making an automated test with flaui, it includes
Keyboard.Press(VirtualKeyShort.ALT);
Keyboard.Press(VirtualKeyShort.F4);
it works fine, but then my keyboard controls are completely different, ...
0
votes
1
answer
43
views
How to update "Area Path" of a test case in Azure Devops using Azure Devops Services Rest API
I write test cases in Visual Studio - Specflow feature file. Post that, I use "AzureDevops Test Connector" to migrate test cases into Azure Devops - Test Plan -> Test Suite(Which are ...
0
votes
1
answer
57
views
Can I safely run SpecFlow tests using xUnit test runner, expecting full support?
Specflow test runner does not support .Net 6. This makes me wonder whether SpecFlow is a good technology to use for end-to-end tests in .Net. I would not like to invest a lot of time in building end-...
0
votes
1
answer
56
views
How do I integrate my tests to report results to Azure DevOps
We have a pipeline that handles:
Code pull -> unit tests -> integration tests -> builds artefacts -> deploy
We want our integration tests to report back results to Azure DevOps, how do we ...
0
votes
1
answer
85
views
Error finding configuration file when using nunit3-console runner
I'm trying to execute my SpecFlow tests through nunit3-console runner but I'm receiving the following error:
System.IO.FileNotFoundException : The configuration file 'appsettings.json' was not found ...
0
votes
1
answer
61
views
Powershell NUnit console seems to hang after tests via Octopus/Powershell (Chrome driver still open)
I seem to have an issue when running a PowerShell script as a part of a step in our deployment Octopus pipeline. The tests run against a few websites, and each website has a range of tests. These are ...
1
vote
0
answers
70
views
SpecFlow steps failing with Extent Report
I am trying to integrate Extent Reports to my Selenium and SpecFlow project but I am getting error "Object reference not set to an instance of an object" at the the [AfterStep] (highlighted ...
0
votes
1
answer
32
views
Is it possible to load SpecFlow tests from a file?
I'd like to give a library + SpecFlow project to a client and let them add new SpecFlow scenarios without needing to generate source code / compile.
Is it possible to load a set of tests from a text ...
0
votes
1
answer
41
views
Cosmos Emulator randomly failing tests on Linux
I'm trying to run Cosmos Emulator on Linux, to run tests using SpecFlow.
After installing it following these instructions, and successfully running it, a variable number of tests randomly failed all ...
1
vote
0
answers
87
views
Specflow 4 - Capture groups not binding in Visual Studio 2022
Does anyone else have issues with adding step definitions in Specflow 4 with capture groups?
I've updated a project from Specflow 2 to use Specflow 4 and all my step definitions, including those with ...
2
votes
1
answer
42
views
How to make specflow scenarios visible to others without using visual studio
I was wondering if there is a way to make visible to other peers the scenarios we have in our feature files without them using visual studio. For example :does specflow has a library or an option that ...
0
votes
1
answer
35
views
C# specflow how to update the codebehind when new scenario added in feature file
I am new to specflow.
I am trying to write a test for my asp.net core webapi test. I added the new scenario to the existing .feature file. the feature file has got corresponding code behind file i.e ....
1
vote
0
answers
136
views
Inheriting specflow editor options
Is there a way to inherit the editor properties from a single specflow.json configuration file for multiple projects?
After VS2022 release Specflow extension lost its General Options (Tools > ...
0
votes
1
answer
137
views
Unable to create Step Definition file from Specflow feature file on Mac
I successfully installed Visual Studio 2019 for Mac (community edition, version 8.10.14) and managed to install few other required extensions/packages for my work. These are Specflow, Specflow.NUnit, ...
0
votes
0
answers
38
views
how to generate dashboard.html file as separate file than index.html in extent report 4.1.0
I am using extent report 4.1 with specflow C#. it is working fine but I don't see dashboard.html generated a separate file. I only have index.html with a dashboard view. I would like to have dashboard ...
0
votes
0
answers
36
views
Specflow - Scenario Outline - Examples table has more than 10 columns
I'm using specflow + MsTest.
My scenario outline with Examples table that has more than 10 columns.
When I debug to watch scenarioContext.ScenarioInfo.Arguments, I only got values for the first 10 ...
0
votes
1
answer
24
views
How to capture stacktrace of failing test in extent report for specflow
I want to capture stacktrace of failed scenario for specflow
In my extent report I have
scenario.CreateNode<Then>(scenarioContext.StepContext.StepInfo.Text).Fail(scenarioContext.TestError....
1
vote
2
answers
70
views
Migrating to NUnit from SpecRunner - Parallels Execution with Selenium
I am migrating my test framework to NUnit from SpecRunner since SpecRunner is not longer maintained.
So far i am able to run the tests in parrallel by using the assembly code [assembly: Parallelizable(...
-1
votes
1
answer
75
views
Specflow hooks can access the test data for backend?
It is a web based application having 100 respondents each respondent have different ids. i have to run my test cases for all respondents using id which are listed in test data file. file consists of ...
0
votes
0
answers
23
views
Specflow: How to generate a unique string by ValueRetriever and store it for the current Scenario, without any issue in parallel execution
to make test data unique for correctly selecting in tests. I'm looking for solution to generate a unique string and replace it to the "(*)" in Feature file. The generated unique string ...
-2
votes
1
answer
37
views
Can we use CSV file in scenario hooks like in before feature to get data?
//since I have to get the data from CSV to backend before the application launched. Is there any alternative procedures?
0
votes
0
answers
47
views
Specflow filter via dotnet test CLI
I'm using the dotnet test CLI with specflow and would like to filter the tests using feature name. I have no problem filtering on specflow tag values, but have not had luck filtering on feature name.
...
-1
votes
1
answer
74
views
How to determine MaxLength character with selenium on C#
I was wondering if anyone could help me with an issue I am having with Selenium and SpecFlow on C# project. I will like to do an Assertion on several text fields to determine their MaxLength ...
0
votes
0
answers
33
views
How can I change the naming convention for scenarios when exporting reports in Jira?
I use SpecFlow/NUnit and Jenkins plugin fo Zephyr to export reports in Jira.
The problem is that in Jira the name of test case appears like this:
projectName.pathToScenario(the entire structure of ...