Git Product home page Git Product logo

nightwatch-cucumber's Introduction

โš ๏ธ WARNING! This package is deprecated in favour of Nightwatch v2 as it supports Cucumber out of the box.

http://mucsi96.github.io/nightwatch-cucumber

npm version Build Status All Contributors Coverage Status semantic-release Greenkeeper badge js-standard-style Twitter Follow Ask question

This module enables to use a BDD-style approach for cross-browser testing:

nightwatch-cucumber's People

Contributors

aaron-goshine avatar aberonni avatar amurdock avatar aquilax avatar dmerc avatar fabioquinzi avatar gitter-badger avatar greenkeeper[bot] avatar greenkeeperio-bot avatar humphreyn avatar jbblanchet avatar kerimovaa avatar klokovas avatar ldabiralai avatar leipert avatar m3kh avatar marikaner avatar mr-wildcard avatar mucsi96 avatar myklt avatar vspiewak avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nightwatch-cucumber's Issues

Test gets a Type Error but the Test is marked as passed

I'm submitting a ... (check one with "x")

[x ] bug report
[ ] feature request
[ ] support request => Please do not submit support request here, instead use https://groups.google.com/d/forum/nightwatch-cucumber

Current behavior
When you get a type error when running a test, the test is marked as passed with no failures

Expected/desired behavior
When running a test and a type error occurs, the test should be marked as failed

Reproduction of the problem
This can be reproduce by trying to a non-existent method when running a test

Please tell us about your environment:

  • nightwatch-cucumber version:
    4.1.1
  • nightwatch version:
    0.8.6
  • cucumber version:
    1.2.0
  • Node.js version:
    4.4.5

Mink support

Hi,

This stack was amazing thanks :)

Because cucumber-mink propose many usefull step, did you plan a support for cucumber-mink at the top of cucumberJS ?

Feature tag is not working

I am running the following command to run the tests, in which I want to skip some of the tests, "node_modules/.bin/nightwatch --skiptags ", but it is not working. It is still running the features under the aforementioned

this.api not available within page object

Hi. First of all thanks for the awesome library!

From the nightwatch docs it says that you should be able to access this.api inside a page object like so (following code taken directly from docs):

module.exports = {
  url: function() { 
    return this.api.launchUrl + '/login'; 
  },
  elements: {}
};

However, when I try to do the exact same thing this.api is undefined. I'm not sure whether it is user error, or a bug somewhere, or maybe the api is slightly different for nightwatch-cucumber than for regular nightwatch. Do you know if there is a way to access the api from inside a page object? Thanks!

nightwatch-cucumber version: 4.0
nightwatch version: 0.9.1
cucumber version: 1.2
Node.js version: 6.2.2

steps.length is not a function

Current behavior
Running a test using nightwatch runner fails with steps.length is not a function

image

Reproduction of the problem
I'm running one test and upon forcing it to fail it errors as described.

Please tell us about your environment:

  • nightwatch-cucumber version: 3.0.0
  • nightwatch version: 0.9.1
  • cucumber version: 1.0.0
  • Node.js version: 6.2.0

Feature execution Reporting

Is it possible to generate a report similar to Cucumber-jvm for scenario/feature report indicating pass, failure etc.

My CI displays well but when I run with the cucumber runner with the command node nightwatch.js --tag test
It doesn't display.

Not able to execute multiple Scenarios in a feature file

Hi,

I am not able to execute multiple scenarios in a feature file.
When i try to do so, it always gives this generic error message which is difficult to debug:

ERROR There was an error while starting the test runner: Error: External global file could not be located - using globals/cucumber.js.

PS : Also, I have noticed that whenever there is any typo error in the feature file, then the above error is always shown. This way it becomes very difficult to debug the cause of the error.
Can you please suggest any workaround, how to debug such issues.

Awaiting response.....

Thanks

group test doesn't work

I'm submitting a ... (check one with "x")

[x] bug report
[ ] feature request
[ ] support request => Please do not submit support request here, instead use https://groups.google.com/d/forum/nightwatch-cucumber

Current behavior
use more groups don't work

Expected/desired behavior

Reproduction of the problem
If the current behavior is a bug or you can illustrate your feature request better with an example, please provide the steps to reproduce and if possible a minimal demo of the problem via https://c9.io, http://www.koding.com, https://www.nitrous.io or similar.

