cucumber

SpecFlow equivalent to parameterized test fixture

纵然是瞬间 提交于 2021-01-28 10:21:29
问题 I’m using SpecFlow to write a set of tests, and I’d like to run each test multiple times, with different input data. I could do this with scenario outlines, but I want to run every scenario in the feature file with the same test cases. I know I can use the Background to share the setup for one case, but I’m looking for something like a cross between Background and Scenario Outline, where I can supply a table of data to the Background and run the entire feature file once per row. In NUnit, I’d

SpecFlow equivalent to parameterized test fixture

点点圈 提交于 2021-01-28 10:20:42
问题 I’m using SpecFlow to write a set of tests, and I’d like to run each test multiple times, with different input data. I could do this with scenario outlines, but I want to run every scenario in the feature file with the same test cases. I know I can use the Background to share the setup for one case, but I’m looking for something like a cross between Background and Scenario Outline, where I can supply a table of data to the Background and run the entire feature file once per row. In NUnit, I’d

How to introduce delay between tests in protractor

萝らか妹 提交于 2021-01-28 08:11:41
问题 I am exploring protractor tool with cucumber and test is executing super fast.. in order to know if really elements are getting clicked or not, I am using sleep() method but failing. I am also using another method wait() with expected conditions which is also failing.. In fact, I understood click() method on the link element itself is failing.. That is, unable to click on element which I desired, however when I print on console element is printing all its attributes and methods. please find

Run tests in parallel using Cucumber with Java Selenium with Gradle

痴心易碎 提交于 2021-01-28 06:20:31
问题 I'm using Cucumber with Gradle and would like to run Cucumber features in parallel but can't figure out how. My cucumber executor looks like this: task cucumber() { dependsOn assemble, compileTestJava doLast { javaexec { main = "cucumber.api.cli.Main" classpath = configurations.cucumberRuntime + sourceSets.main.output + sourceSets.test.output args = ['--plugin', 'pretty', '--plugin', 'json:build/reports/cucumber-report.json', '--plugin', 'html:build/reports/cucumber-report.html', '--glue',

Error NoClassDefFoundError while running Junit test

坚强是说给别人听的谎言 提交于 2021-01-28 06:01:17
问题 When I run this script to automate : package testRunners; import org.junit.runner.RunWith; import io.cucumber.junit.Cucumber; import io.cucumber.junit.CucumberOptions; @RunWith(Cucumber.class) @CucumberOptions(features="resources/features", glue="") public class TestRunner_GoogleHomepage { } I use : cucumber-core-5.7.0.jar cucumber-java-5.7.0.jar cucumber-junit-5.7.0.jar cucumber-jvm-deps-1.0.6.jar gherkin-8.2.1.jar junit-4.12.jar mockito-all-1.10.19.jar I obtain this error result in Java

Pass POJOs in Cucumber Example table

北战南征 提交于 2021-01-28 04:16:53
问题 Description: As a test developer, I would like to use a single scenario to test 3 different environments. Simplified Scenario example: @smoke Scenario: Login to the login page and assert that the user is logged in Given User navigates to the page And User enters valid login credentials When User clicks on the login button Then Landing page can be seen Data ( These are grabbed from a property file - converted to POJO ) : Env1.class url = www.environment1.com username = john password = doe1

How Do I Write Cucumber Tests That Build On Previous Features?

房东的猫 提交于 2021-01-28 02:21:12
问题 I have started using Cucumber to write BDD tests to match the business use cases for my application. It is blockchain based so each user in the test is running an instance of the application. This also means that each test is quite heavy and 95% of the test time is in the setup stage. As I write the tests I am finding that I am starting to repeat myself and the earlier features are seemingly becoming redundant. One business flow is: User1 saves a new message User2 edits the message User1

How Do I Write Cucumber Tests That Build On Previous Features?

只愿长相守 提交于 2021-01-27 22:53:20
问题 I have started using Cucumber to write BDD tests to match the business use cases for my application. It is blockchain based so each user in the test is running an instance of the application. This also means that each test is quite heavy and 95% of the test time is in the setup stage. As I write the tests I am finding that I am starting to repeat myself and the earlier features are seemingly becoming redundant. One business flow is: User1 saves a new message User2 edits the message User1

How can i get cucumber scenario variables in title?

梦想的初衷 提交于 2021-01-27 21:33:21
问题 I would expect to be able to have my scenario outline title have more information by using the examples within the title itself: Scenario Outline: A <some> step is <result> When a <some> step Then I get <result> Examples: | some | result | | passing | passed | | failing | skipped | Then my scenario titles end up very useful: Scenario: A passing step is passed Scenario: A failing step is skipped 回答1: The Then keyword must be above the Examples . Feature: Scenario outline with variables

what is the error of cucumber.runtime.CucumberException: Arity mismatch: Step Definition in selenium with Java

蓝咒 提交于 2021-01-27 03:52:27
问题 I have wrritten a feature file to test the create elements button. But it generates an error message of cucumber.runtime.CucumberException: Arity mismatch: Step Definition. I dont know why its happening since I am new to automation testing. The following is the code that I have written. @When("^create elements$") public void create_elements_for_attributes(WebElement elementToClick) throws Throwable { driver.findElement(By.id("newElement")).click(); } The error that I have recieved is as