For the first time ever, Mixxx has a test suite! I just committed a copy 
of Google Test to our repo, and hooked it into our build script. Now if 
you build Mixxx using `scons test=1', you'll get a `mixxx-test' binary 
alongside the usual `mixxx' binary. When you run mixxx-test, it will run 
every test in each of our test suites, and return to you the 
passes/failures, along with the tests that failed.

To add a test, all you have to do is add a source file to src/test/ 
which inherits from testing::Test. As an example, check out some basic 
ControlObject tests I added in src/test/controlobjecttest.cpp 
<http://bazaar.launchpad.net/%7Emixxxdevelopers/mixxx/release-1.6.2/revision/2366/mixxx/src/test/controlobjecttest.cpp>.

To read more about how to use Google Test, check out this primer: 
http://code.google.com/p/googletest/wiki/GoogleTestPrimer

Why Google Test?

- Supported on our three main platforms.
- Since Google use it extensively, we know it's been tested in serious 
environments, and will continue to be a healthy project.
- Impressive support for a number of different kinds of tests (death 
tests, etc)
- I wanted to try it out.

This will prove very useful for testing many different areas of Mixxx. 
For example, our current workflow for testing SoundSources is that once 
a file is found that does not work, somebody posts a bug saying:  "Hey, 
Ogg doesn't work on this mono, 666khz file". We fix the problem, and 
close the bug. We do not usually take the time to verify that our change 
has not caused a regression in previously problematic files. Using 
regression tests, when we find a problem, we can add a test for it so we 
know that functionality has not degraded in the future. When we run our 
test suite, we will have higher assurance that our development efforts 
are eliminating bugs and at the same time, not regressing on old ones.

One final note. Since development efforts are going on exclusively in 
the 1.7 release branch, I committed this there so that we minimize 
hassle in merging 1.7 to trunk, even though we are in a feature freeze. 
This does not affect the main mixxx binary whatsoever, so this doesn't 
seem unreasonable.

Cheers,
RJ



------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Mixxx-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mixxx-devel

Reply via email to