when i run "node nightwatch --group grouptest1" the result is this without the the tests start :
Starting selenium server in parallel mode... started - PID: 8248

What is the expected behavior?

What is the motivation / use case for changing the behavior?

Please tell us about your environment:

  • nightwatch-cucumber version:^3.0.0
  • _nightwatch version:_0.9.1
  • _cucumber version:_1.0.0
  • _Node.js version:_6.1.0

Not running multiple features

I can't seem to get multiple features to run using this example. I've tried passing in tags to cucumber using the following code but it still doesn't work.

runtime = Cucumber(getFeatureSources(), getSupportCodeInitializer(), {tags: ["@testplan"]});

Not sure what's the problem?

strange behavior after update

Using page-object tests after the last update of nightwatch after launching nightwatch -e chrome,the test don't start and i've this output :

Warnings:

  1. Scenario: First try google - features/google.feature:4
    Step: Given I open google home page - features/google.feature:6
    Message:
    Undefined. Implement with the following snippet:
   this.Given(/^I open google home page$/, function (callback) {
     // Write code here that turns the phrase above into concrete actions
     callback(null, 'pending');
   });

is it possible that is a regression for the update?

thank you,
Alfredo

nightwatch-cucumber marked passed for failed cases

I'm new with nightwatch-cucumber. I wrote 3 scenarios and they are failed. The console log also shows they failed. But in conclusion the result shows 3 scenarios passed!!!

Please take a look at screenshot. Was it an issue or I missed something?

image 6

Allow configurable paths for features and step-definitions

I am using WebStorm as the IDE and one of its benefits is that it generates stubs for step definitions based on what I specify in the feature file. But these step definitions are generated in the folder step_definitions which is created as a subfolder within features folder.

Right now, I am copying the generated stubs from features/step_definitions to step-definitions/ to use nightwatch-cucumber. Instead if the path for step-definitions and features were configurable, then individuals could just specify it as per their preferences.

If you agree with this, I can take a shot at doing the necessary changes.

Pulling more than one feature file.

Perhaps we're doing something wrong, but this project doesn't run out of the box, and we needed to edit globals/cucumber.js at lines 42 (lookupStepDefinitionsByName --> lookupStepDefinitionByName) and 57 (removing [0], as stepDefinitions is not an array). After making those changes, finally everything runs, however only one feature--the first alphabetically--is run.

How can this be fixed to be able to run MULTIPLE features.

Scenrio Outline Example Data from Json file

I'm submitting a ... (check one with "x")

[ ] bug report
[ x ] feature request
[ ] support request => Please do not submit support request here, instead use https://groups.google.com/d/forum/nightwatch-cucumber

Current behavior
Scenario outline example data has to be embeded as a markdown table.

Expected/desired behavior

Examples:
    file: './example.(json|yml|csv|md)'

Reproduction of the problem
If the current behavior is a bug or you can illustrate your feature request better with an example, please provide the steps to reproduce and if possible a minimal demo of the problem via https://c9.io, http://www.koding.com, https://www.nitrous.io or similar.

What is the expected behavior?

same as current

What is the motivation / use case for changing the behavior?

  • less typing
  • reuse of data

Please tell us about your environment:

  • fedora 22 64bit
  • nightwatch-cucumber version:
  • nightwatch version:
  • cucumber version:
...
    "cucumber": "^1.2.2",
...
    "nightwatch-cucumber": "^4.1.2",
    "nightwatch": "^0.9.6",
...
  • Node.js version:
$  npm --version
3.10.5

$ node --version
v4.4.7

Generic error message shown in case any issue(typo error, etc.) with feature file. How to debug?

Hi,

We always get a generic error message on the console, in case there is any issue with the feature file (for eg: same steps repeated, or same scenarios repeated), or if there is any other typo error in the file.
The error message makes it difficult to debug the actual issue, since it lands the user nowhere.
This is the error message that i get:

ERROR There was an error while starting the test runner: Error: External global file could not be located - using globals/cucumber.js.

PS : All my settings are correct & in case i rectify the feature file correctly, the test case executes fine.

How can i debug such issues, & not get this error message always.

Reply awaiting...

Thanks
Simran

Can't make use of client in the Step definition file...

Hi Mucsi,
Hope you are doing good. Thanks for the integration with Nightwatch and Cucumber.
I am planning to make use of nightwatch page objects. In order to do so, I need to access the client in the step definition file.

Is there any way, where it understands the client object from the step definition?

Your help is very much appreciated.

Kind regards
Sharath Konda

use cucumber tags in gherkin with nightwatch-cucumber

hi all,
it's possibile launch just specific test (tags marked) in the gherkin file like moonraker+yadda does?
i need something like this:

@mytag
Feature: My Feature

Scenario: My Scenario
Given something
When I do something else
Then the this test is ok

step from step definitions

I'm submitting a ... (check one with "x")

[ ] bug report
[ x] feature request
[ ] support request => Please do not submit support request here, instead use https://groups.google.com/d/forum/nightwatch-cucumber

add a step from step definitions adding this lib https://github.com/hackhat/cucumberry and modifying for nightwatch/cucumber would be great(At the moment cucumber don't have step from step in javascript but only in ruby)

The launch of test scope is not working from v 2.1.1

Steps to reproduce:

  1. I have a version 2.1.1 and latest of nightwatch-cucumber
  2. I have a few feature files which have the same tag.
  3. I try to launch tests using this tag
  4. The first test from the first feature file is working fine

expected result: the second test from the second feature file will be launched
actual result: it's failed with error (see screenshot)

Note: it works fine till the ver 2.1.1

b9b4962c606d25240b4b8cd16dbcfeb1

Selenium process takes 1 minute to finish

Hi, this is probably unrelated to this, I'm not sure but.... any help appreciated.

Currently my scenario only tests an element being visible and even though the assertion succeeds, after 1 minutes and I get a [Error: Step timed out after 60000 milliseconds] and then the selenium process finishes.

problem with html report

hi,
after the end of all tests in reports folder i found only .xml file (for example FIREFOX_46.0.1_WINDOWS_google.xml) and not the index.html with piechart and other report.
Can you help me please?

Ability to use arrow functions.

I know due to the current lexical scope, this is passed through the function but it would really nice to be able to use arrow functions eg:

module.exports = () =>
  this.Given(/^I open Google's search page$/, () =>
    this
      .url('https://www.google.co.uk')
      .waitForElementVisible('body', 1000)
  )

Is there a way to do this or is the best way to just keep using function?

Keep browser instance open

Currently, new browser instances are opened and closed per feature. How do I force the browser session to stay open and for the features to reuse the same browser session?

Usually, one could add the background section to setup the scenario (login etc.) but your implementation doesn't seem to support background data.

[Feature request] automatically open report when test is finished

I'm submitting a ...

[ ] bug report
[x] feature request
[ ] support request

I'm wondering whether the HTML report file could be automatically opened once the test has finished running. This could be useful in the case where you run a long test (especially with phantomjs where you don't see the browser window open and close).

I'm guessing it could be a configuration option or a CLI option? Not sure if it is feasable but I'll look into contributing it myself if you think it could be useful.

Running more than 3 feature file doesn't work

I'm working with more than 3 feature files using nightwach as runner.

When I run the tests only execute 3 feature files: the first one, the second one and the last one. I can't see why didn't run the other tests. In the logs there are no errors.

/test $ ls -l features/
total 40
-rw-r--r-- 1 jacobo jacobo 5963 sep 14 10:57 CasoUso01.feature
-rw-r--r-- 1 jacobo jacobo 5397 sep 14 12:59 CasoUso02.feature
-rw-r--r-- 1 jacobo jacobo 7065 sep 14 17:33 CasoUso03.feature
-rw-r--r-- 1 jacobo jacobo 2499 sep 14 17:30 CasoUso04.feature
-rw-r--r-- 1 jacobo jacobo 280 sep 15 08:48 CasoUso05.feature
drwxr-xr-x 2 jacobo jacobo 4096 sep 14 14:29 step_definitions

If I delete the files CasoUso04.feature and CasoUso05.feature nightwatch runs propertly CasoUso03.feature

Please tell us about your environment:

  • nightwatch-cucumber version: 4.1.0
  • nightwatch version: 0.9.6
  • cucumber version: 1.2.1
  • Node.js version: 0.12.15

The new [require(\"nightwatch-cucumber\").path] config src location does not work

Hi
Thank you for working on my issues. After i have updated the package, I am not able to run the tests.
nightwatch-cucumber_config json_src issue

In earlier versions, the temp-tests was working but it was only copying unnecessary test folders. As you had mentioned, that you cannot read nightwatch-cli args, i was wondering how about reading the cli args via process.argv.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.