Using the command line

uitest ships with a built-in command line parser , located in the bin/uitest; it exposes passed arguments as positional ones and named options

if you have not install uitest , please read installation

uitest native options

The uitest command has four available command:

init

  • -c, --colors:Use colors when reporting and printing logs.
  • -l, --log-level [level]:<disable | error | warn | info | debug> Level of logging.

Example:

$ uitest init -c
$ uitest init -l debug

run

  • -f, --file [file]: the test local or remote file you wanner run
  • -c, --html [file]: the html file you wanner run
  • r, --remote, run the tests by test center of taobao

Example:

$ uitest run -f test/go.js
$ uitest run --file test/go.js
$ uitest run -c http://demo.example.com/test.html
$ uitest run -r -f test/go.js

Note

-c, --html command you need to read run html

-r, --remote command requires a test server center (we call it utserver)

start

Start the server / do a single run

Example:

$ uitest start

Note

this command requires a test server center (we call it utserver)

plugin

Auto install browsers plugin

if it`s not work , you can install by yourself , the plugins path is:

  • Chrome plugin is under chrome store
  • Firefox plugin : {uitestDir}/plugin/firefox/uitest.xpi
  • IE plugin : {uitestDir/plugin/ie/setup/setup.bat}
  • Safari : {uitestDir/plugin/safari/uitest.safariextz}

Warning

  1. uitest not work well with Firefox.We are trying to reslove it.
  2. Only support mac safari , when you use uitest plugin to auto-install , the uitest.safariextz may be deleted by default...(Ah,suck it...)

Project Versions

Table Of Contents

Previous topic

Config

Next topic

API Documentation

This Page