mrdavidlaing / pressupbox-development-boilerplate

Patterns and practices for teams to collaborating on WordPress projects
Other
1 stars 5 forks source link

Install test database #4

Closed mrdavidlaing closed 11 years ago

mrdavidlaing commented 11 years ago

It should be possible to bundle & install a test database that contains useful test data.

daithi-coombes commented 11 years ago

@mrdavidlaing I've found some test data on wordpress.org but it requires that a plugin is installed more info... http://codex.wordpress.org/Theme_Unit_Test

The data: https://wpcom-themes.svn.automattic.com/demo/theme-unit-test-data.xml

I have added the sample data to a fresh install and dumped a sql file for it. Unfortunately the db tables need to be blank during wp install so the dev can set up the blog, this means that we can't import the sql dump directly into the database using vagrant or grunt.

This leaves us with two options:

  1. Give instructions and link above in the README.md
  2. Have a post install script

think with the 2nd option the dev would have to stop hhvm in the vm, run the sample_data.sh script then restart hhvm, maybe a bit of an iritation but if they want sample data it shouldn't be too much of a hassle.

mrdavidlaing commented 11 years ago

Unfortunately the db tables need to be blank during wp install so the dev can set up the blog

Not sure I agree with this -> I'm installing a known DB full of useful standard test data; so having the blog title, users + data all included vital. Otherwise we'll never get to a state where we can do any automated testing.

I think that when you spin up your VM for the first time and we create you a "wordpress" database, we should also populate it with this test data that you have found.

And then just document the default admin credentials (admin / admin? )

daithi-coombes commented 11 years ago

... your right, was looking at it backwards. The install process won't overwrite the initial database. I'll create a pr and get the script up

daithi-coombes commented 11 years ago

@mrdavidlaing work and debate moved to pr #24 issue16 Rewrite build script in Rake

closing