What testing tool to use for automating user acceptance testing? The app itself uses react.

Should I use Selenium with various wait strategies, Jasmine or a different tool?

  • Are you comparing selenium with Jasmine as alternative? – Vishal Aggarwal Jan 1 '18 at 19:57
  • Jasmine is a BDD based testing framework where selenium is a UI test library. – Vishal Aggarwal Mar 13 '18 at 9:35

WebDriverIO / Protractor

How about using WebDriverIO or using Protractor since they both are the JS like-version of Selenium, using Cucumber for the BDD syntax. We have a SPA, built using Angular4 , and we run almost 200 e2e scenarios, having vanilla JS code in Protractor, using the various waits and it works pretty good actually.

WebDriverIO: http://webdriver.io/
Protractor: http://www.protractortest.org/#/

Both use the "describe, it" format.


Testcafe doesn't use WebDriver to work with browsers as other e2e solutions do.That is why it requires minimal test environment and it is installed with one command. Besides, this approach allows you to run tests on any physical device without requiring anything but the browser. Other pluses include writing tests in ES6/ES7, automatic waiting as well as the elegant and informative console reporter.

TestCafe - https://testcafe.devexpress.com/


CodeceptJS is multi-backend testing framework. It is nothing, but a wrapper that provides syntax to write tests that will run in one of the popular test runners. You can choose from the following options

  • WebDriverIO
  • Protractor
  • SeleniumWebDriverJS
  • NightMareJS
  • Appium
  • Others

The e2e scenarios written are almost kinda similar to how you write feature driven tests using Gherkin/Cucumber, so it becomes an excellent choice for BDD lovers.

CodeceptJS - http://codecept.io/


Another framework that can be used to write e2e tests - in fact it can also be used to write integration as well as unit tests for SPA.

CypressIO - https://www.cypress.io/

| improve this answer | |


module.exports = {
  'Demo test Google' : function (client) {
      .waitForElementVisible('body', 1000)

One option is nightwatch.js
One example is to have a single page object file in Nightwatch for each entire site.
For example, one site has about 200 lines of structure declaration and css selectors, and 200 lines for helper functions, e.g. login. There is plenty of "click this, wait for that to be visible, now click this, now wait for that to be invisible".nightwatch lets you see the entire journey and the building blocks that can be reused, all represented together in one place.

| improve this answer | |


If testing React, one option is to use Jest


const sum = require('./sum');

test('adds 1 + 2 to equal 3', () => {
  expect(sum(1, 2)).toBe(3);

Complete and easy to set-up JavaScript testing solution. Works out of the box for any React project.

Instant Feedback

Fast interactive watch mode runs only test files related to changed files and is optimized to give signal quickly.

Snapshot Testing

Capture snapshots of React trees or other serializable values to simplify testing and to analyze how state changes over time.

Zero configuration testing platform

Jest is used by Facebook to test all JavaScript code including React applications. One of Jest's philosophies is to provide an integrated "zero-configuration" experience.

However I'm not sure if Jest is suitable for end-to-end testing as opposed to unit testing javscript.

| improve this answer | |
  • I don't think so Jest is used for e2e testing for React applications. – demouser123 Jul 30 '17 at 9:49


Jasmine is certainly one option.
It has the 'describe it' syntax that will familiar to some from other BDD tools such as rspec for ruby.
It can be used in various ways and may be suitable for end user testing

| improve this answer | |



Use the "describe, it" syntax
Runs on node
Usually paired with Chai for the assertions (should, expect, etc).
Can use https://github.com/Automattic/expect.js for the 'expect' syntax


| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.