- Print
- DarkLight
Autify Connect Tips and Common Errors
I am not able to use Autify Connect to test websites running on localhost
localhost tests will not work correctly if the target URL of the scenario links directly to a local host or local network, such as http://localhost
and http://127.0.0.1
.
Instead, please use one of the following methods to run tests:
Use
localhost.autify.com
.We have an FQDN pointing to
127.0.0.1
. You can use this FQDN instead oflocalhost
or127.0.0.1
.If you have already recorded a test scenario with a hostname such as
localhost
, you can use the URL Replacement feature in the test plan.Use another IP address, such as
192.168.86.92
.Edit the
hosts
file and set an application alias as follows:127.0.0.1 local.your-application.com ::1 local.your-application.com
The
hosts
file is usually located at the following path:OS Path Linux, macOS /etc/hosts Windows c:\Windows\System32\Drivers\etc\hosts
Note that the following hostnames are not supported (this is not an exhaustive list).
localhost
*.localhost
[::1]
127.0.0.1/8
169.254/16
[FE80::]/10
If you record a scenario using these hostnames, you will need to implement one of the methods described above.
Tests using Windows OS, for example, will also recognize loopback
I get a “ERR_SSL_PROTOCOL_ERROR” error when executing a test against a website that uses a HTTPS scheme
Try to use 443 for the port of the application under test (e.g https://local.autify.com:443), or use http instead of https.
Why did my test fail with an error of “The site can’t be reached” ERR_TUNNEL_CONNECTION_FAILED. “
This error can be caused by a number of reasons listed below:
- Poor network performance in the environment (this is the most frequent cause of this error)
- The Autify Connect client was shut down during test execution
- Poor application performance under high traffic (e.g. when running lots of test scenarios to a localhost application with ~10 parallel)
- The Autify Connect server has a problem and isn’t able to handle test connections.
How to write logs in JSON format
To help troubleshoot an issue, our Customer Support team will sometimes request Autify Connect client logs in JSON format.
To do so, run autifyconnect
with the --log-format=json
option.
$ autifyconnect --log-format=json
{
"level": "info",
"ts": "2022-09-07T19:56:07.862+0900",
"msg": "Starting to establish a secure connection with the Autify connect server. Your session ID is \"{sessionID}\"."
}
More details about log levels are provided in the log level section below
How to save Autify Connect client logs
Linux / macOS / Windows Powershell users
The built-in tee
command can be ussed to write Autify Connect logs to a file as follows:
autifyconnect -V --log-format=json | tee your-log-filename.log
Log level
The level
field represents the log level. There are four log levels.
Log level | Description |
---|---|
error | Application error. Something is wrong with the Autify Connect client. |
warn | Warning logs when there is something notable to know clues of failures. For instance, if the destination is not accessible from your Autify Connect client, the client will log a warn level message. |
info | Used for normal events, such as establishing a connection with the Autify Connect server. |
debug | Debug information that is written only when the Autify Connect client launches with the —-verbose option. It includes all transferred messages over the secure connection between the Autify Connect client and the Autify Connect server. |
How to continously check the status of the Autify Connect client's connection
To continuously verify that autifyconnect
is connected to the Autify Connect server and ready to use for test executions, use the --debug-server-port
option that was added in v0.5.8 (see Autify Connect client Release Notes (autifyconnect command) for more details).
Using this option, a server for debugging and monitoring launches on your local machine on the specified port.
For example, the command below runs the autifyconnect
application which serves the debug server endpoint on port 9191.
$ autifyconnect --debug-server-port 9191
Once the debug server is running, the status of the Autify Connect client can be checked using the /status
endpoint. When the Autify Connect client is ready, the response after checking that endpoint will be like this:
$ curl http://localhost:9191/status
{
"status": "ready",
"message": "(description)..."
}
For more detailed information about other statuses and their meaning, please refer to the table below:
Status | Description |
---|---|
Ready | The Autify Connect client is connected to the Autify Connect server and is ready to use for test executions. |
Starting | The Autify Connect client is starting but has not successfully connected to the Autify Connect server yet. |
Reconnecting | The Autify Connect client is disconnected from the Autify Connect server and is trying to reconnect. |