nightwatch

Integrated end-to-end testing framework written in Node.js and using W3C Webdriver API. Developed at @browserstack

MIT License

Downloads
594.3K
Stars
11.7K
Committers
158

Bot releases are visible (Hide)

nightwatch - v1.4.3

Published by beatfactor about 4 years ago

  • Fixed #2489 - api commands throwing TypeError when called inside page section custom commands
  • Fixed #1969 - element selectors from page sections not working when used in custom commands
nightwatch - v1.4.2

Published by beatfactor about 4 years ago

  • Fixed #2488 - 'element not found' errors thrown by JsonWire protocol for /element requests were not ignored
  • Fixed an issue where the WebElement ID is not retrieved correctly when using chrome with selenium server and jsonwire transport
nightwatch - v1.4.1

Published by beatfactor about 4 years ago

  • Fixed #2486 - mocha test runner was unavailable.
nightwatch - v1.4.0

Published by beatfactor about 4 years ago

This version significantly improves the network stability and performance of the test runner, by improving the underlying http retry mechanism and error detection and reporting of API commands – a particularly important update for when using cloud testing services.

Additionally, we have added better support for writing advanced custom commands to make it easier to extend Nightwatch, and improved support for using Nightwatch programmatically. See writing custom commands docs page.

The Developer Guide docs also have been updated.

Changelog:

  • Added improved http request retry mechanism and better error reporting for api commands – a04162c6da76ea3576c6739cde61ae3b36940a63
  • Added enhancements to assist in writing of custom commands – c977b164508eda3bd145d4d594749426785a7c8c
  • Added abortOnElementLocateError global property to control if the testcase in progress should continue in the event of an element locate error (as a result of a click, getText, etc. command) – #2459
  • Fixed an issue with merging the config settings when passed programmatically – #2483
  • Fixed an issue where transport was set incorrectly for Chrome when using chromeOptions.w3c:true – d56a9db9e0a5a764bd96232ac859a40b7f69bf11
  • Fixed an issue where the locator strategy was not taken into account when specifying first argument in a waitFor* command – #2446
  • Fixed #2458 - implemented proper handling of 5xx server errors sometimes encountered during element commands, usually when using cloud testing services or selenium grid
nightwatch - v1.3.8

Published by beatfactor about 4 years ago

nightwatch - v1.3.7

Published by beatfactor about 4 years ago

Added new setting test_workers.node_options to enable passing node options to individual test worker processes.
Usage:

  • This will pass all of process.execArgv:
test_workers: {
    enabled: true,
    // automatically compute the number of workers based on CPU cores
    workers: 'auto',
    // pass node arguments to individual workers (all of the process.execArgv)
    node_options: 'inherit',
},
  • This will pass only the specified cli options:
test_workers: {
    enabled: true,
    workers: 'auto',
    // selectively pass node arguments to individual worker processes
    node_options: ['--inspect']
},
nightwatch - v1.3.6

Published by beatfactor over 4 years ago

  • Fixed #2417 - --filter argument was ignored if both --filter and --skiptags are set
  • Fixed - an issue occurring when using --filter argument and an empty src_folders setting - b2c2daa363c77f2e99c718e1cabdcd87c8f2c13e
  • Added - improved jUnit reporting for assertions in before/after test hooks - 0cc36278b07f3d1df95d5e5e27c2a8a9109e61c4
  • Added - stripping of ansi control characters in jUnit xml reports and improved currentTest api property - 0cc36278b07f3d1df95d5e5e27c2a8a9109e61c4
  • Fixed - an issue with running tests using the describe interface more than once in the same test run - cb1221de53e8e14dd88b409dd4a8d23ff69ecac1
  • Fixed - a problem with using the global --timeout argument in some cases - 1b3abcdf6474e8d56ba4c9900819b134e0dcf7bc
  • Fixed - an issue where a failed assertion inside the after test hook would have blocked the test run - 1e1103282b7657a627fdb123453754e243940b24
  • Fixed - displaying the correct error message in case of using an unknown api assertion (e.g. due to a typo) - abaaaf82504b1aaded2fefa177fd3c9ca5b6f6f4
  • Fixed - remove the isVisible workaround for Safari lower than v12 - c8e34b2f8e983e68c1cda89fb636c5b0f96c41e1
nightwatch - v1.3.5

Published by beatfactor over 4 years ago

  • Fixed #2365 - Removed deprecated optimist package and updated implementation of cli help display;
  • Fixed an issue with specifying a non-default port to geckodriver and chromedriver;
  • Fixed a potential issue when not specifying a callback to some element protocol actions;
  • Fixed #2375 - remove incorrect cli args from safaridriver.
nightwatch - v1.3.4

Published by beatfactor over 4 years ago

  • Fixed #2294: ES6 async/awaits does not work with browser.elements()
nightwatch - v1.3.3

Published by beatfactor over 4 years ago

  • Fixed #2286 - es6 await commands not working on page objects
  • Fixed #2269 - negate (".not") assertions not working with page objects
  • Added - cli option for showing timestamp in logs - #2268
  • Added error messages in JUnit xml report - #2131
