User Tools

Site Tools


develop:plugin_automated_testing

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

develop:plugin_automated_testing [2015/11/02 18:07]
phplist created
develop:plugin_automated_testing [2015/11/02 18:08] (current)
phplist
Line 1: Line 1:
 +
 +===== Travis-CI testing of a phpList plugin ====
 +
 +Based on the Travis-CI testing of phpList itself, https://​travis-ci.org/​phpList/​phplist3,​ a plugin can be tested as well.
 +
 +This is done by defining the Git repo of phpList as a dependency in composer. Once composer checks out phpList (without UI or anything, but for functionality that is not a problem) the config file can set the Plugin rootdir and you can run your unit tests.
 +
 +=== config file ===
 +
 +[[https://​github.com/​phpList/​phplist-plugin-restapi/​blob/​stable/​tests/​travis-ci/​config.php#​L113|the config file]]
 +
 +  * sets the plugin root dir to our plugin folder
 +  * auto-enables the plugin
 +
 +=== phpunit ===
 +
 +[[https://​github.com/​phpList/​phplist-plugin-restapi/​tree/​stable/​tests/​phpunit|the phpUnit tests]]
 +
 +  * will test the plugin code
 +
 +=== behat ===
 +
 +[[https://​github.com/​phpList/​phplist-plugin-restapi/​blob/​stable/​tests/​travis-ci/​behat.yml|the behat config]] ​
 +
 +  * will auto install phpList
 +
 +=== travis ===
 +
 +[[https://​github.com/​phpList/​phplist-plugin-restapi/​blob/​stable/​.travis.yml|the Travis config]]
 +
 +  * will glue it all together
 +
 +
 +==== Test results ====
 +
 +Travis will test every commit and send you the results
 +
 +https://​travis-ci.org/​phpList/​phplist-plugin-restapi
 +
 +
  
develop/plugin_automated_testing.txt · Last modified: 2015/11/02 18:08 by phplist

Resources
Contact Us

e: info@phplist.com

Boring Bit

phpList is a registered limited company

UK Company No. 07582966

VAT Registration 122 0788 37

© phpList 2016