FrontEnd Testing Framework

***NOTE: This project is under maintenance mode and is not actively worked upon. We will only work on severe issues/bugs,if and when needed. Please feel free to fork it if you want to add a feature or make any enhancement.



Arrow is a test framework designed to promote test-driven JavaScript development. Arrow provides a consistent test creation and execution environment for both Developers and Quality Engineers.

Arrow aims to completely remove the line between development’s Unit tests, and Functional and Integration tests by providing a uniform way to create and execute both.

Arrow itself is a thin, extensible layer that marries JavaScript, NodeJS and Selenium. Arrow allows you to write tests using YUI-Test and execute those tests using NodeJS or Selenium. Additionally, Arrow provides a rich mechanism for building, organizing and executing test and test scenarios.


npm install -g yahoo-arrow


  • --helpdisplay this help page

  • --versiondisplay installed arrow version

  • --libcomma separated list of js files needed by the test

  • --pagepath to the mock or production html page, for example: mock.html

  • --driverone of selenium|nodejs. (default: selenium)

  • --shareLibPathcomma separated list of directories to be scaned to load module automatically

  • --browserfirefox|chrome|opera|reuse. Specify browser version with a hypen, ex.: firefox-4.0 or opera-11.0 (default: firefox)

  • --reporttrue/false. Creates report files in junit and json format, and also prints a consolidated test report summary on console

  • --reportFolder: (optional) folderPath. creates report files under {folderPath}/arrow-report. (default: arrow-target/arrow-report under current directory)

  • --testNamecomma separated list of test names defined in test descriptor. all other tests will be ignored

  • --groupcomma separated list of groups defined in test descriptor, all other groups will be ignored


  • --dimensiona custom dimension file for defining ycb contexts

  • --contextname of ycb context

  • --seleniumHost: (optional) override selenium host url (example: --seleniumHost=

  • --capabilities: (optional) the name of a json file containing webdriver capabilities required by your project

  • --startProxyServer: (optional) true/false. Starts a proxy server, intercepting all selenium browser calls

  • --routerProxyConfig: (optional) filePath. Expects a Json file, allows users to modify host and headers for all calls being made by browser. Also supports recording of select url calls ( if you mark "record" : true), and also supports recording the body of POST request (if you mark "storeBody": true), the default limit size of post body is 10240 bytes, you can change it by assigning "sizeLimit" : {integer in byte}.

    Example Json :
                         "storeBody" : true,
                         "sizeLimit": 4096,
                              "": {
                                   "newHost": "x.x.x.x (your new host ip/name)",
                                     "param": "<param>",
                                     "value": "<val>"
                              "record": true
                             "": {
                                   "newHost": "x.x.x.x (your new host ip/name)",
                                     "param": "<param>",
                                     "value": "<val>"
                             "record": true
                             "clientSideCoverage": true,
                             "coverageExclude": []
  • --exitCode: (optional) true/false. Causes the exit code to be non-zero if any tests fail (default: false)

  • --coverage: (optional) true/false. creates code-coverage report for all js files included/loaded by arrow (default: false)

  • --replaceParamJSON: (optional) Either .json file or json object to be replaced with its value in descriptor file

  • --defaultParamJSON: (optional) Either .json file or json object. If parameters to be replaced are not found via replaceParamJSON ,it falls back to the parameters specified in defaultParamJSON


Below are some examples to help you get started.

###Unit test:

arrow --lib=../src/greeter.js test-unit.js

###Unit test with a mock page:

arrow --page=testMock.html --lib=./test-lib.js test-unit.js

###Unit test with --shareLibPath to replace --lib: Please note that the folder passed to --shareLibPath need follow layout convention as described in arrow cookbook "Arrow In-Depth"

arrow --page=testMock.html --shareLibPath=../ test-unit.js

###Unit test with selenium:

arrow --page=testMock.html --lib=./test-lib.js --driver=selenium test-unit.js

###Integration test:

arrow --page= --lib=./test-lib.js test-int.js

###Integration test:

arrow --page= --lib=./test-lib.js --driver=selenium test-int.js

###Custom controller:

arrow --controller=custom-controller.js --driver=selenium

##Arrow Dependencies

NPM Dependencies

NPM Dev Dependencies

Apart from above mentioned npm modules, Arrow also relies on these two projects



上一篇:「前端发动机」深入 React hooks — 3 分钟搞定 useState


  • 场景化低代码搭建工作台-sparrowjs

    背景 在近两年to B升温、前端资源紧缺的背景下,中后台研发效率提升成为各公司技术部门需要突破的重点技术方向。研发效率提升大致分为以下3类产物: (/public/upload/1f42a082...

    10 天前
  • 场景化低代码搭建工作台-sparrowjs

    背景 在近两年to B升温、前端资源紧缺的背景下,中后台研发效率提升成为各公司技术部门需要突破的重点技术方向。研发效率提升大致分为以下3类产物: (/public/upload/c0caaad2...

    3 天前
  • typographic-arrows

    Micro module for real arrows typographicarrows Build Statustravisimagetravisurl Use real arrows,...

    9 个月前
  • react-arrow-nav

    ArrowKey Navigation for react elements React Keyboard Navigation A simple react component to enab...

    23 天前
  • no-arrowception

    ESLint rule preventing arrow functions that implicitly create arrow functions noarrowception Curr...

    1 年前
  • narrow

    Library shrinks a given callback parallel execution concurrency in a limited number of threads, rece...

    2 个月前
  • make-arrow-function

    Function that returns an arbitrary arrow function, or undefined if arrow function syntax is unsuppor...

    2 年前
  • is-arrow-function

    Determine if a function is an ES6 arrow function or not. isarrowfunction Version Badgenpmversionsvg...

    1 年前
  • how to use an arrow marker on an svg <line> element?

    Erik DahlströmCristian G(提出了一个问题:how to us...

    2 年前
  • eslint-plugin-prefer-arrow

    Prefer arrow functions in most cases eslintpluginpreferarrow ESLint plugin to prefer arrow functio...

    3 个月前


扫码加入 JavaScript 社区