cucumber

Not able to fetch correct data while executing 2 queries in BeforeAll function in protractor

筅森魡賤 提交于 2019-12-11 17:53:16
问题 I am using protractor 5.2.2. and cucumber 3.2.0.I am executing 2 queries in Before All function for fetching the data from the DB.But i need to execute in a way that after executing first query completely, then only i need to start executing the second query(because i am using the 1st query result in 2nd query and i need to catch the 2nd query result before starting all scenarios.).The code i have given in the BeforeAll function is given below var Connection = require('tedious').Connection;

expected 422 got 200 Cucumber with rails

好久不见. 提交于 2019-12-11 17:51:52
问题 Hi i am working on a ROR project with ruby-2.5.1 and rails 5. I am using cucumber in my rails app to test api i am new with cucumber. when i am trying to define feature for invalid data i am getting the error expected 422 got 200. my feature file: Feature: Registration Endpoint Scenario: User registration Given an application with application_id "1" When the client make a valid POST /registartions request with application_id: "1" Then response should have status 200 Scenario: using blank

Cannot get my features files recognized by aws device farm

岁酱吖の 提交于 2019-12-11 17:19:05
问题 I am having an issue running my cucumber project with device farm. I am getting this error: [TestNG] Caused by: java.lang.IllegalArgumentException: Not a file or directory: /tmp/scratchheDEgq.scratch/test-packagex5ZhYf/src/test/java/cucumber/features I understand from this message that there is an issue with the path of the features directory in my project but locally it works. This is how I put it in my code: @CucumberOptions(features = "src/test/java/cucumber/features", glue = "cucumber

How to design an application keeping SOLID principles and Design Patterns in mind

左心房为你撑大大i 提交于 2019-12-11 17:16:59
问题 Say an application in ruby when started has two modes : commandline mode and filemode When given a parameter ruby myprogram input.txt output.txt , it generates an output based on some commands in input file. also when not provided with any parameter it presents us with a command prompt. with following commands. create_class_with_capacity 40 create_student_with_marks Alex 70 create_student_with_marks Mathew 30 create_student_with_marks John 55 .. create_student_with_marks Sylvia 70 etc... fail

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

How to pass gradle project settings on the command line to gcloud firebase test android run

女生的网名这么多〃 提交于 2019-12-11 17:02:03
问题 I am trying to run Cucumber tests on Google Firebase Test Lab but I am having trouble figuring out how to pass a Gradle project setting to the gcloud firebase test android run command. As background, the tutorial Android BDD with Cucumber and Espresso — the full guide does a great job explaining how to setup Cucumber for an Android project and run it locally like this: ./gradlew connectedAndroidTest -Pcucumber The -Pcucumber flag switches between AndroidJUnitRunner and CucumberTestRunner in

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

Cucumber Tagging with Multiple Examples tables in a Scenario Outline

对着背影说爱祢 提交于 2019-12-11 16:09:03
问题 In my Cucumber Scenario Outline, some of the examples in my examples table are passing, and some are failing. I am trying to add tags to these, so I can run those which pass, & skip those which are failing currently. I have tried to copy some examples I've found online, but I am getting an error. Below is my latest attempt: Scenario Outline: BR001 test Given... When... Then... @passing Examples: | errorCode | | BRS002 | | BRS003 | | BRS004 | | BRS005 | | BRS008 | | BRS010 | | DE19716 | |

Cucumber : Command failed with status (1) with rake features

一世执手 提交于 2019-12-11 15:37:20
问题 I am using rails 2.3.5 with cucumber (0.10.0) cucumber-rails (0.3.2) capybara (0.4.1.2) rspec (2.5.0) rspec-core (2.5.1) rspec-expectations (2.5.0) rspec-mocks (2.5.0) rspec-rails (2.5.0) I have this scenario Feature: User Login Scenario: User sees the admin login page Given There exists an admin login page When I visit the admin login page Then she should see the "login , Password" fields And she should see links to "Forgot Password? , Do not have an account?" And my web steps Given /^There