Skip to content

A cross platform UI crawler which scans view trees then generate and execute UI test cases. - Used for smoke testing under continuous integration

License

Notifications You must be signed in to change notification settings

butterflyingdog/NoSmoke

 
 

Repository files navigation

NoSmoke

NPM version build status Test coverage node version npm download

中文版


A cross platform UI crawler which scans view trees then generate and execute UI test cases. For full set of documentation, please refer to: wiki

1. Advantages of NoSmoke:

With it you can:

  • Automated UI test with simple configuration
  • More accurate than monkey test with view tree crawling
  • Multiple platforms iOS, Android and Web !! :]
  • Testing result visualisation via Macaca-Reporter

2. How it works?

In order to design a multiplatform UI automation tool, the overall architcture is devided into 3 different layers.

  • The Proxy layer, which are tester drivers wrapping local platform testing tool like UIAutomator, XCUITest. They establishes sockets which recieve and executes requests in format of web driver protocol.
  • The Macaca-Server layer, which are node server created on PC. It provides a set of cli-command based on which users can install the testing app and init the proxy on a specific device. Further it routes http request to proxies in various platforms.
  • The NoSmoke layer, it contains a node client which posting various crawling and analysis commands to Macaca-Server layer. The crawling algorithm in this module utilizes the node client to fetch window sources and convert it to a DFS tree model, then eventually send out a UI action to the target app via macaca-server and proxy.

3. Why the name?

Since all the good ones are taken, NoSmoke comes from the ideas across smoke testing, but smoke is not good for health ...

4. Features

4.1 Muliplatform

NoSmoke supports UI crawling and testing for iOS, Android and PC Web, macaca-reporter is used to gather and present the crawling process. During the execution of nosmoke, the current page and relevent action info will be revealed on reporter:

For Android

macaca-android

For iOS

macaca-ios

For PC-Web

web-pc

4.2 Configurable

Confirguration params and configuration templates for android/iOS/web demos templates list of configuration

4.3 Hooks

There are several hook API provided to provide further space to realize your own customization. hooks reference

5. Setup

5.1. Requirements:

  • iOS simulator 11.0 and xcode 9.0 and above.
  • Android 6.0 and above, supporting both device and simulator. For real device testing please install null-keyboard

Note You could also check environment by macaca doctor:

$ npm i macaca-cli -g
$ macaca doctor

5.2. Setup & Run:

Step 1. Setup:

Full list of dependencies:

$ npm i macaca-android -g
$ npm i macaca-ios -g
$ npm i macaca-cli -g
$ npm i macaca-electron -g

Install nosmoke in a single line:

$ npm i nosmoke -g
Step 2. Run it:

In your workspace directory, execute the following command

# initialize macaca server
macaca server --verbose &

# initialize nosmoke
nosmoke

Note: For full set of command please check: nosmoke --help
Note: Invoking nosmoke itself will simply run the default demo application. To run your own application, you should put -h (setup hooks ,optional) and -c (the path of the configuration file is a must) in order to run the crawler

Contributors


SamuelZhaoY


xudafeng


butterflyingdog

This project follows the git-contributor spec, auto upated at Thu Jun 14 2018 12:15:53 GMT+0800.

License

The MIT License (MIT)

About

A cross platform UI crawler which scans view trees then generate and execute UI test cases. - Used for smoke testing under continuous integration

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 99.9%
  • CSS 0.1%