cucumber

Cucumber Excel Data Read

爷,独闯天下 提交于 2019-12-24 21:10:29
问题 I have created cucumber framework. I have 60 fields in my future file and it is very difficult for me to enter the data. Is there any possibility to load the data from excel in cucumber framework. Any sample Code is available? 来源: https://stackoverflow.com/questions/48180719/cucumber-excel-data-read

Browser.sleep and browser.pause do not get executed

冷暖自知 提交于 2019-12-24 20:38:14
问题 I am new to protractor and typescript and I am trying out the framework now for a PoC. However, I was wondering why the browser.sleep() or browser.pause() do not get executed in the following scenario? The test just exits right away after the first step passes. Given(/^I access the Catalogue page$/, async () => { await expect(browser.getTitle()).to.eventually.equal("Sign in to your account"); }); Then(/^I should see the product$/, async () => { browser.sleep(5000); //expect(cataloguePage

Naming Cucumber's Data Table

£可爱£侵袭症+ 提交于 2019-12-24 19:53:15
问题 I am creating test cases on forms that could contains over 50 parameters, some of them would show up when a certain set of questions would be answered specifically. The data tables were getting very long so I broke them into multiple data tables, each for a specific section of form. I don't want to add every heading in the step so I want to use the data table's name instead. Instead of: Scenario: . . . When I fill in <title> <first name> <surname> ... |title|first name|surname|...| . . . I

CucumberJvmSMFormatter Error on IntelliJ IDE

让人想犯罪 __ 提交于 2019-12-24 19:53:13
问题 Why am I getting below error while running feature file in IntellijIDE with Java/Selenium + cucumber framework? Error running 'Scenario: validating utag data on Login page ': org/jetbrains/plugins/cucumber/java/run/CucumberJvmSMFormatter 回答1: I have had a similar issue but was fixed after doing the following: Uninstall the gherkin plugin and the cucumber for java plugin and then reinstall them. File -> Settings -> Plugin 来源: https://stackoverflow.com/questions/51108935/cucumberjvmsmformatter

Intern-cucumber plugin error: A plugin named “cucumber” has not been registered

爷,独闯天下 提交于 2019-12-24 19:14:04
问题 I'm trying to get the intern-cucumber plugin working. I get the following error: Error: A plugin named "cucumber" has not been registered at Node.BaseExecutor.getPlugin @ src\lib\executors\Executor.ts:387:12 @ tests\addition.js:6:29 at runFactory @ node_modules\dojo\dojo.js:1134:43 at execModule @ node_modules\dojo\dojo.js:1262:5 at execModule @ node_modules\dojo\dojo.js:1253:12 @ node_modules\dojo\dojo.js:1297:6 at guardCheckComplete @ node_modules\dojo\dojo.js:1277:5 at checkComplete @ node

Getting exception while executing feature file. I have tried using plugin instead of format, still issue persists

寵の児 提交于 2019-12-24 18:45:00
问题 Exception in thread "main" cucumber.runtime.CucumberException: Only one formatter can use STDOUT, now both pretty and json use it. If you use more than one formatter you must specify output path with PLUGIN:PATH_OR_URL at cucumber.runtime.formatter.PluginFactory.defaultOutOrFailIfAlreadyUsed(PluginFactory.java:185) at cucumber.runtime.formatter.PluginFactory.convertOrNull(PluginFactory.java:144) at cucumber.runtime.formatter.PluginFactory.instantiate(PluginFactory.java:99) at cucumber.runtime

How to Iterate Datatable with type List<Class> in Cucumber

China☆狼群 提交于 2019-12-24 18:19:30
问题 I have below feature file with Given annotation Given user have below credentials |user |password | |cucumber1 |cucumber | |cucumber2 |cucumber | And i'm created below datamodel public Class DataModel{ public string user; public String password; } Trying to fetch data into the cucumber stepdefinition as below Public Class stepdefinition { @Given("^user have below credentials$") Public void user_have_below_credintials(List<DataModel> dm){ //Iterator or foreach is required to fetch row,column

How rerun failed test cases of cucumber-jvm in jenkins

无人久伴 提交于 2019-12-24 17:51:45
问题 How to rerun failed test cases of cucumber-jvm in jenkins? According to answers mentioned in this thread: How to rerun failed test cases in cucumber-jvm? There is different maven command to move and run scenarios for rerun.txt. How to execute them in Jenkins with separate maven command for rerun? 回答1: I use cucumber-serenity framework, which uses cucumber-jvm in the background to run everything. Here are the relevant parts of my pom. I have everything in a separate project, not mixed with any

How to read csv file based on scenario outline

北城余情 提交于 2019-12-24 12:27:41
问题 I am using cucumber and trying to read row from my csv file based on scenario name. Feature file : Scenario Outline: Verify content of my probblem1 Scenario, Title1, Title2, Title3, Title4, Title5 Verify content of my probblem1, Text1, Text2, Text3, Text4, Text5, Verify content of my probblem2, Text1, Text2, Text3, Text4, Text5, 回答1: The short answer is that reading CSV files from a Scenario written in Gherkin is not supported. If you want to read data from an Excel file, you have to

Creating Examples for ScenarioOutline in code

Deadly 提交于 2019-12-24 11:34:24
问题 I want to dynamically create multiple examples for a ScenarioOutline in a feature file. Is it possible to do this in the @before hook somehow? I know this is not how you're supposed to use cucumber, but how would it be possible? I already tried accesing the Scenario in the hook, but there are no methods to get all steps and their variables/placeholders 回答1: Cucumber doesn't encourage to have examples outside feature file. However there are few non standard way available with cucumber to use