 Russell has posted a great writeup on Asterisk testing procedures and the inclusion of unit tests. Well worth a read:
Greetings,
I think we can do a much better job at testing within the Asterisk project and I suspect you do, too. The vast install base and wide variety of uses gets us very good feedback. However, it is clear that we can do better within the development community at improving the quality of the code before it makes it out in any type of release (beta, RC, or full release).
I would like to propose that we adopt an automated testing approach as a part of our development process. There are 4 pieces to this:
1) Testing with our eyes
2) Bottom-Up testing using unit tests within Asterisk
3) Top-Down testing using an external test suite
4) Tests running constantly using a continuous integration framework
While this isn't automated testing, it is too valuable not to mention. One of the most effective ways of finding bugs in code is by peer code review. We see this more and more as we continue to increase our usage of ReviewBoard for peer review before changes are merged. It's rare that a change goes in as the first proposed patch that goes on ReviewBoard. While it has never been a hard rule, it is strongly encouraged that every committer to seek a sign-off from at least one other committer via ReviewBoard for _every_ non-trivial change.
https://reviewboard.asterisk.org/
For unit testing, we have a new API in Asterisk trunk for writing unit tests within the code. We're up to 20 unit tests. Writing these tests has already found multiple bugs and running them continuously has caught one regression before it made it into a release.
See include/asterisk/test.h
The beginnings of an external test suite have been created. There is still design work to do, but hopefully it will begin to be populated with tests soon. In general, though, this will become a suite of tests that can use whatever external tools are necessary to verify Asterisk functionality. There is a README.txt that documents what is there so far.
$ svn co http://svn.digium.com/svn/testsuite/asterisk/trunk
On the continuous integration front, we have been using buildbot for a long time for doing compilation on various systems. It's time that we extend our continuous integration approach to not only compile Asterisk, but also run regression tests. After evaluating some different options, Bamboo has been installed and configured for our use. So far, it is compiling all release branches of Asterisk. For Asterisk trunk, it is running all of the unit tests after every change to the code. The results of the tests are integrated into the application.
http://bamboo.asterisk.org/
The only build slave right now is Linux. This will be extended to other operating systems. If you would be interested in providing a build slave and assisting with its maintenance, please talk to me. We can configure up to 25 build slaves ("remote agents" in Bamboo terminology).
If you have commit access, you are strongly encouraged to sign up for an account on bamboo.asterisk.org and associate your account with your svn username. That way, bamboo can notify you by email and/or jabber if there any problems associated with changes that you make.
As you work on changes to the Asterisk code, you should consider this approach to testing along side your development. If there is a unit test you could write to help prove your code works or prevent a bug from showing up again, then please write one! If there is an external test you could write to help verify some piece of functionality you are using continues to work precisely as expected, then let's figure out how to get that into the test suite. This kind of testing not only prevents regressions but it also guarantees that expected behavior will remain intact across releases.
I am excited about what this effort can do for the quality of Asterisk in the long term, and I hope you are, too. I look forward to your feedback on the approach as well as participation in the development of our testing infrastructure.
Thanks,
--
Russell Bryant
Digium, Inc. | Engineering Manager, Open Source Software
Current Rating: 9/10 (2 votes) Similar Articles (Based on Title)Asterisk-Dev: RealTime - res_config_mysql - Ready for Testing - October 12, 2004 Matthew Boehm has released his MySQL driver for the new realtime config options in Asterisk
Asterisk-Users: AstLinux posted for testing - November 5, 2004 Kristian Kielhofner has posted a link to his Linux distro with Asterisk and embedded uses in mind. The whole thing easily fits on a 256Mb flash card.
AstLinux 0.2.5.5 now available for testing (includes ISDN/BRI) - April 15, 2005 Kristian Kielhofner has posted details of the pre-release of what will become 0.2.6 of AstLinux.
Asterisk + AstLinux testing images now available - August 29, 2005 Kristian Kielhofner has posted details of a test framework for new release patches based on AstLinux.
*-Dev: Module testing framework - December 29, 2005 Olle has posted details of a new module test branch.
GDS Voice Conferencing Solution - Beta testing program opened - February 28, 2006 Boris Zolotarev has posted details of a beta of a conferencing solution based on Asterisk.
Astlinux-users: New boot system available for testing - June 2, 2006 Kris has posted into on the new AstLinux boot system.
Secure RTP - ready for testing - June 20, 2006 Olle has posted details of a testing branch for Secure RTP.
New asterisk jukebox needs testing - August 16, 2006 Justin Tunney has posted details of a jukebox for Asterisk written in C.
Astlinux-announce: chan_bluetooth enabled AstLinux posted for testing - September 17, 2006 Kris has added bluetooth support to the latest versions of AstLinux. This could make for a pretty amazing Soekris box!
Astlinux-users: AstLinux 0.4.4 rc1 posted for testing - October 11, 2006 Kris has posted details of the latest test version of AstLinux.
Astlinux-users: 0.4.4-rc3 posted for testing (mISDN should FINALLY work) - October 19, 2006 Kris has uploaded the latest AstLinux Release Candidate.
Astlinux-users: trunk is back - testing, comments welcome - November 10, 2006 Kris has posted details of the trunk versions of Astlinux being fixed.
Mantis Changes Ready for Testing - June 18, 2007 Russell Bryant has posted details of a new version of Mantis which is now ready for testing.
Testing of SIP TCP/TLS support - July 11, 2007 Russell Bryant has posted details of SIP TCP/TLS support ready for testing in Asterisk.
PBX Testing Framework - November 27, 2007 Atis Lezdins has posted details of a testing framework for Asterisk.
Original Content (C) 2004-2010
Matt Riddell

