The WordPress testing demo project is now underway

Spent most of today (very roughly during ‘work’ hours, just to try to keep to the whole idea of coding to a schedule) working on the WordPress testing demo project I talked about in my last post. As of this writing, I have some actual working things checked in up on Github. There’s only one functional test case so far, but it’s a start!

What I accomplished today:

  • Creating a Github repo for this work
  • Read about the API endpoints that WordPress makes available for any given site, some of which are publicly viewable, others of which require you to log in as a valid user
  • Started a Postman Collection to keep track of the endpoints I’ll be playing with for my test site, and checked an initial version of this in on Github
  • Refreshed my memory about how Unirest works, as this was the library we used at Big Fish to talk to various services; maybe not the most current library to use, but it’s the one I know, so I’m going with this for demo purposes
  • Got IntelliJ on the Linux partition of my dev laptop updated to the latest version
  • Built the actual project in IntelliJ, as a Maven project, so it’d have the correct file structure and a pom.xml file I could add dependencies to
  • Started building a client class that will use Unirest to hit those endpoints for my local test site
  • Built a BaseTest class in charge of doing setup used by all the test classes I’ll be making
  • Built a TestPosts class to start the test cases for the “Posts” endpoints in the aforementioned API, and now it even has an initial functional test case!

Now that I have an actual working (if tiny) framework here, I should be able to fill in some test cases reasonably quickly.

Note also that the test suite assumes I am running the WordPress test site locally. For bonus usefulness I should make some sort of healthcheck test case that verifies that the test site is in fact UP.