Skip to content

Get WebDriverIO (Selenium test framework) to run in continuous integration #130

@RedDragonWebDesign

Description

@RedDragonWebDesign

At the moment we run PHPUnit and PHPCS (linter) in continuous integration (the automated tests that run for each commit to master and each pull request). I'd like to add our browser test framework WebDriverIO to this list.

WebDriverIO is working locally. I can type npm ci; npm run wdio and the one test I've written runs and passes. But I haven't gotten this to work in CI yet.

Related to #89 but making this its own ticket. That was more of a brainstorming ticket. This ticket is more specific.

Acceptance criteria

  • add a file called .github/workflows/selenium.yml
    • name: Selenium (Browser Tests)
  • this file should...
    • use Ubuntu
    • actions/checkout
    • install and run and configure PHP 8.1
    • install and run and configure MySQL 8.0
    • install and run and configure Apache
    • install Google Chrome
    • npm ci
    • npm run wdio - a special configuration file just for CI such as wdio-github.conf.js can be created and used
    • BlueThrust5's database needs to be installed so that the rest of the website can be accessed, either by writing a WebDriverIO test to click through the installer (located in the src/installer directory), or by importing an SQL file into MySQL
    • suggested database credentials are dbname = bluethrust5, dbuser = root, dbpass = , dbhost = localhost.
  • existing WebDriverIO Selenium test located at tests/selenium/specs/index.js needs to run and pass

The above logic could be scripted in different ways. Three ideas that come to mind are 1) Docker, 2) Bash Commands (run:), 3) a couple of GitHub Actions uses: from the marketplace. Perhaps Docker is best so that I can also spin this up locally.

Code should be submitted to this repo as public pull requests and go through code review. Questions can be submitted as comments on this ticket or in one of the PRs.

I may hire a dev on Upwork to do this for me. Once I get this working, it will be a useful template for some of my other repos.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions