GithubHelp home page GithubHelp logo

nw-testing-box's Introduction

nw-testing-box

A ready-to-go headless Ubuntu box for running NW.js unit and end-to-end tests via Xvfb.

Technologies

  • NW.js
  • Karma, Protractor, Jasmine
  • Gulp
  • Xvfb

Getting started

Install Vagrant & ansible.

  1. vagrant up to provision the box with the ansible playbook
  2. vagrant ssh to shell into the box
  3. cd /vagrant to enter the directory syncd to your host machine
  4. git clone https://github.com/mdb/nw-app-testing.git to clone an example app
  5. cd nw-app-testing
  6. npm install
  7. gulp test to run unit tests
  8. gulp e2e to run end-to-end tests

Bonus - debug from your Mac via VNC

The Vagrant box has no GUI, but your Mac does! Connect to the Vagrant box from your Mac via VNC to observe and debug.

Install & run x11vnc on the vagrant box

  1. vagrant ssh
  2. sudo apt-get install x11vnc
  3. x11vnc -display :0 &

Install and run Tiger VNC Viewer on your Mac

  1. brew install Caskroom/cask/tigervnc-viewer
  2. start Tiger VNC viewer on localhost:5901

Run the tests on the Vagrant box and watch from Tiger VNC Viewer.

Next Steps

Deploy to AWS? Digital Ocean? OpenStack?

nw-testing-box's People

Contributors

mdb avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar

nw-testing-box's Issues

Works like a charm

Hey Mike.

Just wanted to drop in and say I finally got around to making Cypress work in CI using xvfb. Taking from your templates / vagrant / ansible playbook I was able to get everything working with NW completely headlessly. Having this was immensely helpful.

Thanks.

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.