Everyone--How do you test your plugins?

Re: Everyone--How do you test your plugins?

by Mark Johnson -
Number of replies: 0
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Further to Richard and Davo's suggestions, once you have a local development environment set up, you could also consider writing some automated tests with PHPUnit.

This allows you to set up some test data that looks like the data your code will actually use, execute the scheduled task for your plugin, then examine the data programmatically to make sure your code did what you were expecting.  The big advantage to doing it this way is that when you change your code in the future (or upgrade the underlying Moodle installation), you can make sure you don't accidentally break existing behaviour.

Average of ratings: Useful (3)