Status | ||||
---|---|---|---|---|
|
...
The file $HOME/.greenspector/config.yml should now exists.
In case you are behind a proxy, set the proxyUrl
property simply by using the commandTo check your configuration, type:
Code Block | ||
---|---|---|
| ||
gspt set-proxy
or
gspt set-proxy --proxyUrl <proxyUrl> |
If you want more details on this option, you can run the command:
Code Block | ||
---|---|---|
| ||
gspt set-proxy -h |
To check your configuration, type:
Code Block | ||
---|---|---|
| ||
gspt ping |
...
ping |
This command will tell you whether your basic configuration and credentials are correct or not. If correct, you should have the message "Server pinged with success".
Optional proxy configuration
If previous gspt ping does not work in your work office, you probably need to configure a proxy to allow the CLI to access Internet.
You can check if you need to configure a proxy. Use a 4G mobile network for your PC and try to use the CLI. If it works, you need to configure a proxy.
Set the proxyUrl
property simply by using the command:
Code Block | ||
---|---|---|
| ||
gspt set-proxy
or
gspt set-proxy --proxyUrl <proxyUrl> |
If you want more details on this option, you can run the command:
Code Block | ||
---|---|---|
| ||
gspt set-proxy -h |
Example for proxy without authentication:
Code Block | ||
---|---|---|
| ||
gspt set-proxy --proxyUrl "http://testproxy.local:3112/" |
Example for proxy with authentication:
Code Block | ||
---|---|---|
| ||
gspt set-proxy --proxyUrl "http://myuser:mypassword%241%2C%21@testproxy.local:3112/" |
Using --proxyUrl, If you have password with specials characters, you need to encode the password to use as url. You can use this https://smalldev.tools/url-encoder-online
For example, the password mypassword$1,! devient mypassword%241%2C%21
Example for proxy with authentification with interactive mode:
Code Block | ||
---|---|---|
| ||
gspt set-proxy
Enter the Proxy Protocol (http or https)
Proxy Protocol:
http
Enter the Proxy Host
Proxy Host:
testproxy.local
Enter the Proxy Port
Proxy Port:
3112
Is this proxy authenticated? (y/N)
y
Enter the Proxy Username:
myuser
Enter the Proxy Password:
mypassword$1,!
|
You do not need to encode password in this interactive mode
To check your configuration, type:
Code Block | ||
---|---|---|
| ||
gspt ping |
This command will tell you whether your basic configuration and credentials are correct or not. If correct, you should have the message "Server pinged with success".
you can get these errors if you misconfigured your proxy:
Error | Cause |
---|---|
Error: Get "https://app.greenspector.com/api/ping": proxyconnect tcp: dial tcp 192.168.10.1:3120: connect: connection refused | Bad port |
Error: Get "https://app.greenspector.com/api/ping": Proxy Authentication Required | Bad user or password |
Get "https://app.greenspector.com/api/ping": proxyconnect tcp: dial tcp 149.202.59.166:3129: i/o timeout | Bad Host |
Error: parse "http://myuser:mypassword": invalid port ":mypassword" after host | Need to encode password |
Current working folder configuration in $CURRENT_FOLDER/.greenspector/config.yml
...
7 - --extra:
Use to transmit extras parameters to your instrumentation with the format name=value (ie --extra annotation=com.greenspector.demo.test.MyAnnotation add the following parameters to your instrumentation -e annotation com.greenspector.demo.test.MyAnnotation). Thus you can filter your tests for example using those extras parameters : https://developer.android.com/reference/android/support/test/runner/AndroidJUnitRunner). It can also be used to fill parameters on GDSL file. (exemple --extra PARAMETERNAME="value" will replace all ${PARAMETERNAME} in the GDSL file by value). Optional
8 - --networkMode: The network mode for the test. Values can be "WIFI", "4G", "3G" or "2G". (Default: WIFI). Optional
9 - --
disable-dumpsys: Disable Android System Monitoring. By default, this is enabled and will add one iteration to your job for more detailed metrics (Views, Activity, OpenSSL Sockets, ...). If you don't need these metrics, you can disable this iteration, it will reduce testing time.
10 - --
only-dumpsys: Run only a Android System Monitoring iteration. This iteration will only be able to retrieve Android System metrics (Views, Activity, OpenSSL Sockets, ...).
Some options are deprecated:
...