Icons by: FastIcon.com
|
Back to life July 21, 2010 Average Vote: 10
Hey all - I am back online after some pretty big projects which have taken all my time. Will be updating the Asterisk news over the next few days.
Nerd Vittles: Building a Bluetooth Proximity Detection System with Asterisk December 12, 2005 Average Vote: 10
The Nerd Vittles site has an article on proximity detection using Asterisk and a TomTom GPS
Automated Testing Update July 30, 2010 Average Vote: 10
Russell Bryant has posted details of a new mailing list for automated testing of Asterisk and some information on the progress that has been made. There is no way to say how important I think this work is. It really makes a huge difference to Asterisk and the ability to use it in an enterprise environment. Really great work.
VoIP-Info: FFasterisk Video file converter August 25, 2006 Average Vote: 10
The wiki has a link to a new piece of software for converting video to the format required for Asterisk.
Code Review: SRTP support for Asterisk March 12, 2009 Average Vote: 10
Terry Wilson has moved his SRTP branch onto the Digium review board.
HumBug - Pre BETA Launch Registration July 27, 2010 Average Vote: 10
Nir Simionovich has posted details of the beta of the new call analytics service.
Interview with BKW_ December 7, 2004 Average Vote: 10
We've finally completed our interview with BKW. Hope you like! :-)
SlashDot: GSM and Asterisk Integration August 21, 2005 Average Vote: 10
There is a post up on SlashDot which talks about using cellphones with Asterisk.
Interview with Mark Spencer November 26, 2004 Average Vote: 9.9
We have managed to get an interview with Mark Spencer AKA Markster. Mark Spencer is the creator of Asterisk and by far the most active developer.
Asterisk and Kamailio realtime integration tutorial May 24, 2010 Average Vote: 9.9
Daniel-Constantin Mierla has posted a link to a tutorial on integrating Asterisk and Kamailio using realtime.
Asterisk IPv6 update February 1, 2010 Average Vote: 9.8
Olle has posted an update on IPV6 in Asterisk and a link to a blog post of his.
Proposal for T.38 transparent gateway design in Asterisk April 29, 2010 Average Vote: 9.8
Kevin Fleming has posted a proposed design for a transparent T.38 gateway for Asterisk:
Asterisk Monitoring with iPhone and iPod touch February 12, 2010 Average Vote: 9.7
For the past couple of weeks I have been working on an app that allows you to monitor and restart Asterisk servers.
Monitoring Asterisk with Munin January 7, 2010 Average Vote: 9.7
I had a few requests for these munin plugins after some discussion on one of the Asterisk lists and thought people might like them.
New Zealand Asterisk Voices March 2, 2006 Average Vote: 9.7
Chris Hodgetts has posted details of recordings of Asterisk Sounds with a New Zealand accent.
Automated Testing Update July 30, 2010 Russell Bryant has posted details of a new mailing list for automated testing of Asterisk and some information on the progress that has been made. There is no way to say how important I think this work is. It really makes a huge difference to Asterisk and the ability to use it in an enterprise environment. Really great work.
Asterisk 1.8.0-beta2 Now Available July 28, 2010 The Asterisk Development Team has announced the release of Asterisk 1.8.0-beta2.
HumBug - Pre BETA Launch Registration July 27, 2010 Nir Simionovich has posted details of the beta of the new call analytics service.
Branch Merging Changes July 26, 2010 Russell Bryant has posted details of some changes to the way developers need to commit code to Asterisk because of the newly released 1.8 branch.
Asterisk 1.8.0-beta1 is Now Available July 26, 2010 The Asterisk Development Team has announced the release of Asterisk 1.8.0-beta1. This release marks the beginning of the testing process for the eventual release of Asterisk 1.8.0.
Asterisk 1.6.2.10 Now Available July 26, 2010 The Asterisk Development Team has announced the release of Asterisk 1.6.2.10.
Asterisk 1.4.34 Now Available July 26, 2010 The Asterisk Development Team has announced the release of Asterisk 1.4.34.
AppleRaisin - AstDB over realtime July 23, 2010 Olle has posted a note about his awesome AppleRaisin branch which provides the ability to store AstDB in realtime. This would make for a much simpler failover and clustering situation.
QueueMetrics 1.6.1 released July 22, 2010 Lenz has posted a note to inform us that QueueMetrics version 1.6.1 has been released. This release offers a large number of bug fixes, misc improvements and new developements including hotdesking.
Asterisk 1.8 Branch Creation July 22, 2010 Russell Bryant has posted a note to inform us of the creation of the 1.8 branch of Asterisk. |