← Back to team overview

kicad-developers team mailing list archive

Re: Regression Testing

 

On 05/17/2013 10:41 AM, Kaspar Bumke wrote:
> 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


Kasper,

"Fun" is actually important, if it motivates someone to make improvements.
I see advantages to your helping, and SWIG expertise.

I am not taking the lead on this.  I like python on top of C++.  I would love to be able
to test dialog windows as well as worker functions below those.  The dialog testing is
tricky, since you have to either use Frank's keyboard recording idea, or something else
that will inject events into the wx handlers.  There was a posting to a tool which
supported the latter.

Keyboard recording has the advantage that you can create the dialog automaton portion
simply by walking through keystrokes, as if you were a user.  That sounds like a lean way
to develop and record a portion of a test.  Verifying the operation that gets done after
that might require a way to verify the production of a data file.

I hope Brian and Wayne can steer you in the right direction and help get you started.

Dick



> 
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
> 



Follow ups

References