PHPackages                             initbiz/selenium2tests-plugin - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. initbiz/selenium2tests-plugin

ActiveOctober-plugin

initbiz/selenium2tests-plugin
=============================

Write tests in OctoberCMS using Selenium 2

243PHP

Since Jan 21Pushed 2y ago1 watchersCompare

[ Source](https://github.com/initbiz/selenium2tests-plugin)[ Packagist](https://packagist.org/packages/initbiz/selenium2tests-plugin)[ RSS](/packages/initbiz-selenium2tests-plugin/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependenciesVersions (2)Used By (0)

Selenium 2 Tests - Write tests using Selenium 2 with Dusk support
=================================================================

[](#selenium-2-tests---write-tests-using-selenium-2-with-dusk-support)

[![Selenium 2 Tests banner](https://raw.githubusercontent.com/initbiz/selenium2tests-plugin/master/docs/selenium-2-tests.png)](https://raw.githubusercontent.com/initbiz/selenium2tests-plugin/master/docs/selenium-2-tests.png)

This is a repo of OctoberCMS plugin by [InIT.biz](https://init.biz).

How-to
------

[](#how-to)

### System requirements

[](#system-requirements)

1. Java 8 installed in default location of your platform (for example `/usr/bin/java` for Linux)
2. The driver of the browser you want to use for tests (for example [ChromeDriver](http://chromedriver.chromium.org/getting-started))

> **Note for Linux users**
>
> Installing Chromium from your package manager should install ChromeDriver for you

> **Note for Mac users**
>
> You probably will have to link newer version of Java to your default path as described [here](https://stackoverflow.com/a/14875241)

### Installation

[](#installation)

1. You can use three methods to install the plugin:
2. from [OctoberCMS Marketplace](https://octobercms.com/plugin/initbiz-selenium2tests),
3. clone the code from GitHub into `/plugins/initbiz/selenium2tests` directory or
4. install using Composer `composer require --dev initbiz/oc-selenium2tests-plugin`
5. Add `"laravel/dusk": "^2.0"` to your `require-dev` section in `composer.json` file
6. Go to `/plugins/initbiz/selenium2tests`
7. Copy `selenium.php.example` to `selenium.php` and configure your environment

**You can also create `selenium.php` file in your root directory, which will be read when the one in plugin's directory does not exist**

### Testing OctoberCMS basics

[](#testing-octobercms-basics)

It is a good practice not to use the same DB for testing and developing purposes.

In order to configure a different database for testing purposes create directory `testing` in `config` directory and copy `database.php` to the newly-created directory. Then change the default connection as you wish.

After that, if you use `APP_ENV=testing` in your `.env` file, configuration from the `testing` directory will be used.

Writing tests in Selenium 2
---------------------------

[](#writing-tests-in-selenium-2)

There are example tests in `tests/example` directory that use `Ui2TestCase` class.

Running tests
-------------

[](#running-tests)

First of all, you have to run the Selenium 2 standalone server which is included in the package. In order to start Selenium 2 server go to `/plugins/initbiz/selenium2tests` and run `java -jar selenium.jar`.

You are ready to run tests using PHPUnit from OctoberCMS's `vendor/bin/phpunit`.

You can keep test files wherever you want, but `.gitignore` of the plugin will exclude all files from `/tests` except those in `/tests/examples`.

### Browser options (like headless mode)

[](#browser-options-like-headless-mode)

If you want to for example run browser in headless mode, you can add that line to your `selenium.php` file:

```
define('TEST_SELENIUM_BROWSER_OPTIONS', ['--headless']);

```

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity33

Early-stage or recently created project

 Bus Factor1

Top contributor holds 96.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/16684450?v=4)[inIT](/maintainers/initbiz)[@initbiz](https://github.com/initbiz)

---

Top Contributors

[![tomaszstrojny](https://avatars.githubusercontent.com/u/8854428?v=4)](https://github.com/tomaszstrojny "tomaszstrojny (79 commits)")[![alxy](https://avatars.githubusercontent.com/u/2057062?v=4)](https://github.com/alxy "alxy (1 commits)")[![Drumbeldore](https://avatars.githubusercontent.com/u/25252969?v=4)](https://github.com/Drumbeldore "Drumbeldore (1 commits)")[![dzapek](https://avatars.githubusercontent.com/u/54842490?v=4)](https://github.com/dzapek "dzapek (1 commits)")

### Embed Badge

![Health badge](/badges/initbiz-selenium2tests-plugin/health.svg)

```
[![Health](https://phpackages.com/badges/initbiz-selenium2tests-plugin/health.svg)](https://phpackages.com/packages/initbiz-selenium2tests-plugin)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
