An open API service indexing awesome lists of open source software.

https://github.com/commercetest/selenium-for-galene

Spike to explore using Selenium to test Galene
https://github.com/commercetest/selenium-for-galene

galene selenium selenium-webdriver

Last synced: 2 months ago
JSON representation

Spike to explore using Selenium to test Galene

Awesome Lists containing this project

README

        

# A Spike for testing Galene using Selenium

Galene currently does not have any browser-based automated tests. This project is a Spike (an experiment) to explore the feasibility and utility for creating various browser-based tests for testing the browser-based functionality of Galene. If it's sufficiently useful it might be integrated into Galene, for now though it's standalone to keep that codebase clear of these experiments.

## Expectations include
This code has various expectations, including the following list of software to be installed and available locally

- and
- will be run locally with a self-signed certificate for SSL connections. This necessitates allowing these certificates in the tests, described in the firefox docs and here implemented in Go.
- which may already be installed in some operating systems such as Ubuntu when Firefox is installed.
- Selenium Standalone server . Download the current release of Selenium Grid and run it locally using java.

## Usage example
Note: this is experimental and subject to breaking changes

Start Selenium Grid in standalone mode
```
java -jar selenium-server-4.26.0.jar standalone
```
Run the automated tests locally once Galene has been started
```
go test -v
```
A firefox instance should start and run briefly and the program should then complete after outputting something similar to:
```
=== RUN TestBrowserUsingSelenium
--- PASS: TestBrowserUsingSelenium (6.03s)
PASS
ok webservertest.com/myserver 6.037s
```

## Further reading
There's a helpful worked step-by-step example of using Selenium in Golang at