cucumber

cucumber.json report getting overwritten by rerun scenario report

时光怂恿深爱的人放手 提交于 2019-12-10 10:25:46
问题 I have got UI Test project and a API test project with same technology stack (JAVA1.8, Cucumber-JVM, JUnit, Maven) and both projects are showing me this problem. Probably because same set of dependencies are present in both. I have employed the Flaky test re-run mechanism using maven-surefire-plugin build-in functionality <rerunFailingTestsCount>1</rerunFailingTestsCount> . Also, I have cucumber dependencies added based on <groupId>io.cucumber</groupId> and not <groupId>info.cukes</groupId> .

iOS simulator - disable connect hardware keyboard programmatically

泪湿孤枕 提交于 2019-12-10 10:19:31
问题 I'm writing UITests that rely on showing the software keyboard. Since the CI launches the tests every time on clean new simulator, the simulator has hardware keyboard connected, hence the software one is not being presented. Is it possible to set some settings (maybe in schema?) to force-disable connecting hardware keyboard by the simulator. I am running tests using cucumber/appium. 回答1: Actually we faced the issue , the only solution we come up with is to perform "osascript" to run on your

How to get scenario name from a scenario outline in cucumber using java

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-10 10:08:33
问题 Suppose I have a test case like - *Scenario: Facebook login test GIVEN I am a Facebook user WHEN I enter my user name & password THEN login should be successful* How could I get the scenario name from the step definition methods corresponding to "I am a Facebook user" or "I enter my user name & password" or "login should be successful" ? Step definitions methods are - @Given("^I am a Facebook user$") public void method1() { //some coding //I want to get the scenario name here } @When("^I

How to add a section to a SitePrism page object dynamically?

China☆狼群 提交于 2019-12-10 08:40:09
问题 I'm using SitePrism to test my web application. I have a number of classes that extend SitePrism::Page and a number of often-used HTML snippets are represented by matching classes extending SitePrism::Section class Login < SitePrism::Section element :username, "#username" element :password, "#password" element :sign_in, "button" end class Home < SitePrism::Page section :login, Login, "div.login" end The problem is, the application I'm working on is based on a CMS, in which a page can be

How to run multiple feature files using the cucumber runner class?

大憨熊 提交于 2019-12-10 07:16:17
问题 Using the below line of code, all scenarios mentioned in login.feature can be executed. @CucumberOptions(features= "src/main/resources/publish/login.feature", format = {"pretty"} ) If I have to execute multiple feature files, how do I define? Assuming if I define as below, features mentioned in publish folder would be executed. @CucumberOptions(features= "src/main/resources/publish", format = {"pretty"} ) If I have to run multiple features and scenarios inside it, how do I define? Do i have

Rails3, Cucumber, Capybara, File upload => bad content body (EOFError)?

牧云@^-^@ 提交于 2019-12-10 03:26:34
问题 I'm having a hard time getting a simple file upload test working. I'm using Rails 3.0.0 on ruby 1.9.2 with Cucumber and Capybara. View: <%= form_tag "/upload/create", :multipart => true do %> <label for="file">File to Upload:</label> <%= file_field_tag "file" %> <%= submit_tag "Upload" %> <% end %> Cucumber Step: When /^I upload the basic file$/ do visit path_to("upload") path = File.join(::Rails.root, "somefile") attach_file("file", path) click_button("Upload") end In my controller, i have

FactoryGirl: Factory not registered: user (ArgumentError)

寵の児 提交于 2019-12-10 00:58:23
问题 Having a lot trouble getting all the ducks in the right order with FactoryGirl. Set up a minimalist rails app (3.0.11), factory_girl_rails (1.4.0), factory_girl (2.3.2) & cucumber-rails (1.2.1) and ruby-1.8.7-p352. The cucumber test is: Feature: a Scenario: test factory-girl Given the following user exists: | name | email | | Brandon | brandon@example.com | The result is this: cucumber Using the default profile... "Adam Advertiser" "a@b.com" #<User id: nil, name: nil, created_at: nil, updated

Karate API Tests - Escaping '?' in the url in a feature file

Deadly 提交于 2019-12-09 22:38:20
问题 I am using the path keyword from Karate API framework to concatenate strings to form a url. However, I am not able to pass '?'. Here is what I am doing: Background: * url 'https://api.cloud.abcde.com/animal/' Scenario: Verify the get status Given path 'herbivore?id=25' When method get Then status 200 When I run the test, i see the '?' being passed as %3F. I tried to escape it using \ and tried some other answers too but couldn't succeed. Do I need to use url encoding ? Any pointers or help

How to get code coverage of javascript using cucumber?

谁都会走 提交于 2019-12-09 21:57:58
问题 I am using gem ' Simplecov ' to generate the code coverage for ruby(.rb file) using cucumber but my UI code is in JavaScript . How i get the code coverage of Javascript using Cucumber? Is there any gem or tool available to get the code coverage of Javascript? Please give comments on that issue. 来源: https://stackoverflow.com/questions/23538879/how-to-get-code-coverage-of-javascript-using-cucumber

Rerunning the failed scenario using Maven/Cucumber/Serenity

≡放荡痞女 提交于 2019-12-09 19:46:53
问题 Has anyone used maven surefire plug-in or any other mechanism for rerunning failed scenario. I am using Cucumber with Serenity and Maven. I tried below different ways in order to rerun failed scenario without any manual intervention For example: If out of 5 test cases 2 test cases are getting error out then automatically my script should execute these 2 failed scenario before generating final serenity report 1. Maven surefire I have added below lines in pom.xml file <properties> <failsafe