An unimaginatively-named open source framework for automated performance testing of WordPress themes.
This is currently powering the WordPress Theme Performance Reports over at https://www.themereports.com
Install WordPress, with Advanced Custom Fields (ACF), WP CLI, Python 2.7, pip, virtualenv.
Import the ACF Custom Fields from templates/advanced-custom-field-export.xml
Create a scripts/local_settings.py with your config:
THEMETEST_CONFIG = {
# Define where the test sites are installed and what URL to use to reach them
'testsite_basedir': "/var/www/wordpress-sites.test/testsites/",
'testsite_baseurl': "https://wordpress-sites.test/testsites/",
'images_path': "/home/ubuntu/workspace/theme-images",
# The Target WordPress instance to create posts on
'wp_path': "/var/www/themes-site.test",
'wp_url': 'https://themes-site.test/', # include /
'report_category_id': '2', # The ID of the target category for theme report posts
'report_user_id': '3', # The ID of the author for reports
'rundown_category_id': '3', # The ID of the rundown category
'rundown_user_id': '2', # The ID of the author for rundown
'dbhost': 'db_hostname',
'dbname': 'db_name',
'dbuser': 'db_username',
'dbpass': 'dbpassword',
# WP_CLI path
'wp_cli_path': '/usr/local/bin/wp'
}
Set up the env
and install the requirements with pip
:
cd scripts
virtualenv env
source env/bin/activate
pip install -r requirements.txt
Create a file named .gtcredentials
with your GTmetrix Credentils in the format user:pass
user.name@domain.com:1343434apikey438484848
- v0.1.0 - Stable tool performing daily GT Metrix tests and saving all data to WordPress
- v0.2.0 - Separate all components into logical units, produce a framework
- v0.3.0 - Expand testing to include additional tests
- v0.4.0 - Integrate control and reporting into WordPress UI
- v0.5.0 - Create the ability to run tests remotely (AWS or similar)
- Detect new themes from a variety of configurable sources
- Automatically install themes with a range of configurable generated content
- Test the installations with a variety of configurable tests
- Save all data into WordPress custom fields
- Ensure saved data is accessible via WP API
- Remove dependency on external Advanced Custom Fields
- Python - Primary scripting and automation
- WordPress - Used for testing and deployment
- WP CLI - The best way to manage WordPress
- Jinja - Jinja HTML templates
- GTmetrix - Performance Testing
If you're interested in contributing please submit a pull request or open an issue.
- Wayne Thursby - Initial work - WayneThursby.com
This project is licensed under the MIT License - see the LICENSE.md file for details