Questions tagged [feature-file]

In the SpecFlow BDD for .NET, feature files that are used to store the acceptance criteria of the features (use cases, user stories) of your application are described in a format that is called Gherkin, which is originally based on the Cucumber BDD language.

127 questions
2
votes
1 answer

Correct way to implement Background steps in SpecFlow

I am learning to use SpecFlow at the moment, and want to write a Feature which will include the tests to register a user. I have the first test case, Register a Valid User. This will involve entering the username, and email, a password and a…
Aimee Jones
  • 881
  • 2
  • 18
  • 38
2
votes
2 answers

Specflow feature files - Possible to have multi line example

I was wondering if within a Scenario Outline it would be possible to have a new line for parameter names e.g. Scenario Outline: Login Given When I have entered my CRM credentials and…
marwaha.ks
  • 540
  • 1
  • 7
  • 19
2
votes
2 answers

How to activate spring boot profile with cucumber

I am looking for a nice way to active a spring profile for my cucumber tests. The cucumber tests need to use a stubbed version of a service which is marked with: @Profile("test") @Component class FooServiceStub extends FooService {...} The regular…
BitfulByte
  • 4,117
  • 1
  • 30
  • 40
2
votes
1 answer

How to run Specflow/Specrun feature files with dynamic values

I am very new to Specflow/Specrun and C# programming. I need help in fixing the issue I am facing. I have a Specrun feature file which queries database. Below is the code of the feature file: Scenario Outline: Ensure all rows are correctly inserted…
user1493004
  • 101
  • 2
  • 2
  • 6
2
votes
1 answer

Repeating steps with different values in BDD test case

I am new to BDD specflow. I have to write a scenario wherein after I capture an image, i have to select a value for each defined attribute for that image from a selection list For Eg: |Body Part |Location |Group | | Leg | Left …
2
votes
1 answer

Multiple Scope value in Binding (Specflow)

I have a method which runs Before a feature like so, [BeforeFeature, Scope(Feature = "Feature1"] Method() { } I want the same method to be ran for another feature file that i've wiritten i.e. Feature2 How do i combine this "Feature2" in the scope…
1
vote
1 answer

How to compare two jsonArrays in karate where they have different number of keys and different names

I have two jsonArrays which have keys with different name and I want to compare each json object in a separate feature file. Is there any way I can pass two jsonArrays in a feature file and compare them. sample-create.feature * table kittens1 |…
1
vote
1 answer

is it possible to pass data based on a condition(Eg:test data for dev & stage env's may change) in a karate feature file?

My test framework uses karate & python & its for backend testing. I want to execute my tests in both dev & staging environments & so I have to pass data based on that condition to my feature file. (Similar to if else condition in java) Below is my…
ram
  • 21
  • 2
1
vote
1 answer

Cucumber Feature File : How to escape the character | in Examples of Scenario Outline

In the below scenario , "Characters * / : [ \ ] | # % { } ? &space are not allowed in filename" contains | as special character . But it is considered as separator symbol (|) and getting the error " inconsistent cell count within the table". Please…
Rahul
  • 759
  • 3
  • 21
  • 43
1
vote
0 answers

How do I run a specific feature file using cucumber and cypress 9.7.0

I have multiple feature files, I need to run a single feature file using cli. I don't want to use tags to control the file that I want to run. I want a command using that I should be able to run a specific feature. I am using cucumber preprocessor…
1
vote
2 answers

Using Cucumber examples data in "scenario outline" line, not in a step, data isn't read and column marked as unused

When I use table column in "scenario outline" line in cucumber feature file, not in any step, using java and intellij-idea such as the following: Scenario Outline: my test Given Customer Ask Chatbot "My name is " When…
n0krashy
  • 51
  • 7
1
vote
1 answer

Karate response is overwriting for parallel scenarios

I am trying below to execute my test case but not working properly. While running 2-3 graphql post request scenarios in a single feature file with parallel run enable and printing the response individually after every post hit. Then in every print…
Andrew
  • 11
  • 1
1
vote
0 answers

Karate Multiple Tags execution with AND/ OR case

I have following karate feature file with distinct tags for all scenarios and I want to execute scenarios with following conditions via maven command with details as, Feature: Multiple Tags Execution @qq1 Scenario: Test 01 * print 'Test…
1
vote
1 answer

Is there a way in Java to format a Gherkin Document as String?

In my Java program, I have parsed a Cucumber Feature File to a GherkinDocument. I have edited some tags in this Document. Now I want to write the Code of the GherkinDocument in a Feature File. For that, I want to translate the Gherkin Document to a…
1
vote
0 answers

Karate Bearer token from Background is coming null in Scenarios

I am new to Karate and I encounter this issue: I have this feature class: Feature: Validate myAPI Background: * def result = call read('classpath:generateBearerToken.feature') * def token = result.bearerToken * print "Token is : " +…
Constantin
  • 11
  • 1
1
2
3
8 9