Skip to content

Conversation

@kittysnacks
Copy link
Collaborator

This contains changes to allow for acceptance testing using Selenium with ChromeDriver. Other WebDrivers can be used, but I've only added ChromeDriver for now. 🙂

Some points:

  • These changes are intended to be used during local development and should not affect any production installations.
    • Getting automated tests running with Travis will require a bit more work. (initial DB setup, seeding, etc) It's not difficult work, I just haven't done it. 🙂
  • Usage of any of this is optional -- only when running composer test.
  • Codeception is used to run tests now.
  • Codeception uses PHPUnit under the hood, so tests may still be written using PHPUnit.
  • I added one example acceptance test for logging in as the default admin user.
  • PHP 7 is required to run tests, due to Codeception's dependencies.
  • I've updated readme.html with testing instructions, at the bottom of the file.

I was hoping to not add Selenium as a requirement for testing, but due to the requirement of JavaScript on the client side, using Codeception's PhpBrowser (mimics a simple web browser) won't be possible.

This will allow for generation of code coverage reports.
PHPUnit v5.x is past EOL and causes the following error with Codeception:

In ErrorHandler.php line 83:

  count(): Parameter must be an array or an object that implements Countable
Added .gitkeep files for acceptance, functional, and unit directories.
Removed generated support files.
Created .gitignore files for generated output directories.
- Moved devmode.php require to the top of init.php.
	- c3.php should be the first thing loaded.
- Added a require for the composer autoloader.
- Use localhost:80 instead of localhost:3000 for acceptance tests.
@kittysnacks kittysnacks force-pushed the feature_codeception branch from b7cf1fe to 8ed5478 Compare May 14, 2018 05:33
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

Successfully merging this pull request may close these issues.

1 participant