Ideally test on a third party machine spinner up

This is part of the Semicolon&Sons Code Diary - consisting of lessons learned on the job. You're in the testing category.

Last Updated: 2024-11-23

I wrote my first ever batch of Laravel integration tests and, using the confidence from them, showed off "the new way of doings things" to a team that had never used testing before and pushed. Unfortunately the integration tests on my colleagues' machines so they were not impressed.

After some embarrassment, I discovered the issue was a missing composer (PHP) package. This package was installed locally on my machine, but was missing in the source control. Thus the integration tests passed for me, but not for anyone else. This situation could have been avoided by spinning up a machine in the cloud to test each commit based solely on the code as given.

Lessons