cucumber

Cucumber-Appium - Where to store Hooks if initialising driver in @Before

独自空忆成欢 提交于 2020-01-04 07:27:48
问题 I'll try to explain how I've built this, I imagine something obvious may jump out. I'm relatively new to this but am building a cucumber-appium framework and am running into some trouble. Currently, I initialise my Appium driver in my @Before hook which is in a GlobalHooks class which contains all Hooks. I have altered the hook so part of it only runs at the start of the test run as Cucumber doesn't support global hooks and I don't see why I should initialise the driver before every test (I'm

How to create a user record using factory girl and cucumber?

对着背影说爱祢 提交于 2020-01-04 06:49:27
问题 I have never used factory girl and I started testing from this week so all this new stuff just making me crazy. Can anyone explain me a simple way to create a record using factory girl. Here is the use case. I already created a test using cucumber where it creates a user and also create other records like account, user categories. Now I am writing second test case where I say there should be no test data(I can use data created from first test but dont want dependency from other test cases.).

Is it possible to configure cucumber to run the same test with different spring profiles?

拟墨画扇 提交于 2020-01-04 02:32:07
问题 I have an application where I'm running a trial with different technologies. I have a set of interfaces implemented with each technology and I use spring profiles to decide which technology to run. Each of the technologies has its own Spring java config annotated with the profile they are active for. I run my cucumber tests defining which profile is the active one but this forces me to manually change the string every time I want to test a different profile, making it impossible to run

How can a gem provide Cucumber features and step definitions?

◇◆丶佛笑我妖孽 提交于 2020-01-03 18:33:24
问题 I have two Rails projects (A and B) with the following gems, among others: #project A gem "green_theme", :path => "~/dev/themes/green_theme" gem "devel_tasks", :path => "~/dev/themes/devel_tasks" #project B gem "red_theme", :path => "~/dev/themes/red_theme" gem "devel_tasks", :path => "~/dev/themes/devel_tasks" Both projects, A and B, have a features dir for features and steps. Both themes, red and green, should have common functionalities like login/logout buttons, html meta-tags, and so on.

How can a gem provide Cucumber features and step definitions?

♀尐吖头ヾ 提交于 2020-01-03 18:33:12
问题 I have two Rails projects (A and B) with the following gems, among others: #project A gem "green_theme", :path => "~/dev/themes/green_theme" gem "devel_tasks", :path => "~/dev/themes/devel_tasks" #project B gem "red_theme", :path => "~/dev/themes/red_theme" gem "devel_tasks", :path => "~/dev/themes/devel_tasks" Both projects, A and B, have a features dir for features and steps. Both themes, red and green, should have common functionalities like login/logout buttons, html meta-tags, and so on.

Cucumber BeforeStep

风格不统一 提交于 2020-01-03 08:26:31
问题 Is there a BeforeStep equivalent to AfterStep in Cucumber? If not - has anyone found a solution / workaround? 回答1: According to the documentation on Hooks on the Cucumber Wiki on GitHub, the answer is no. There is Before but no BeforeStep . Depending on what you are trying to achieve, Before might do what you need. 回答2: So far as Before is executed before each scenario and AfterStep - after each step in scenario, to achieve BeforeStep you can simply place you code in both hooks: Before and

Can you review my Perl rewrite of Cucumber?

假装没事ソ 提交于 2020-01-03 01:58:08
问题 There is a team working on acceptance testing X11 GUI application in our company, and they created a monstrous acceptance testing framework that drives the GUI as well as running scenarios. The framework is written using Perl 5, and scenario files look more like very complex Perl programs (thousands of lines long with procedural-programming style) than acceptance tests. I recently learned Ruby's Cucumber, and generally have been using Ruby for quite a lot of time. But unfortunately I can't

Using Cucumber + RSpec in a production environment

♀尐吖头ヾ 提交于 2020-01-02 22:02:28
问题 Have you used Cucumber in a production environment? What problems did you find using it? Would you recommend I use it? I'm currently learning to use Cucumber with RSpec, I'm weighing up Pro's and Con's for using it in upcoming projects and would like some input. I will be using RSpec but I'm wondering if using Cucumber will be worth the extra time taken to write the tests. Extra Information: I don't deal with clients directly; however I do work in a team and deal with project managers who don

cucumber tags based on maven profile

≯℡__Kan透↙ 提交于 2020-01-02 19:12:01
问题 I am trying to run specific Gherkin scenarios based on the variable @tags(if it is possible). For example, if my profile is "dev" I want to run scenario 1 and if profile is "qa" I want to run scenario 2. I can get the profile value in my java class. I can also pass the tags in the command line and run it as mentioned here. But that is not something I am looking for. For example: @QA Scenario:I do x and check y Given I do abc Then the response is 200 @DEV Scenario:I do y and check x Given I do

cucumber tags based on maven profile

会有一股神秘感。 提交于 2020-01-02 19:11:22
问题 I am trying to run specific Gherkin scenarios based on the variable @tags(if it is possible). For example, if my profile is "dev" I want to run scenario 1 and if profile is "qa" I want to run scenario 2. I can get the profile value in my java class. I can also pass the tags in the command line and run it as mentioned here. But that is not something I am looking for. For example: @QA Scenario:I do x and check y Given I do abc Then the response is 200 @DEV Scenario:I do y and check x Given I do