bdd

Protractor repeat specs

独自空忆成欢 提交于 2019-12-11 23:57:40
问题 I have a case like this exports.config = { seleniumAddress: 'http://localhost:4444/wd/hub', specs: [ 'test/scenarios/user/login.js', 'test/scenarios/user/choose_user_1.js', 'test/scenarios/user/change_user.js', 'test/scenarios/user/choose_user_2.js', 'test/scenarios/user/change_user.js', 'test/scenarios/user/choose_user_3.js', 'test/scenarios/user/logout.js' ] } But protractor doesn't reuse change_user.js more than once.. I have to create change_user_1.js and change_user_2.js to get what I

how complete should SBE specifications be?

人盡茶涼 提交于 2019-12-11 19:08:00
问题 I'm working on a fairly large existing code base where SBE specifications are created to define the behavior of the product. There are currently around 450 scenarios, and this number is growing with each new feature added to the code base. Compared to traditional one line requirement statements, it is difficult to get a high level understanding of the functionality of the system due to wordy nature of the SBE specifications. As an example, the stories currently have a total of 46,830 words: $

Unable to create test Runner class in Cucumber Framework due to Error in resolving Cucumber Options

旧时模样 提交于 2019-12-11 17:58:24
问题 I am working on creating a Cucumber Framework for Test Automation. Issue I am facing is I am not able to resolve the imports for CucumberOptions in the Test Runner class Initially I tried to use the Suggestion of importing cucumber.api which is now deprecated. Then I went to the official Cucumber site to find the imports but they are not solving the problem as well. Deprecated Import : import cucumber.api.CucumberOptions; Import from Cucumber Official Site : import io.cucumber.junit.Cucumber;

Scenario hooks only valid on scenario outlines?

十年热恋 提交于 2019-12-11 17:08:35
问题 We're using Cucumber and Selenium with Ruby. After reading the documentation on hooks I've tried my hand at setting a few tags to set (for example) some environment variables. Here's a contrived example that demonstrates the problem. When I establish a Before hook like so: Before('@tag1', '@tag2') do puts "in the before hook!" end It'll take effect with a scenario defined like so: @tag1 @tag2 Scenario Outline: This is a test scenario Given I run my first step for "<user>" Then I complete my

Cucumber testing - getting RoutingError

橙三吉。 提交于 2019-12-11 16:43:50
问题 What's wrong, guys. Please help. When i run my cucumber test, i've got this error: No route matches {:action=>"show", :controller=>"accounts"} (ActionController::RoutingError) ./features/support/paths.rb:40:in `path_to' rake routes shows: account GET /accounts/:id(.:format) {:action=>"show", :controller=>"accounts"} cucumber_test.feature Scenario: Given... And... Then i should be on Show page features/support/paths.rb when /^Show page$/ account_path @account routes.rb Myapp::Application

How to run multiple feature files in sequence using Cucumber + protractor

流过昼夜 提交于 2019-12-11 16:24:49
问题 I want to run feature files in a desired order or sequence, for example: tags:"`@ProtractorScenario` or @CucumberScenario" But cucumber scenario is getting executed first. Can someone guide me on this? Note: Cucumber is executing scenario based on alphabetical order of feature file in folder Also, in cases with more than 50+ feature files, what would be the best way to define sequencing of cucumber feature files? 回答1: In order to have reliable tests, your tests should be independent and not

Can behat check that steps are defined before trying to run anything?

巧了我就是萌 提交于 2019-12-11 13:17:10
问题 I've got a behat scenario that takes a long time to run. If I've written a step incorrectly, I have to wait for the test to hit that step before I find out my mistake when it tells me I've got an undefined step. Is there a way to get behat to check that all the steps it's going to try and run are defined, before it tries to run anything? 回答1: Use dry run option to prevent step execution: bin/behat --dry-run In the long run, you should rather fix your tests and make them quicker. For example,

Parameters in Behat 3

一世执手 提交于 2019-12-11 11:50:37
问题 I have a website written in PHP with around 40 countries. I started to develop test in Behat v3, with many features. Sometimes, I need to run a feature/suite with a specific country and on a specific server. For instance, what I have to do is : php bin/behat --suite=mySuite --env=stg --country=US,IT,CA Or something like that. For just retrieve URL by the environment and country passed in parameter. I think it's not possible whit Behat and if not, what kind of tool can I use ? Thanks ! 回答1:

Adding @RunWith for jbehave-junit-runner breaks JBehave build using Maven

对着背影说爱祢 提交于 2019-12-11 11:49:08
问题 I'm using JBehave with my Maven build which I also develop in Eclipse and sometimes run the my unit tests with the JUnit runner in Eclipse. I found jbehave-junit-runner works well for beautifying the JBehave stories in the JUnit runner. However, adding jbehave-junit-runner seems to have broken my Maven build. Result of mvn clean install after installing https://github.com/codecentric/jbehave-junit-runner: [INFO] ------------------------------------------------------------- [ERROR] COMPILATION

Calling entire feature file(or only when steps) into another feature file

三世轮回 提交于 2019-12-11 10:22:20
问题 I have been trying to call one base feature file which has steps which are repetitive across most of my other scenarios in suite. Since base/common feature file has around 50 odd steps(based on manual TC) and I had to verify every page/element hence it's becoming very long feature file. To avoid confusion I had divided entire base file into small sections by giving the scenario steps after every 4-5 steps to avoid the chain and added "#" as a prefix since I wanted whole file to execute as a