markcheret / footnotes

footnotes aims to be the all-in-one solution for displaying an automatically-generated list of references on your WordPress Page or Post.
https://wordpress.org/plugins/footnotes/#description
GNU General Public License v3.0
8 stars 6 forks source link

Set up automated testing infrastructure #31

Open Rumperuu opened 3 years ago

Rumperuu commented 3 years ago

This Issue refers to the setting up of automated tests to run as part of the build/release process. The actual test-writing is not included within the scope of this Issue.

markcheret commented 3 years ago

Will we be able to automate the unit testing so a CI toolchain can run it before merging pull requests?

Rumperuu commented 3 years ago

Will we be able to automate the unit testing so a CI toolchain can run it before merging pull requests?

That's the plan! Lint the code pre-commit so that code in this repo (on all branches) is always standards-compliant, then test it pre-merge so that the main branch is always in full working order (or at least, the bits of it that we have tests for are).

markcheret commented 3 years ago

https://developer.wordpress.org/cli/commands/scaffold/plugin-tests/

markcheret commented 3 years ago

https://github.com/xwp/wp-dev-lib

markcheret commented 3 years ago

Best to open a discussion on the topic? Thinking about automating tests for

Rumperuu commented 3 years ago

Best to open a discussion on the topic? Thinking about automating tests for

* WP/PHP/MySQL version compatibility

* Having a set of baseline footnotes in posts and how they're supposed to be rendered to cover previous support cases

I've renamed the Issue and added a note in the description to clarify - this Issue is not about the tests themselves, just setting up the test infra.

Re: testing, I'll wait to weigh in until I've done #87, because I'll be in a more more informed position to comment then.

Rumperuu commented 3 years ago

@lolzim in #163:

I found this: 9 Best Automated Testing Frameworks For PHP Maybe this can be a start to find a tool that can be used.

I never used them, except PHPUnit.