Skip to content

Commit

Permalink
update readmes
Browse files Browse the repository at this point in the history
  • Loading branch information
shamanec committed Jun 25, 2024
1 parent 163ec01 commit 36bd35d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ Supports Linux, macOS and Windows - notes below
- Backend
- Serving the web interface
- Proxy the communication to the provider instances
- Experimental Appium grid replacement for Selenium Grid
- Integrated with UI to reserve devices currently running Appium tests

### Provider features
- Straightforward dependencies setup
Expand Down
8 changes: 8 additions & 0 deletions docs/hub.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ If you want to work on the React UI with hot reload you need to add a proxy in `
4. Run `npm start`

### Additional notes
#### Experimental Appium grid
Using Selenium Grid 4 is a bit of a hassle and some versions do not work properly with Appium relay nodes. For this reason I created an experimental grid implementation into the hub itself. I haven't even read the Selenium Grid implementation and made up something myself - it might not work properly but could be the better alternative if it does work properly. The experimental grid was tested only using latest Appium and Selenium Java client versions and with TestNG. Tests can be executed sequentially or in parallel using TestNG with `methods` or `classes` with multiple threads. I assume it should support any type of session creation with any Appium language client

* The grid is accessible on your hub instance e.g. `http://192.168.1.6:10000/grid` and should be used as Appium/Selenium driver URL target. You just try to start a session as you usually do with Selenium Grid
* The grid allows targeting devices by UDID
* The grid allows targeting devices by `platformName`(iOS or Android) or `appium:automationName`(XCUITest or UiAutomator2) capabilities during session creation
* Additionally the grid allows filtering by `appium:platformVersion` capability which supports exact version e.g. `17.5.1` or a major version e.g. `17`, `11` etc

#### Selenium Grid
Devices can be automatically connected to Selenium Grid 4 instance. You need to create the Selenium Grid hub instance yourself and then set it up in the provider configuration to connect to it.
* Start your Selenium hub instance, e.g. `java -jar selenium.jar --host 192.168.1.6 --port 4444`
Expand Down
7 changes: 3 additions & 4 deletions hub/router/appiumgrid.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@ import (
"bytes"
"encoding/json"
"fmt"
"github.com/Masterminds/semver"
"github.com/gin-gonic/gin"
"io"
"net/http"
"strings"
"sync"
"time"

"github.com/Masterminds/semver"
"github.com/gin-gonic/gin"
)

type Capabilities struct {
Expand Down Expand Up @@ -103,8 +104,6 @@ func AppiumGridMiddleware() gin.HandlerFunc {
return
}

//fmt.Printf(string(sessionRequestBody))

// Check for available device
var foundDevice *models.LocalHubDevice

Expand Down

0 comments on commit 36bd35d

Please sign in to comment.