Release v0.1.1 and Designing Authentication Tests

Lacuna • July 22, 2022

Well it took me a little longer to complete this in part as I had problems with the password reset testing, specifically the throttling of requests, but that's all in place now.

So, out of the box, I have a safe, secure and stable method of registering, and authenticating users along with a full set of tests.

For those of you not used to testing, tests are quite simply a godsend. The benefits of creating tests outweigh dramatically that time it takes to create them. If you run the coverage reports:

sail test --coverage

Then open up the ./coverage/index.php, you will see something akin to around 88% which in reality covers all of my code so far.

I've tagged this release (v0.1.1) as it is potentially a decent starting point for many web-base projects.

It should be noted, that 100% code coverage is not the goal here. I'm testing above and beyond 100%, as I'm interested in what is actually visible on the screen in a lot of cases. 100% coverage does NOT equate to full test coverage as there are any number of potential pitfalls awaiting you. While I've not got 100% across the board, I have covered all the requests and controllers which was the key, and I suspect the other files will be covered in due course.

Wrapping up

So I have a fairly solid authentication system, along with a full test-suite for a stable index, login, register, logout along with password recovery system which is I've no doubt the basis for many applications.

What's next? Well, I suppose I'd better start on some of the world generation techniques and try to get something up and running that is a little more intersting than a blank page!