node.js - What is the difference between mocha and Selenium? -


i started using node.js , looking testing framework.

i found :

  • mocha
  • selenium

i understand mocha 1 write tests in js while selenium, 1 has write tests lower level languages c#.

apart there selenium can mocha can't?

what use mocha have itself?

mocha , selenium both deal testing software solve different problems.

mocha test running framework. tell mocha tests have , tests want run , mocha run tests , report passed , failed. mocha provides test running framework. you'll typically want use assertion library it, chai. have test suites libraries providing testing support mocha chai. viable use-case.

selenium library controlling browsers. major part of scope testing browser-based software. however, can used scraping web sites. selenium can mocha cannot do, itself. conversely selenium not test running framework. selenium has no facilities dedicated delimiting tests , running specific tests. have rely on test running framework mocha delimit 1 test another.

if want write test suite tests browser-based application use mocha selenium. or jasmine (another test running framework) selenium. or use behave (a python based test runner) selenium. or use mocha other library controls browsers.

this specific question needs special treatment:

i understand mocha 1 write tests in js while selenium, 1 has write tests lower level languages c#.

i not call c# lower-level language. @ rate, using mocha you'd have use javascript. (there's testing library ruby named "mocha" not ruby version of javascript one. i'm assuming talking javascript one, makes response tautological here are.) can use selenium javascript, python, c#, java , bunch of other languages.


Comments

Popular posts from this blog

PHPMotion implementation - URL based videos (Hosted on separate location) -

javascript - Using Windows Media Player as video fallback for video tag -

c# - Unity IoC Lifetime per HttpRequest for UserStore -