What is the best way to do unit tests for your plugin in 2018 [closed]

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 :

  1. The basic PHPUnit
  2. codeception, specificaly with wp-browser
  3. There is wordpress-develop
  4. 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.

0

Leave a Comment