gherkin

Specflow use parameters in a table with a Scenario Context

心不动则不痛 提交于 2019-12-03 11:58:00
I am using Specflow in C# to build automatic client side browser testing with Selenium. The goal of these tests is to simulate the business scenario where a client enters our website in specific pages, and then he is directed to the right page. I Want to use parameters inside a Scenario Context, for example: When I visit url | base | page | parameter1 | parameter2 | | http://www.stackoverflow.com | questions | <questionNumber> | <questionName> | Then browser contains test <questionNumber> Examples: | <questionNumber> | <questionName> | | 123 | specflow-q1 | | 456 | specflow-q2 | | 789 |

Is there a way to directly generate Step Definitions in Eclipse without Running Cucumber?

岁酱吖の 提交于 2019-12-03 10:57:30
Im doing integration testing with cucumber and Gradle in Eclipse. For now my workflow is Write a feature file Run it to generate step skeletons Copy and implement them This works good for new features and so on, but becomes quite bothersome if you have a large feature and implement new steps in the middle or towards the end. To get the new step skeletons I need to run the whole feature. Even with the dryRun = true option this takes up a long time. I have heard that IntellyJ can generate these step skeletons directly and I would like to know if something like this is possible in Eclipse? Not

How to increase reusability between SpecFlow/Gherkin steps?

爱⌒轻易说出口 提交于 2019-12-03 00:25:59
I think I thoroughly understand the concepts and ideas behind SpecFlow, but even after reading the Secret Ninja Cucumber Scrolls , The Cucumber Book , and going through the various forums I'm still unsure about the path to reusability. Our scenarios already comply to various guidelines Self explanatory Must have a understandable purpose (what makes it different from the other scenarios) Are unique Represent vertical functional slices Uses Ubiquitous Language Written from the stakeholder perspective About business functionality, not about software design Grouped by Epics ARE NOT TEST SCRIPTS

Exception in thread “main” java.lang.NoClassDefFoundError: gherkin/formatter/Formatter

天涯浪子 提交于 2019-12-02 21:19:25
问题 I am learning how to write BDD test scripts in JAVA using Cucumber. However, I keep getting the above error and not sure why. I have the Cukes Gherkin as a dependency. POM <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>Cucumber</groupId> <artifactId

Exception in thread “main” java.lang.NoClassDefFoundError: gherkin/formatter/Formatter

核能气质少年 提交于 2019-12-02 10:46:54
I am learning how to write BDD test scripts in JAVA using Cucumber. However, I keep getting the above error and not sure why. I have the Cukes Gherkin as a dependency. POM <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>Cucumber</groupId> <artifactId>Cucumber</artifactId> <version>1.0-SNAPSHOT</version> <dependencies> <dependency> <groupId>info.cukes<

Does if else concept available in feature file (Gherkin language)?

孤街浪徒 提交于 2019-12-01 17:54:26
Is there anyway where we can use if/else concept in feature file? For example: Scenario: User should be able to check login page Given I am on login page When I click on SignIn button Then I should be in home page If yes Then I will create a new profile Else Then I will logout from page Not that I am aware of. Gherkin (and cucumber) are best used when they specify discreet business cases though, and should be repeatable, else they get hard to follow and test. It looks like you have two stories here at least: Scenario: A new user should be asked to sign in Given I am a new user And I navigate

Escape characters in Cucumber step definition

落花浮王杯 提交于 2019-12-01 05:42:00
问题 I have following steps that I am using for Cucumber-jvm. How do I escape certain characters in my step definitions? When user verifies if ABC widget exists Then the 'The 7 Things $channel' label is displayed In this case I need to escape 7 and $ as a regular string. 回答1: You could do this, Then the /'The 7 Things $channel' label is displayed/ Corresponding Step def would be, @Then("^the /'The 7 Things \\$channel' label is displayed/$") public void the_The_Things_$channel_label_is_displayed()

In the Karate DSL Framework, how can we add custom step definitions to expand its functionalities beyond REST capabilities?

允我心安 提交于 2019-11-30 20:09:51
问题 I understand the philosophy behind Karate is to not have to add custom Step definitions. However, the REST API Testing we perform in our project is more integrated so we have to verify POST responses in MongoDB collections, ActiveMQ, and a SQL Server DB. Is there anyway to easily add custom step definitions to expand the Karate DSL Framework beyond its REST Capabilities? I tried downloading the source code and importing it as a Maven project but I came across many dependency issues. 回答1: It

Is it possible to reuse a feature as the “Given” for another feature?

▼魔方 西西 提交于 2019-11-30 18:27:56
Is it possible to reuse a feature as the "Given" for another feature? Or am I trying to do something I shouldn't be trying to do basically my features look like: Scenario: Creating a basic account with valid details (happy path) Given I am on the "signup" page And I enter all the right details #this is shortened of about 20 steps for your reading ease When I press the button labelled "Sign up" Then I should see the text "Thanks for signing up" And I should have an email from "confirmation@mysite.com" titled "Confirm your account Michael" And the database should contain a record for the user

Pretty output of Gherkin feature files

筅森魡賤 提交于 2019-11-30 17:20:18
We're building up a specification in Gherkin, and we'd like to present the feature files to the business stakeholders. How can we export all our feature files in some sort of 'pretty' format? For example: Generate a document containing all features OR integrate features into other documentation OR publish the feature files on a web portal (nicely formatted) The best I've seen so far is Pickles; http://github.com/picklesdoc/pickles It's work in process but looks good already. Please supply your feedback on GitHub Our team is currently using relish , a code project to nicely format your gherkins