Unit and acceptance testing strategy?

Thank you for the excellent work on the H5P tooling -- it's exciting to see a new take on educational content.

From the perspective of a developer and prospective adopter of H5P, I'd like to see some degree of automated testing around the authoring tool, integration plugins and the various content types. I noticed that testing doesn't appear on the H5P roadmap and am curious as to the stance on testing in the developer community.

If tests were provided, would they be likely to be accepted?

falcon's picture

There has been quite a lot of activity here, and thomasmars has a blog series about this prepared. I'm in a hurry now so to make a long story short, if you use Jasmine your tests will be treasured very highly. Do you prefer another framework?

I'll probably get back to this with more detail later :)

falcon's picture

We considered automated testing when starting to work on H5P but because of very short deadlines, very small budgets initially and also uncertainties among stakeholders on whether or not H5P had the right to live, automated testing was postponed. Also there were uncertainties regarding how much the code and the project would change to adapt to the experiences we got when working on the project.

Now H5P has been adopted by large organizations around the world, it has a right to live. The code base is also quite stable. There are things that should be refactored, but still it is high time for H5P to get automated tests. There haven't been any discussions around frameworks for the PHP part, but for Joubel's JavaScript code Jasmine will be used, and perhaps some other frameworks as well to check for unwanted changes in styling etc. The unit testing vs. integration testing discussion haven't quite landed yet either, but I think there will be a combination of both.

What tools do you want to use when adding automated tests to H5P? Your initiative is perfectly timed and any energy spent on this will be very much appreciated by the core team and the entire community!