nightwatch-cucumber | Cucumber.js plugin for Nightwatch.js | Functional Testing library
kandi X-RAY | nightwatch-cucumber Summary
kandi X-RAY | nightwatch-cucumber Summary
[DEPRECATED] Cucumber.js plugin for Nightwatch.js.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Initialize the tests
nightwatch-cucumber Key Features
nightwatch-cucumber Examples and Code Snippets
Community Discussions
Trending Discussions on nightwatch-cucumber
QUESTION
I'm using Nightwatch-Cucumber
based on Nightwatch.js
for our tests. Ans also I use the PageObject Pattern
. These tests are not only end2end tests based on Selenium
but also REST API
tests. For the REST tests I'm using an Atlassian JIRA REST client for Node. Now I want to combine the power of Nightwatch, including Selenium, with the power of REST. So, I want to use both technologies together and I want to integrate the REST API calls within the Nightwatch framework.
I've tried to integrate the REST API calls within the perform()
function of Nightwatch to add the REST calls to the Nightwatch command queue, but without a complete success. I have to ensure that the REST calls are completely done before executing the next Nightwatch commands. Currently the following steps after the REST calls will be execute before the REST call is completely done. But how can I solve that problem?
This is my Cucumber Feature file:
...ANSWER
Answered 2018-Feb-16 at 14:36If you have an async task that you need to run synchronously you have to use the done
callback in your perform
function.
QUESTION
Nightwatch-cucumber is deprecated and we should use Nightwatch-api as per the author.
I have a set up where I use selenium grid with both a Firefox and Chrome nodes running waiting to be activated. I have not set any webdriver settings in my project. I am still able to run tests but it only takes the default test setting.
How would be able to run tests specifying a browser other than the default?
...ANSWER
Answered 2019-Jan-09 at 17:08As per the examples from repo, you should be able to pass it through two files (links below) which will enable you to execute them in desired browser (provided, it is configured in nightwatch.conf.js file).
https://github.com/mucsi96/nightwatch-api/blob/master/packages/selenium-hub-example/test/server.js
Examples from Repo:
Selenium Grid : https://github.com/mucsi96/nightwatch-api/tree/master/packages/selenium-hub-example
Webdriver : https://github.com/mucsi96/nightwatch-api/tree/master/packages/cucumber-example
Selenium standalone : https://github.com/mucsi96/nightwatch-api/tree/master/packages/cucumber-selenium-example
Please accept this as answer if it helps in resolving your issue.
QUESTION
When running a single test I would like to keep the browser open after running form fills so I can debug. Is there any way to do this with nightwatch-cucumber? Thanks would be a huge help.
...ANSWER
Answered 2018-Feb-12 at 18:08This isn't really a cucumber problem its a javascript problem, and I'm not a javascript expert, but I'd suggest you try putting a breakpoint before an assertion that looks at what your browser is showing.
Normally with a Cucumber scenario you would have a THEN, that looks at the view and tests something, just put the breakpoint in there before the assertion
QUESTION
I want to execute my automated tests, written in Nightwatch-Cucumber
over a Jenkins CI in a Docker container. I have a Docker image that I want to use for it.
This is what I want to do in more detail.
- Start tests over Jenkins CI job
- On the same machine the Docker image is loaded and the related Docker container will start. This container based on a Unix OS. Also, some configuration in Docker container will be executed.
- Tests will be executed (from local or remote) in a headless mode via xvfb and the report will be saved on Jenkins machine.
Over GitLab CI I've realized it over a .gitlab-ci.yml
config file and it runs very good:
ANSWER
Answered 2017-Jul-10 at 15:11Check out the maintained Selenium Docker images, specifically the node flavors. It's a good place to start, whether you decide to use the containers as-is or roll your own.
QUESTION
Is it possible to exit nightwatch-cucumber with an exit code of 0 even when the tests fail?
Reason being, with the breaking changes you can no longer generate a cucumber report in a step, meaning you have to wait for the tests to finish, pass or fail, to generate the report.
The problem is that teamcity sees test failures and will not progress to the next step, due to the tests failing with an exit code not equal to 0, thus not generating the cucumber report.
...ANSWER
Answered 2017-Dec-09 at 11:10I suggest to run cucumber report generation from NPM instead a separate Teamcity task. See the nightwatch-cucumber
docs regarding this topic.
QUESTION
I have integrated cucumber with nightwatch.js
.
My package.json looks like:-
...ANSWER
Answered 2017-Nov-16 at 21:19I have 3 suggestions:
- Try to remove
src_folders
. - Try to follow http://mucsi96.github.io/nightwatch-cucumber/#getting-started
- Check out https://github.com/mucsi96/nightwatch-cucumber-example
QUESTION
Until Nightwatch-Cucumber@7.3.1
the framework used Cucumber 2
and I realized my Cucumber report generation in a hook with an Event Handler
directly after test execution, like:
ANSWER
Answered 2017-Oct-08 at 19:27You have to run the report generation in a separate NodeJs process. An example package.json
could be the following.
QUESTION
I use Nightwatch-Cucumber
to automate my end2end tests and want to create a cucumber html report after test execution with cucumber-html-reporter
, but I get an error while report generation by cucumber-html-reporter
:
ANSWER
Answered 2017-Jul-13 at 05:18Try to generate cucumber html report in a separate step of test execution. For example if you are using npm script use a separate npm script to generate the report. The problem with your approach is that in Cucumber.js global After
hook the report is not created yet. That's why you are getting such an error. I suggest to use a separate node.js script to run cucumber-html-reporter.
QUESTION
Current behavior
I work with Nightwatch-Cucumber and the PageObject Pattern and I get an unexprected Error: function timed out after 60000 milliseconds
.
Expected/desired behavior All Nightwatch-Cucumber checks (like visibility checks) have to fail and no timeout problem has to occur.
Reproduction of the problem As pre-conditions I set the default timeout (60 seconds) globally in timeout.js:
...ANSWER
Answered 2017-Jul-12 at 15:47I tried debugging a little bit more. Maybe it's a bug with the Expect
?
I set my global timeout to 20 seconds:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install nightwatch-cucumber
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page