A great way of quickly testing your web applications inside October.
This plugin allows you to author functional tests using the playback tool built into Selenium’s portable framework without the need to learn a test scripting language. Write your tests in PHP, Python, Ruby and more.
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
composer require --dev initbiz/oc-selenium2tests-plugin
"laravel/dusk": "^2.0"to your
selenium.phpand 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
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
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.
There are example tests in
tests/example directory that use
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
<project_root>/plugins/initbiz/selenium2tests and run
java -jar selenium.jar.
You are ready to run tests using PHPUnit from OctoberCMS's
You can keep test files wherever you want, but
.gitignore of the plugin will exclude all files from
/tests except those in
If you want to for example run browser in headless mode, you can add that line to your
inIT has been consistently providing a discreet and professional development service for October CMS users since 2015. We have successfully played major and minor development roles in over 100 October based projects supporting and partnering with clients around the world.
Why not make us a part of your next October development crew.
inIT.biz is a trading name of inIT.biz sp. z o.o., a company registered in Poland (REGON: 367829790, VAT: 8661738221)