-
Notifications
You must be signed in to change notification settings - Fork 58
setup
- 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
npm i macaca-android -g
npm i macaca-ios -g
npm i macaca-cli -g
npm i macaca-electron -g
Method 1: install the nosmoke command line from npmjs
npm i nosmoke -g
Open the terminal and initialize macaca server macaca server --verbose
then in your workspace directory, execute the following command
nosmoke -h path-of-your-hook.js -c path-of-your-config.yml
For full set of command please check:
nosmoke --help
Usage: nosmoke [options]
Options:
-p, --port <d> port to use (5678 default)
-u, --udid <s> udid of device
-h, --hooks <s> location of the hook.js file
-c, --config <s> location of the configuration file
-s, --silent start without opening browser
--verbose show more debugging information
-v, --versions output version infomation
-h, --help output usage information
Method 2: install via clone from git
git clone [email protected]:macacajs/NoSmoke.git
Open the terminal and initialize macaca server macaca server --verbose
then run the following under the nosmoke root dir:
node bin/nosmoke -h path-of-your-hook.js -c path-of-your-config.yml
Note: -h is optional and -c (the path of the configuration file is a must) in order to run the crawler
Method 3: Supporting Docker as well:
docker run --privileged -v nosmoke-reporter:/root/reports --name nosmoke-1 -p 5037:5037 -it zhaoysamuel/nosmoke-android:1.0.0
Note: for docker mode, you need to connect your device and grant the adb access writes to the docker env, otherwise the following error will occur:
Error: Command failed: /opt/android-sdk-linux/platform-tools/adb -s 4fea3345 forward tcp:9001 tcp:9001
error: device unauthorized.
This adb server's $ADB_VENDOR_KEYS is not set
Try 'adb kill-server' if that seems wrong.
Otherwise check for a confirmation dialog on your device.
When the npm program starts to execute and browser will automatically open the reporter-monitor, it may take several seconds for the program to start simulator. Once the testing target app installed, the crawler program will start execution and reporter's content will be updated.
If there is an error:
Please kindly drop an issue