Closed slaFFik closed 7 years ago
The defaults will usually apply to a very small number of users. The message means that one of the configuration parameters provided is not correct; the usual suspects are:
Check those parameters and make sure those are correct and try again. What kind of local development stack are you using?
I'm using OSPanel (aka WAMP), no vagrant/docker. If I put correct paths (Windows style, with backslashes) I got another error about Symfony YAML configurator parser.
Mysql client credentials are correct? Did you try them out with a SQL client of from the command line? UNIX style slashes for the path are fine in PHP; that should not be the issue.
"Installed" asks for 2 different credentials. Am I right in assuming that one of them is for the site to be tested (aka "live"/"development"), and the other - for the site which will be used to test (where all the tests will be ran)?
In a default wp-browser setup the site that is used for testing is the same for all suites.
Before we move any further could you explain how you would like your setup to be?
Your best starting point might be using --no-interaction
, get empty config files, set them up and check if they work using codecept build
.
I want to test a massive site, DB is bit less than 2Gb in size (WC store with 15k products and ton of orders). We use same domain for prod/qa/dev/local (IP is different) - that simplified migrating DB. Dev/QA/loca version of DB is anonymized for obvious reasons, so I can log in as any user with predefined password and generic username.
Creating a DB mock for testing will be overkill, as it's a WP and WC, so data is spread across the universe.
For each test run I want to use a prepared DB dump (we might consider slim it a bit, but anyway it will be over 1Gb) to import into a test DB and run tests.
I will check --no-interaction
mode.
UPD: this mode generated everything, finally. I will dive into configs.
Thanks for the context information,
Codeception, and wp-browser, by extension, does not handle that DB size by default, use a populator to do so. And that will only apply to tests scaffolded by WPDb (acceptance and functional typically). For integration and "WordPress unit" tests you can set up a more restricted db fixture using factories.
build
was failing, so instead of
plugins: [
'advanced-cron-manager/advanced-cron-manager.php',
'contact-form-7/wp-contact-form-7.php'
#....
]
I had to do this:
plugins:
- advanced-cron-manager/advanced-cron-manager.php
- contact-form-7/wp-contact-form-7.php
#....
Sorry for somewhat stupid questions here, but that is the 1st time I install and configure all of this.
Closing the issue as it's actually already fixed via manual config files editing. The problem with paths in initial message was perhaps due to the usage of \
in paths on Windows instead of escaped \\
.
Thank you for your help!
Good to hear then! Thanks for taking the time to reply and post the solution: happy testing.
I can't successfully go through
composer init wpbrowser
step, constantly getting this error no matter what I type (even all defaults):Having this in
composer.json
:"lucatume/wp-browser": "~1.21"
Windows 10, PHP 7.0.14I have https://github.com/lucatume/wp-browser/blob/master/src/Codeception/Template/Wpbrowser.php#L69 configured (files created), but everything after that - no.