cucumberjs

Restart Browser After Every Feature File

邮差的信 提交于 2019-12-08 06:33:23
I would like my Protractor- CucumberJS framework to start browser at the start of every feature file - load the URL - execute scenarios - close the browser once all scenarios are done executing - launch fresh browser instance for next feature file...and so on. I am using Beforefeature hook to launch URL and Afterfeature hook to do browser.quit() Tried setting shardTestFiles to true in multiCapabilities . It does launch a separate browser for every feature file but throws error - NoSuchSessionError: This driver instance does not have a valid session ID (did you call WebDriver.quit()?) and may

wdio-cucumber-framework - Keep same webdriver session during single test execution

烈酒焚心 提交于 2019-12-08 06:29:54
问题 I am using wdio-cucumber-framework for my test automation. I have test cases in multiple .feature files. When I execute test cases a new webdriver browser instance is generated for each feature file. settings in wdio.config.js capabilities: [{ maxInstances: 1, browserName: 'chrome' }], services: ['selenium-standalone'], framework: 'cucumber', reporters: ['spec'], Feature File 1 ---> 5 test cases Feature File 2 ---> 2 test cases When I execute all the test cases in both feature files, a

Restart Browser After Every Feature File

本小妞迷上赌 提交于 2019-12-08 05:27:17
问题 I would like my Protractor- CucumberJS framework to start browser at the start of every feature file - load the URL - execute scenarios - close the browser once all scenarios are done executing - launch fresh browser instance for next feature file...and so on. I am using Beforefeature hook to launch URL and Afterfeature hook to do browser.quit() Tried setting shardTestFiles to true in multiCapabilities . It does launch a separate browser for every feature file but throws error -

wdio-cucumber-framework - Keep same webdriver session during single test execution

依然范特西╮ 提交于 2019-12-07 03:15:28
I am using wdio-cucumber-framework for my test automation. I have test cases in multiple .feature files. When I execute test cases a new webdriver browser instance is generated for each feature file. settings in wdio.config.js capabilities: [{ maxInstances: 1, browserName: 'chrome' }], services: ['selenium-standalone'], framework: 'cucumber', reporters: ['spec'], Feature File 1 ---> 5 test cases Feature File 2 ---> 2 test cases When I execute all the test cases in both feature files, a browser instance is launched for feature file 1. Once all the 5 test cases in feature file 1 are executed,

AssertionError: expected [ true ] to be true

邮差的信 提交于 2019-12-06 10:22:39
I have faced with the strange assertions problem so even successful assertions are marked as failed, like this: this.expect(this.getWidget('contacts').isNamesDisplayed()).to.eventually.be.true.and.notify(next); and in the console I have: 1 scenario (1 passed) 4 steps (4 passed) 0m03.618s [17:06:38] E/launcher - expected [ true ] to be true [17:06:38] E/launcher - AssertionError: expected [ true ] to be true As you see in this case test marked as successful despite of failed assertion, but in case when after 'failed' assertion there is another one the whole thing will be failed. I'm using the

Protractor Fails on Build Server - ElementNotVisibleError

一笑奈何 提交于 2019-12-06 07:34:42
问题 All my angular e2e tests using protractor with cucumber are running smooth and fine on my machine. But as soon as I run the tests on the build server, I get an error ElementNotVisibleError: element not visible Session info: chrome=51.0.2704.84 Driver info: chromedriver=2.21.371459 platform=Windows NT 6.1 SP1 x86_64 In the beginning, I thought this has something to do with timing, some asynchronous stuff that is happening but after hours of debugging I can finally reproduce the bug even on my

How can I use WebStorm to create a Cucumber step definition file in TypeScript instead of JavaScript?

一世执手 提交于 2019-12-06 04:43:24
I'm building a new e2e test suite using Cucumber.js and I'd like to use TypeScript for my step files. When I create a new step and I press Alt+Enter to have WebStorm generate a new step file the only option I am presented with is to create a JavaScript file. Does anyone know how I can make this create a new step file in TypeScript? Webstorm doesn't seem to provide a wizard for file type "TypeScript" so you might want to create your step definition file manually. For the Simple Math Example a possible TS step definition file might look like this: import * as cucumber from "cucumber"; module

CucumberJS - Error: Step timed out after 5000 milliseconds at Timer.listOnTimeout (timers.js:92:15)

本小妞迷上赌 提交于 2019-12-06 03:55:14
问题 I'm new to cucumberjs and just trying out my first attempt at running a feature. I've built the feature that is on the cucumber-js github page. I get this error when trying to run it: Benjamins-MBP:Features Ben$ cucumber.js example.feature Feature: Example feature As a user of cucumber.js I want to have documentation on cucumber So that I can concentrate on building awesome applications Scenario: Reading documentation # example.feature:6 Given I am on the Cucumber.js GitHub repository #

Chimpjs and Meteor: method calls in tests without using Velocity

只愿长相守 提交于 2019-12-05 02:12:44
问题 This app shows an example of testing Meteor with Cucumber: https://github.com/mhurwi/cucumber-meteor-tutorial It works well with Velocity. But my computer becomes very slow when starting an app with Velocity and I don't want it to always run when I'm developing. So I tried to use Chimp as an NPM module by using chimp --ddp=http://localhost:3000 as proposed here: https://chimp.readme.io/docs/getting-started-with-meteor-cucumber But the tests with method calls (the methods are in tests/cucumber

Message: function timed out after 5000 milliseconds - Protractor & CucumberJS

泪湿孤枕 提交于 2019-12-04 17:54:17
cucumberjs --version 1.2.2 protractor --version 4.0.1 Both installed globally via npm I keep getting this error after upgrading to cucumberJs version above. Failures: 1) Scenario: Get records from DB e2e\features\transac.feature:7 Step: Given I am logged in as "username" with "password"- e2e\features\transac.feature:8 Step Definition: e2e\steps\loginSteps.js:17 Message: function timed out after 5000 milliseconds 1 scenario (1 failed) 1 step (1 failed) 0m06.608s Please note I included my env.js above in the cucumber options block and here's my env.js content: exports.config = { // set to