I´m making a wordpress plugin with PHPStorm. This plugin contains a load of files with addons as well and it´s the time to use unit tests to check up before each commit in my github project.
I took a look about what it exists now to do this like :
- The basic PHPUnit
- codeception, specificaly with wp-browser
- There is wordpress-develop
- Selenium for UI
But for my first unit testing, I´m really lost. I would like to test my plugin with process like this :
Test 1 - Admin side
1. Connection on the admin interface with the admin user 2. Go to the url : http://my-example.org/wp-admin/options-general.php 3. Check if the protocol is not https, there is the message : "[My warning as notice to prevent the admin to install the https protocol to use my plugin]"
Test 2 - Front-end side
1. The visitor fill the form to subscribe 2. The visitor do a paypal payment 3. See the result
As you can see, I´m using the protocol https, paypal and the google recaptcha as well that are not really good to test on localhost.
So, someone with experiment could advise me to choose the best way to make unit test on a dev environment online (if it is possible) ?
Which tool is the easiest way to do these kinds of tests in 2018 ?
Notice : My dev environment wordpress is on a shared server.