← Back to team overview

kicad-developers team mailing list archive

Re: Regression Testing

 

I would like to get more involved in KiCad development and testing is
an interest I am currently developing.

I have just set up a framework to test SooperLooper (an audio
live-looping program written in C++) using Python[1]. To do this I
made bindings using SWIG and used Python's native unittest module to
write the tests. I am now moving towards the "nose" unit testing
framework which has more features and extensibility. Moving from
unittest to nose is absolutely seem-less.

Writing tests in Python is a lot of fun. The inheritance model and
meta-programming features really seem to be coming into their own
while I am doing this. Unfortunately I cannot compare it to any C++
testing frameworks. It really probably just comes down to personal
preference.

Maybe it's a matter of picking the right tool for each job too? I
believe the Python tests could be easily integrated into CMake
alongside any C++ tests.

As for Python3 vs Python2, I ended up settling on 2 for this project
as I couldn't get SWIG to play nice with Python3 (but I didn't spend a
lot of time trying). I don't see it as a big issue and think that even
upgrading should never be a huge task in the future, just a little bit
of search and replace.

[1]https://github.com/essej/sooperlooper/tree/test_plugin/src/test


Follow ups

References