Looking for resources for setting up CI to test PHP website

I’ve been running Gitlab for months now as a personal code repo, and I absolutely love it. Since the addition of CI, things just keep getting better. I’ve managed to set up a runner and get it linked to Gitlab, however, I can’t find any resources on the internet on how best to setup PHP testing for a website. I’ve found tools like PHPUnit, but that seems like it’s to test static code and not just sites. Allow me to elaborate a bit.

I have developed some internal tools for various teams in my company, mostly consisting of PHP/JS/HTML. These tools are available as a website to internal users. Originally the project started off as one or two small tools to make things faster, but have since grown into a large project, and I’d like to be able to start testing my “site” after each commit, prior to deploying new tools/changes. I’m new to code testing, so don’t know where to start, but I’m trying to find the best way to write some tests that could test various portions of the tools, even if it was as simple as invoking a PHP page with POST requests and then checking if data comes back. from a database…for example.

Can someone possibly point me in the direction of a tool that might work for this? As mentioned, I’d like to use Gitlab-ci-runners to build/test the site prior to pushing out into production, and any amount of automated testing I could do via a runner would greatly reduce the amount of time I have to spend testing it myself.

I’m far from an authority on the topic, just a LAMP web designer/developer hacking around to automate front-end testing, but I’ve managed to use both GitLab CI and Drone to automate simple front-end tests with a headless Firefox browser. I’m not sure if that’s what you’re trying to do, but if so you might want to look into Docker for setting up your site(s) in a container and maybe Watir or Selenium for running front-end tests. It’s really nice to have smoke tests performed on every commit, then (optionally) have the work deployed or kept from being deployed!