Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
bin
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Browser-Based Acceptance Testing with NodeJS

This sample project demonstrates how to use Express, WebdriverIO, Chrome, and Jest to write browser-based acceptance specs.

Steps:

  1. Drop in the acceptance_spec_helper module into your project located currently in the spec/acceptance directory
  2. Import it into each of the acceptance spec suites:
    import { setupEnvironment, browser, localUrl } from './acceptance_spec_helper'
  3. Before any test code such as a describe suite, add a call to the setupEnvironment function:
    setupEnvironment()
    
    // rest of the test suite
    It will set up all the before/after calls. When those are called during test execution it will start and stop the express server, chromedriver, and webdriverio. It'll also use the get-port library to parallelize the execution of acceptance specs if jest decides it is more efficient.
  4. Use the browser import and localUrl functions to drive the browser instance:
    await browser.url(localUrl())
    const result = await browser.getTitle()

About

A sample project for using NodeJS, WebdriverIO, Chromedriver to write browser based acceptance tests.

Resources

Releases

No releases published

Packages

No packages published
You can’t perform that action at this time.