GithubHelp home page GithubHelp logo

javascript-forks / yguan.mocha_webdriver_tests Goto Github PK

View Code? Open in Web Editor NEW

This project forked from yguan/mocha_webdriver_tests

0.0 2.0 0.0 268 KB

Functional Testing with mocha and webdriverjs

License: MIT License

yguan.mocha_webdriver_tests's Introduction

UI functional testing with mocha and webdriverjs

This repository contains skeleton example on how to use mocha and webdriverjs to write UI functional tests. Tests are written with mocha, and webdriverjs is used to inject the mocha tests to the page.

Installation

Prerequisites

  • node.js
  • grunt.js (run npm install -g grunt to install it)
  • have firefox installed
  • have java installed (and added to the PATH for Windows)

Steps

  1. Open your bash console. If use windows cmd, make sure to change the path in grunt.js.
  2. Navigate to the root folder, and then run npm install.
  3. Download Selenium server and put in C:/Utilities/selenium/selenium-server-standalone-2.28.0.jar.

Running the tests with grunt

In the root folder, run the following grunt commands sequentially in separate console window. Run grunt.cmd for Window cmd.

  1. grunt startTestServer
  2. grunt startSeleniumServer
  3. grunt runTests

After running step 3, webdriver will open jquery.com and inject the mocha test to the page, and you should be able to see the test result at the bottom of the page.

If the test doesn't show up the browser, clear the cache of the browser, and then re-step 3 should fix it.

yguan.mocha_webdriver_tests's People

Contributors

yguan avatar

Watchers

James Cloos avatar Brenton House avatar

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.