subspacecommunity / subspace

A fork of the simple WireGuard VPN server GUI community maintained

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Testing pyramid

gchamon opened this issue · comments

To: @subpacecommunity/ssubspace-maintainers

The issue with the lack of tests in subspace pops up time and again. It is universally understood that tests are important in any software engineering context.

However, not all tests are made equal. This is why I am opening this issue, to track the most important aspects of the platform we would want to write tests to so that we focus on delivering what makes sense first and foremost.

We ought to have unit tests, to be done after extracting logic units from code masses into unit functions. We should have component tests, to make sure our functionalities interacts correctly in their own scope. End to end tests are also important to see if the system behaves correctly as a whole. Last but not least, integration tests, using our frontend would ensure the best user experience.

I wanted to call for everyone to share their experiences when experimenting with subspace and reviewing/writing pull requests. This way we can figure out the most important aspects and write tests, having in mind the testing pyramid.

A CI pipeline would also facilitate contributions, but I believe we have got to have a minimum viable suit of tests before implementing such pipelines.

What do you people think?

Since the project wasn't built primarily with tests in mind, we could approach testing it as black box. We have clear functionalities, like adding and deleting peer configurations, admin and user separation, authentication, DNS tunneling and so on.

If we guarantee those basic behaviours are stable across pull requests, we create a little room to breathe before we get to code refactor and more involved testing methodologies.