-
Notifications
You must be signed in to change notification settings - Fork 60
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
Functional tests for WP-CLI commands #215
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, @swissspidy, for the PR. I have reviewed it initially and would like to discuss a few questions:
- Do we have any plans to add new tests in Behat?
- Considering that Behat uses Gherkin syntax, there might be a learning curve for us. How do we plan to address this?
- Are we going to maintain both Unit tests and Behat tests simultaneously?
Great questions!
Right now this PR just lays the foundation for the tests. New tickets can be created to add a few more tests. Not too many tests are needed because the command is rather straightforward and only has a few options.
Luckily the syntax is pretty easy to grasp, making it easy to understand and write tests, plus there's plenty of documentation and tutorials out there. And of course I'm happy to do an intro as well if there's interest.
Yes, these tests are an addition to the existing PHPUnit-based tests in the repo, focusing on how users interact with the WP-CLI command. There is little overlap. Just like e2e tests and unit/integration tests are not mutually exclusive. So I guess these could be seen as e2e tests for the WP-CLI command :-) |
Welcome to Codecov 🎉Once merged to your default branch, Codecov will compare your coverage reports and display the results in this comment. Thanks for integrating Codecov - We've got you covered ☂️ |
@felixarntz @westonruter @joemcgill @mukeshpanchal27 Pinging you since this PR has been around for a long time but it's still valuable — this adds some initial Behat tests for the WP-CLI command added by this plugin. We need this to ensure the command works properly, especially when making changes. Also with #153 in mind. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @swissspidy, LGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@swissspidy LGTM, just one question before merge.
Description of the Change
This PR sets up the necessary infrastructure for running Behat tests for the built-in WP-CLI commands.
Also sets up code coverage, which is quite convenient.
How to test the Change
Run the tests locally or check out the CI build status.
Changelog Entry
Credits
Checklist: