ProductPromotion
Logo

Java.Script

made by https://0x3d.site

GitHub - totorojs/totoro: A simple and stable cross-browser testing tool. 简单稳定的跨浏览器测试工具。
A simple and stable cross-browser testing tool. 简单稳定的跨浏览器测试工具。 - totorojs/totoro
Visit Site

GitHub - totorojs/totoro: A simple and stable cross-browser testing tool. 简单稳定的跨浏览器测试工具。

GitHub - totorojs/totoro: A simple and stable cross-browser testing tool. 简单稳定的跨浏览器测试工具。

totoro

totoro

A simple and stable cross-browser testing tool.

Latest stable version: v2.0 Change Log

中文版使用文档


0. Features

  • Run in real browsers
  • Support all test frameworks
  • Auto testing coverage
  • Robust enough for actual combat

1. Installation

Node requirement

>= 0.10.12

Install from npm

$ npm install totoro -g

If it not works, you may add sudo before the command, as follows.

Install from github

To get the latest function (may not be stable)

$ git clone https://github.com/totorojs/totoro && cd totoro
$ npm install -g

2. Quick Start

For simplicity, we have already prepared an example for you:

Important: please specify a server first !

$ totoro config --host={{totoroServerHost}}

For now the default test server is internal for Alibaba group only, you can launch your own server.

We are planning to supply a public service, hmm...

$ git clone https://github.com/totorojs/totoro && cd totoro/examples/simple
$ totoro

Then you should see a output as shown below:

totoro-result

  • If all test cases passed, will report in green color, or will report in red color with detailed error message.
  • Every browser supplies it's own run time and testing coverage (if your test has source code, and totoro can recognize).

Recommended directory structure

Generally, if your test is a local file and the directory structure of your project is as bellow, you can run totoro without any config.

project-dir/
  dist/
  src/ or lib/
  tests/ or test/
    runner.html or index.html

3. Cli Options

All options are optional.

3.1 totoro

-R, --runner

Test runner. Accept local file and URL.

Default: auto search in the CWD, runner.html or index.html in subdirectory test/ or tests/ could be recognized.

-C, --code

A convenient way to debug. Accept single JS expression, local file or URL. totoro will return the calculated value of expression or all output of console.log() in JS file. For example:

$ totoro --code document.body
$ totoro --code "console.log(document.body)"
$ totoro --code examples/code/code.js  // this file already exists, try it!

Be mind that --code and --runner are mutually exclusive!

-l, --labors

Specify a comman-delimited list of app names, typically be browsers. For example:

chrome,firefox,safari,ie  //just specify browser names
ie/6,ie/7,ie/8,ie/9  //specify browser names and versions

Default: all available desktop browsers.

-a, --adapter

Test framework's adapter, used to send report to server. Accept built-in keywords, local file and URL.

Built-in keywords: mocha, jasmine.

If specifies no, totoro won't try to detect and insert any adapter, it's thought that user handle it by themself.

It is very easy to write an adapter for custom test framework, you could refer to static/adapters/mocha.js.

Default: if --runner is local file, totoro will see if there is totoro-adapter.js in the same directory , if not found or --runner is URL, totoro-server will try to find out matched keyword according to --runner content.

-c, --charset

Specifies charset.

Default: 'utf8'

-t, --timeout

Specifies the client timeout in minutes.

Default: 5

-O, --root

If assign a local file to --runner, totoro need to launch a temporary HTTP server for testing, --root is the root of this server.

See more detail

Default: if necessary, guess a path according to --runner and --adapter.

-H, --host

totoro-server host.

Default: internal server host for Alibaba group.

-P, --port

totoro-server port.

Default: 9999

--no-proxy

Won't convert the runner if it is a URL

Default: false

--no-coverage

No need testing coverage.

Default: false

3.2 totoro list

Show all available browsers of specified server.

totoro list

3.3 totoro config

Read or write global config.

Read global config

$ totoro config

Write global config

$ totoro config --host=10.15.52.87 --port=''

Above command clear the --port value.

4. Config File

If you need a config file, just place totoro-config.json in the CWD.

The priority level of all config ways are: command line > config file > totoro config > default config

Below is an example for config file:

{
  "browsers": ["chrome", "ie/10.0"],
  "host": "127.0.0.1",
  "port": 9999
}

5. About

totoro takes it's name from animated fantasy film "My Neighbor Totoro" directed by Hayao Miyazaki.

More Resources
to explore the angular.

mail [email protected] to add your project or resources here 🔥.

Related Articles
to learn about angular.

FAQ's
to learn more about Angular JS.

mail [email protected] to add more queries here 🔍.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory