fusionengine-org / fusion

A custom open-source game engine on Python and Pygame, it is written in pure Python! It is easy and fast!
GNU General Public License v3.0
75 stars 10 forks source link

Automated testing #21

Closed zenthm closed 1 year ago

zenthm commented 1 year ago

This project lacks on automation and is crucial for any software development project. One of the most important automation is testing, there are several reasons why automated testing is necessary:

dimkauzh commented 1 year ago

This project lacks on automation and is crucial for any software development project. One of the most important automation is testing, there are several reasons why automated testing is necessary:

  • Maintaining Code Quality: Automated tests help ensure that the library functions as expected. They can catch bugs and regressions early on, preventing the introduction of new issues with each code change.

  • Regression Detection: As a library evolves and new features or bug fixes are added, there is a risk of introducing unintended side effects or breaking existing functionality. Automated tests act as a safety net to catch regressions, making it easier to identify and fix issues.

  • Confidence in Refactoring: Automated tests provide confidence when refactoring or optimizing code. Developers can refactor with the assurance that if the tests pass, the changes have not broken existing functionality.

  • Platform and Environment Independence: Python libraries are often used in various environments and platforms. Automated tests ensure that the library behaves consistently across different setups, reducing the likelihood of environment-specific issues.

  • Time and Cost Savings: Although setting up automated tests initially takes some effort, they save time and cost in the long run. Identifying and fixing issues early reduces the time spent debugging and maintaining the library.

  • User Trust and Adoption: A well-tested library inspires trust among users and potential adopters. When users see that a library has a comprehensive test suite, they are more likely to rely on it for their projects.

Any ideas with what we could automate these test? I tried pytest, it would work properly because of the window. Any ideas?

dimkauzh commented 1 year ago

@zenthm Hey, thanks for the issue, i will close it now as i implemented github actions to test our code, see test and compile in the actions tab. Basically it uses cython to build the package and cython takes the code and compiles it, but if there is an error then cython errors out.