Skip to content
This repository has been archived by the owner on Dec 17, 2024. It is now read-only.

Commit

Permalink
Merge pull request #53 from vania-pooh/master
Browse files Browse the repository at this point in the history
Added logfile format documentation (fixes #50)
  • Loading branch information
robot-bucket authored Apr 18, 2017
2 parents fad7b9b + 8d36ccd commit b10a373
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 1 deletion.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
42 changes: 42 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down

0 comments on commit b10a373

Please sign in to comment.