nightwatch - v1.3.2

Published by beatfactor almost 5 years ago

  • Fixed #2263 - custom commands when called on sections without element ids
  • Fixed #2262 - keys() command stopped working due to a regression
nightwatch - v1.3.1

Published by beatfactor almost 5 years ago

  • Fixed #2255 - callback not being called when errors occurred during an element command;
  • Added improvements for the auto-generated nightwatch.conf.js file
nightwatch - v1.3.0

Published by beatfactor almost 5 years ago

New features

BDD describe Interface

Added BDD describe interface for writing tests. No further configuration is necessary and both exports and bdd interfaces can be mixed together (though not in the same file).
More details

assert.not Assertions

You can use .not assertions for every existing and custom assertion. Custom assertions will require to be updated to the new interface in order to make use of .not. Refer to the Custom assertions docs for details.

module.exports = {
  demoTest(browser) {
    browser
      .assert.not.elementPresent('.not_present') // previously .assert.elementNotPresent()
      .assert.not.visible('.non_visible'); // previously .assert.hidden()
      .assert.not.urlContains('http://');

    // ...
  }
}

New APIs

Commands:

Assertions:

Expect:

Improvements

New CLI options:

  • --headless - Launch the browser (Chrome or Firefox) in headless mode.
  • --timeout - Set the global timeout for assertion retries before an assertion fails. The various timeout values are defined in the Globals section.

More details

nightwatch Test Runner

  • Auto-generated configuration: if no existing config file is found in the current folder, Nightwatch will generate a nightwatch.conf.js config file, based on the operation system and existing driver packages. More details
  • Added support for http keepAlive which should be enabled when using remote testing services. See Configuration for details.
  • Added several improvements for running tests against cloud testing provider Browserstack; see also an example configuration for using Browserstack.

Fixes

  • Fixed #2219 - an issue with locating elements from page object sections using non @-based element identifiers
  • Fixed getElementSize and getLocation commands for w3c webdriver clients - #fd10c9b
nightwatch - v1.2.4

Published by beatfactor about 5 years ago

  • Added the module path of the testsuite in the test results object - #2207
nightwatch - v1.2.3

Published by beatfactor about 5 years ago

Fixed #2190 - test error/failure stack traces weren't showing correctly

nightwatch - v1.2.2

Published by beatfactor about 5 years ago

  • Added - new configuration settings to for fine tuning the Webdriver server process:
  • status_poll_interval - Interval (in ms) to use between status ping checks when checking if the Webdriver server is up and running
  • max_status_poll_tries - Maximum number of ping status check attempts when checking if the Webdriver server is up and running before returning a timeout error.
  • process_create_timeout - The entire time (in ms) to wait for the Node.js process to be created and running (default is 2 min), including spawning the child process and checking the status

More details

nightwatch - v1.2.1

Published by beatfactor about 5 years ago

New commands

Added several new commands in-line with the W3C Webdriver API:

Improvements

  • waitForElementVisible doesn't throw an error anymore if the element cannot be found - #2148
  • Added W3C Webdriver API compatibility support for .timeouts() command;
  • Added suppressNotFoundErrors option for element selector properties to enable suppressing NoSuchElement errors when element is not found for commands such as .click() or .getText() etc.

Fixes

  • Fixed #2155 - an issue with page object element selectors
  • Fixed #2165 - an issue with page object relative urls
  • Fixed #1301 - an issue with using .perform() with async callback
  • Fixed #2168 - setWindowSize for geckodriver
nightwatch - v1.1.13

Published by beatfactor over 5 years ago

  • Fixed #2141 - .verify assertions not working correctly
nightwatch - v1.1.12

Published by beatfactor over 5 years ago

  • Fixed #2123 - the .init() command was broken starting with v1.1.8
  • Fixed #2118 - Set default POST body to be empty JSON in order to use chromedriver 75
    If using Chromedriver 75 you need to set the following capabilities in your config:
desiredCapabilities : {
  browserName : 'chrome',
  chromeOptions: {
    w3c: false
  }
}

Chromedriver 75 has W3C Webdriver protocol enabled by default, however we recommend sticking to the JSONWire for now as some endpoints aren't implemented yet (e.g. /displayed). If using the default w3c webdriver mode, make sure to adjust the config like so:

{
  capabilities: {
    browserName : 'chrome',
  },
  webdriver: {
    use_legacy_jsonwire: false
  }
}
nightwatch - v1.1.11

Published by beatfactor over 5 years ago

  • Fixed element commands (e.g. getText) not being able to be used with ES6 async/await
  • Fixed an issue with using assert.elementPresent/elementNotPresent with W3C Webdriver
  • Fixed #2104 - an issue with waitForElement commands being called with a custom message
  • Fixed #2101 - a problem with loading custom commands located in sub-folders of the initial source folder(s)
  • Fixed #2099 - an issue with creating custom commands by extending built-in waitForElement commands