Skip to content

mrt123/mochanium

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mochanium

Recommended System Configuration

node v6.4.0

Setup

    git clone https://github.com/mrt123/mochanium.git
    cd mochanium
    $ npm install

Run

    $ npm test

PATTERN CONVENTION

General Purpose

  • Operator - encapsulates user interactions, aids user logic when evaluating DOM
  • Views - concerned with reliable DOM querying
  • Mappings - help maintain DOM hooks in a large application over time

In test block

  • Use Operator to encapsulate user interaction eg operator.doSomething();
  • Use Operator to aid user logic on evaluating DOM eg assert.equal(operator.isPurchaseComplete(), true);
  • Use View to fetch DOM for simple assertion eg view.getEl.getText().then(...assert...);
  • Use View to hide DOM querying, eg operator.results.getNth(5).then(...assert...);
  • Do not use Mappings

Avoid

  • Bloating operators with DOM evaluating logic that is likely never appear in other test flows. Instead contain logic in test block.

IDE CONFIG

WebStorm

  • switch to ES6
  • for auto-complete add these libraries ** 'Node Core Modules' ** create : 'selenium-webdriver' : add folder 'node_modules/selenium-webdriver/lib'
  • for Debug : ** ensure your run configuration: *** runs from root of this repo node start *** has correct node interpreter setup (eg: if you're using NVM: /Users/username/.nvm/versions/node/vX.X.X/bin/node)

Documentation

Side Notes

  • WebDriverIO is a good candidate to run test synchronously via its test runner, however is completly redundant, considering WebdriverJs asynch tasks are coordinated with Control Flow. And also:

** works only on select undocumented selenium servers : example ** supports only a sub-set of WebDriver API ** compatibility with specific Node version is undocumented ** requiresJava Selenium Server downloaded and started separately ** website with guide is not kept up to date, and differs with gitHub readme

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published