New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Making it stable - testing #105
Comments
There are phpunit tests. I would not call them unit tests but rather integration tests. They are not public at the moment, because they were initially separate from Polylang. They are also wuite messy and I have to arrange them before making them publicly available here. Some of these tests are testing need 3rd party plugins or specifically need Twenty Fourteen or Twenty Seventeen (so not necessary the default them of the current WordPress version). Is it possible to run them with TravisCI? |
Yes. I'll be possibly writing the test scripts. |
This is how: http://wp-cli.org/commands/scaffold/plugin-tests/ |
OK. Let me some time to arrange things (a bit) and I will include them in this repo. |
I have created a new branch phpunit https://github.com/polylang/polylang/tree/phpunit to work on this topic. Some tests need plugins (Yoast SEO, JetPack and WordPress Importer) or themes (Twenty Fourteen, Twenty Seventeen). I put them in separate subdirectories. (NB there is a test for YARPP but the plugin is not needed). Themes are usually included in WordPress directory, but the current latest version does not include Twenty Fourteen anymore. I added it on my local test suite at its usual place. I made that when WP 4.7 was released to go faster but it's not mantainable in the long term when changing the WordPress version. I put plugins aside the wordpress directory instead of the usual plugins directory. So my current local test suite directory structure looks lik this:
I don't know if it's good for TracisCI. If you can help to setup these tests on TravisCI, that would be very nice. |
Thank you! Could you try running WP-CLI? I hope it is easy to adapt. |
In 0c15773
|
Please consider adding at least unit tests.
I'll send a PR to run them in TravisCI.
The text was updated successfully, but these errors were encountered: