serveit-ca / curastreamPlugin

Curastream
https://www.curastream.com
0 stars 0 forks source link

Automated Plugin Testing #22

Closed serveit-ca closed 6 years ago

serveit-ca commented 6 years ago

Ok Kaiden, I realized last night we need some automated testing on our wordpress plugin. The largest two reasons here are 1. We are going to break things and when we do we do not want mike to find them before us #2. When we add additional functionality such as exercise recording or different functions we want to ensure the core functions work as expected.

So for the remainder of the week, I would like you to focus on creating a beautiful test environment. I realize you have not yet had a class on this so please don;t feel bad about being paid to learn this stuff.

https://www.smashingmagazine.com/2017/12/automated-testing-wordpress-plugins-phpunit/ is the first article which will help get our feet wet. It looks to me like we need to perhaps leverage the WordPress CLI as well as the PHPUnit testing.

For each function in the program.php class we will want to create tests for different scenarios and then be able to run the tests.

We may need to setup a separate testing database which gets loaded for testing or may be able to use the live one. A separate database may help with testing functions like getAllPrograms() as if there were three programs in there we could check each one thoroughly.

serveit-ca commented 6 years ago

Please focus on this one last as its a beast.

SideonDeaka commented 6 years ago

Automation - Automated Plugin Testing

serveit-ca commented 6 years ago

Testing the move functions

SideonDeaka commented 6 years ago

Automated testing and test code has been completed on my machine, you may need to install some things onto your vagrant box to get this working. WPCLI, PHPUnit and maybe some other dependancies.