diff --git a/LICENSE b/LICENSE index f29d036..9c1e9c9 100644 --- a/LICENSE +++ b/LICENSE @@ -374,7 +374,7 @@ Apache License same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2016+ Alexander Andryashin and collaborators + Copyright 2016+ Aerokube LLC Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/README.md b/README.md index b046124..a840d8c 100644 --- a/README.md +++ b/README.md @@ -118,6 +118,48 @@ See the full history in our article - **Selenium testing: a new hope**: * [Part 1](https://hackernoon.com/selenium-testing-a-new-hope-7fa87a501ee9) * [Part 2](https://hackernoon.com/selenium-testing-a-new-hope-a00649cdb100) +## Log Files +A typical log file looks like the following: +``` +2017/04/18 03:52:36 [12413389] [SESSION_ATTEMPTED] [my_quota] [192.168.2.3] [firefox-42.0] [firefox42-1.example.com:4444] [1] +2017/04/18 03:52:40 [12413389] [SESSION_FAILED] [my_quota] [192.168.2.3] [firefox-42.0] [firefox42-1.example.com:4444] Error forwarding the new session Request timed out waiting for a node to become available. +2017/04/18 03:52:40 [12413390] [SESSION_ATTEMPTED] [my_quota] [192.168.2.3] [firefox-42.0] [firefox42-5.example.com:4444] [2] +2017/04/18 03:52:45 [12413390] [5.86s] [SESSION_CREATED] [my_quota] [192.168.2.3] [firefox-42.0] [firefox42-5.example.com:4444] [0c500a6f-98d2-4871-acb7-637d85e1416a] [2] +.... +2017/04/18 03:53:05 [SESSION_DELETED] [192.168.2.3] [firefox42-5.example.com:4444] [0c500a6f-98d2-4871-acb7-637d85e1416a] +``` +Every line contains: + +| Field | Example | Notes | +| ----- | ------- | ----- | +| Time | 2017/04/18 03:52:36 | - | +| Request counter | [12413389] | Only present for new session requests. So far as session ID is unknown when doing attempts this counter is used to find all session attempts for each new session request. | +| Status | [SESSION_ATTEMPTED] | See table below for complete list of statuses. | +| Quota name | [my_quota] | Extracted from basic HTTP auth headers. | +| User IP | [192.168.2.3] | IPv4 or IPv6 address | +| Browser | [firefox-42.0] | Name and version. Only present for new session requests. | +| Hub host | [firefox42-1.example.com:4444] | Host from quota XML file | +| Attempt number | [1] | For SESSION_ATTEMPTED entries means current attempt number. For SESSION_CREATED entries means total number of attempts to create this session. | +| Session ID | [0c500a6f-98d2-4871-acb7-637d85e1416a] | As arrived from hub | +| Session start time | [5.86s] | - | +| Error | Error forwarding the new session Request timed out waiting for a node to become available. | Only present for SESSION_FAILED | + +The following statuses are available: + +| Status | Description | +| ------ | ----------- | +| BAD_JSON | User request does not contain valid Selenium data | +| BROWSER_NOT_SET | Browser name is not present or empty string | +| CLIENT_DISCONNECTED | User disconnected and doing session attempts was interrupted | +| INVALID_URL | Session ID does not contain information about host where it was created | +| ROUTE_NOT_FOUND | Trying to proxy session to unknown host. Usually means quota files inconsistency between multiple Ggr instances. | +| SESSION_ATTEMPTED | New user request for session arrived | +| SESSION_CREATED | A new session was created and returned to user | +| SESSION_DELETED | Existing session was deleted by user request | +| SESSION_FAILED | Session attempt on specified host failed | +| SESSION_NOT_CREATED | Attempts to create a new session on all hosts failed. An error was returned to user. | +| UNSUPPORTED_BROWSER | Requested browser name and version is not present in quota | + ## Development To build Ggr: