-
-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
135 additions
and
2,706 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,93 @@ | ||
# wp-browser documentation | ||
# wp-browser documentaion | ||
|
||
You can use wp-browser to test WordPress sites, plugins and themes. | ||
|
||
## Installation | ||
|
||
Add wp-browser to your project as a development dependency using [Composer][1] | ||
|
||
```bash | ||
cd my-wordrpess-project | ||
composer require --dev lucatume/wp-browser | ||
``` | ||
|
||
Initialize wp-browser to quickly configured to suite your project and setup: | ||
|
||
```bash | ||
vendor/bin/codecept init wpbrowser | ||
``` | ||
|
||
The command will set up your project to run integration and end-to-end tests using: | ||
|
||
* SQLite as the database engine, leveragin the [SQLite Database Integration plugin][2] | ||
* PHP built-in web server to serve the WordPress site on localhost (e.g. `http://localhost:8080`) | ||
* Chromedriver to dirve the local version of Chrome installed on your machine | ||
|
||
If you're working on a plugin or theme project, the default configuration will add some extra steps: | ||
|
||
* install the latest version of WordPress in the `tests/_wordpress` directory | ||
* create a `tests/_plugins` directory: any file or directory in this directory will be symlinked into the WordPress | ||
installation in `tests/_wordpress/wp-content/plugins` | ||
* create a `tests/_themes` directory: any file or directory in this directory will be symlinked into the WordPress | ||
installation in `tests/_wordpress/wp-content/themes` | ||
|
||
For most projects this configuration will be enough to get started with testing. | ||
|
||
You can run your tests immediately using the `vendor/bin/codecept run` command. | ||
|
||
[Read more about the commands provided by the library here.](commands.md) | ||
|
||
### Using a custom configuration | ||
|
||
If you decide to skip the default configuration, you will be able to set up `wp-browser` to suit your needs and local | ||
setup by editing the `tests/.env` file. | ||
The inline documentation in the file will guide you through the configuration process. | ||
|
||
[Read more about using a custom configuration here.](custom-configuration.md) | ||
|
||
## Getting support for wp-browser configuration and usage | ||
|
||
The best place to get support for wp-browser is this documentation. | ||
Since this project builds on top of [PHPUnit][3] and [Codeception][4], you can also refer to their documentation. | ||
|
||
If you can't find the answer to your question here you can ask on | ||
the ["Issues" section of the wp-browser repository][5] taking care to provide as much information as possible. | ||
|
||
Finally, you can <a href="mailto:luca@theaveragedev.com">contact me directly</a> to set up a call to discuss your | ||
project needs and how wp-browser can help you. | ||
|
||
Table of contents: | ||
|
||
* [Getting started](./getting-started.md) | ||
* [Getting support](./getting-started.md#getting-support-for-wp-browser-configuration-and-usage) | ||
* [The default configuration](./default-configuration.md) | ||
* [The default configuration](default-configuration.md) | ||
* [Using a custom configuration](custom-configuration.md) | ||
* Modules | ||
* [WPLoader](./modules/WPLoader.md) | ||
* [WPDb](./modules/WPDb.md) | ||
* [WPFilesystem](./modules/WPFilesystem.md) | ||
* [WPBrowser](./modules/WPBrowser.md) | ||
* [WPCLI](./modules/WPCLI.md) | ||
* [WPWebDriver](./modules/WPWebDriver.md) | ||
* [WPBrowser](modules/WPBrowser.md) | ||
* [WPCLI](modules/WPCLI.md) | ||
* [WPDb](modules/WPDb.md) | ||
* [WPFilesystem](modules/WPFilesystem.md) | ||
* [WPLoader](modules/WPLoader.md) | ||
* [WPQueries](modules/WPQueries.md) | ||
* [WPWebDriver](modules/WPWebDriver.md) | ||
* Extensions | ||
* [BuiltInServerController](./extensions.md#builtinservercontroller) | ||
* [ChromeDriverController](./extensions.md#chromedrivercontroller) | ||
* [DockerComposeController](./extensions.md#dockercomposecontroller) | ||
* [BuiltInServerController](extensions.md#builtinservercontroller) | ||
* [ChromeDriverController](extensions.md#chromedrivercontroller) | ||
* [DockerComposeController](extensions.md#dockercomposecontroller) | ||
* Commands | ||
* [`run` and `codeception:run`](./commands.md#run-and-codeceptionrun) | ||
* [`wp:dev-start`](./commands.md#wpdev-start) | ||
* [`wp:dev-stop`](./commands.md#wpdev-stop) | ||
* [`wp:cli`](./commands.md#wpcli) | ||
* [`generate:wpunit`](./commands.md#generatewpunit) | ||
* [`run` and `codeception:run`](commands.md#run-and-codeceptionrun) | ||
* [`dev:start`](commands.md#devstart) | ||
* [`dev:stop`](commands.md#wpdevstop) | ||
* [`dev:restart`](commands.md#devrestart) | ||
* [`wp:db:import`](commands.md#wpdbimport) | ||
* [`wp:db:export`](commands.md#wpdbexport) | ||
* [`chromedriver:update`](commands.md#chromedriverupdate) | ||
* [`generate:wpunit`](commands.md#generatewpunit) | ||
|
||
[1]: https://getcomposer.org/ | ||
|
||
[2]: https://wordpress.org/plugins/sqlite-database-integration/ | ||
|
||
[3]: https://phpunit.de/ | ||
|
||
[4]: https://codeception.com/ | ||
|
||
[5]: https://github.com/lucatume/wp-browser/issues/new/choose |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.