gherkin

How to get Gherkin syntax highlighting for .feature files in Visual Studio?

青春壹個敷衍的年華 提交于 2019-12-23 08:29:15
问题 There's no highlighting for Feature, Scenario, Given, When, Then, etc. keywords by default. Is there a ready made template out there to enable this? 回答1: The recent vesions of SpecFlow have a built-in syntax highlighting for VS2010. 回答2: http://github.com/henritersteeg/cuke4vs does exactly this. 来源: https://stackoverflow.com/questions/2959173/how-to-get-gherkin-syntax-highlighting-for-feature-files-in-visual-studio

Reusable/Generic Examples table in Cucumber

岁酱吖の 提交于 2019-12-22 11:23:58
问题 Is it possible for multiple scenarios to use the same Examples table? So instead of having something like the following: Scenario Outline: First Scenario Given I am viewing "<url>" Then I assert that the current URL "<url>" Examples: | url | | https://google.com | | https://twitter.com| Scenario Outline: Second Scenario Given I am viewing "<url>" with route "</contactus>" Then I assert that "<url>" contains "contactus" Examples: | url | | https://google.com | | https://twitter.com| I can do

Specflow use parameters in a table with a Scenario Context

左心房为你撑大大i 提交于 2019-12-21 03:57:23
问题 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>

Are there any non-developer tools to edit gherkin files? [closed]

送分小仙女□ 提交于 2019-12-20 08:56:39
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 3 years ago . Gherkin syntax files are just plain text so any editor such as notepad can be used. However, one of the more important things we are using this for is to provide tables of sample data. Without good formatting options the files become hard to read. There are some good tools (see: How to get Gherkin syntax

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

核能气质少年 提交于 2019-12-19 19:53:18
问题 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 回答1: 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

Pretty output of Gherkin feature files

不打扰是莪最后的温柔 提交于 2019-12-18 18:43:43
问题 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) 回答1: The best I've seen so far is Pickles; http://github.com/picklesdoc/pickles It's work in process but looks good already. Please

Codeception, write acceptance tests with the pageObject design pattern and gherkin

浪尽此生 提交于 2019-12-18 18:34:33
问题 I'm looking for a simple example of code with the pageObject design pattern and gherkin because when I follow the codeception BDD documentation, all examples written in the tests/ support/AcceptanceTester.php. I don't understand (poor english skills - -) how not concentrate all code in the AcceptanceTester.php file. By example, I have a sample home page with two buttons A and B. If the user click on the button A, the page A is loaded else if the user click on button B, the page B is loaded.

Is it acceptable to write a “Given When Then When Then” test in Gherkin?

寵の児 提交于 2019-12-18 10:35:44
问题 Is it acceptable to write a "Given When Then When Then" test in Gherkin? A real-life example is as follows all AllPlayers.com Scenario: Successfully register a user Given I am on homepage And I am not logged into an account When I follow "create a new account" And I fill in "First Name" with "Bobby" And I fill in "Last Name" with "Bricks" And I fill in "E-mail" with "bbricks@example.com" And I select "Jun" from "Birthday Month" And I select "22" from "Birthday Day" And I select "1985" form

Centralizing XPath in resource file, how to pass arguement from robot file?

☆樱花仙子☆ 提交于 2019-12-18 09:35:10
问题 I am centralizing all particular XPath strings to a resource file and importing the variables in that resource file in my test suite (robot framework). This way, they can be maintained in one place and I can use variable names that make the robot file readable. Is that something that is good practice? Sometimes I want to pass an argument to the variable, to make it more dynamic. However, the value of the variable contains and XPath, which sometimes has //div[path...etc][text()='MyString'].

Using Background title as Background in cucumber

♀尐吖头ヾ 提交于 2019-12-13 20:29:36
问题 Let's say I use Background feature which has the below steps: Background: My pre-requisites Given Step one When Step Two Then Step Three .... Then Step Fifteen So basically my Background has 15 common steps that is required for a set of scenario to run. My question is : Is it possible to use the Background title My pre-requisites in other feature files, instead of writing down all the 15 steps as Background? Or is there any other way to handle this more gracefully. 回答1: You can create a