Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
13 tasks
RedDragonWebDesign opened this issue Jan 30, 2024 · 0 comments
Open
13 tasks

Comments

@RedDragonWebDesign
Copy link
Owner

RedDragonWebDesign commented Jan 30, 2024

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.

@RedDragonWebDesign RedDragonWebDesign pinned this issue Jan 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant