Real Project Management for Real Businesses

Browsing Posts tagged Unit Testing

As of 01 April 2010, v1.3 of web2project is live.

This release was focused almost entirely on bug fixing and preparation for the coming v2.0 release in June. Since the v1.2.2 release in January:

  • First, we added another 35 Unit Tests covering core functionality in the Tasks module. While there are still lots fo things that need tests, Trevor has does some amazing work and should be applauded for it.
  • Next, we’ve done quite a bit of cleanup to the Tasks module itself. Now moving a Task from one project to another will cause both projects’ percent complete to be recalculated.
  • Next, the upgrade process has been moved out of the /install folder and into the System Admin. Further, the System Admin page notifies administrators if database updates should be applied. This ensures that only properly permissioned users can apply upgrades.
  • Next, we added “minification” to the Javascipt and CSS which reduced the corresponding filesizes by 80% and 33% respectively.
  • Next, we created a number of Views Helpers. These helpers handle auto-linking fields that have url’s or even email fields. On the other side of things, we’ve added validation for email and url fields. If something is supposed to be a url, it will be. Further, description fields will respect character sets including umlauts and other non-English characters.
  • Finally, we added deprecation warnings to a number of methods and functions that will be removed in later releases.

In summary, we closed about 25 items with ranging from 3 crash-level issues to 14 minor bugs. Once again, those are just the formally reported issues. If you want to explore everything of interest, check out the web2project v1.3 Release Notes on our wiki. And of course, if you’re looking for ways to share your code more easily, you should check out our web2project git repository.

This release came a little later than planned, but due to conflicting schedules, it just had to happen. Regardless, we’ve already sketched out v2.0 and plan to get back on track with the September v2.1 release.

web2project homepageAs of this morning – 09 December 2009 – web2project v1.2 is live!

While there is not a huge amount of new user-facing functionality, the sheer number of fixes and amount of cleanup is staggering. Since the v1.1 release in September:

  • Pedro made some major updates to the iCal handling which added the Task Description and Links to the iCal entry for one-stop shop of information.
  • Pedro also added the Brazilian Portuguese translation to core. Rumor has it that there’s an Italian version on the way next.
  • Added some creative caching and pre-calculations to the Task Count, Total Hours, Percent Complete, and Worked Hours to speed up the system significantly.
  • Changed the PDF creation for reports to use a randomly generated filename.
  • Created a GanttRenderer class to centralize the Gantt chart creation with the goal of standardizing behavior and eventually replacing jpGraph completely.
  • We’ve created strong object validation that happens on save. Whenever you attempt to save a Project, Company, Link, etc, the system makes sure the required fields are actually filled in. Realistically, some would claim that the Javascript already did some of this on the front end, but that could be bypassed… and we needed something more solid for the API.
  • The method signatures – specifically for store(), delete(), check(), and a few other calls – have been standardized. This by itself isn’t incredibly useful yet… but we needed something more solid for the API.
  • We did some major refactoring of the core modules based on a code review we received at CodeWorks 2009. Sebastian Bergmann (phpUnit creator), Stefan Priebsch (OO guru), and Arne Blankerts (security guru) were kind enought to take a look at the code and shared feedback on a number of architectural concepts, OO improvements, and overall code clarity. These changes aren’t immediately visible to end users but we needed something more solid for the API.
  • Finally, Trevor and I (mostly him) added about 40 Unit Tests since the v1.1 release. While we don’t distribute them in the release – you have to get them via SVN – they’re useful for testing against the growing API.

Are you detecting the pattern here?

Further, we closed nearly 50 items ranging from 8 crash-level bugs to 20 minor bugs to 4 pre-defined feature requests. Of course, that only covers the things logged as issues. If you want to see everything of interest, check out the web2project v1.2 Release Notes on our wiki.

In accordance with our quarterly release schedule, this is our final release for 2009. The next release will be 1.3 in March 2010 with v2.0 scheduled for June 2010.

I’ve been quiet on web2project for the past few weeks, but I thought I should share some of the latest developments.

The single biggest improvement currently is the inclusion of Unit Testing.

Unit Testing has been on the agenda for months and years. The problem was that something else – often bugs, sometimes new features – would creep up and push it off the todo list. And then something happened at php|tek this time around:

I met Trevor Morse – lead developer of Azorus and the founder of the Nova Scotia PHP Developers Group.

Within their company, they took a very familiar approach. They started writing unit tests for the new features and as bugs were discovered on existing features. While it sounds like a slow, painful process, it actually works out quite well. Instead of seeing tens or even hundreds of thousands of lines that need to be tested, you see only a given function or only a given bug. Over time, this steadily improves the quality of the codebase and also sets a good example for current and future developers on the “right way” to do things.

So a few weeks ago when Trevor passed me some Unit Tests and a Phing script to run them, I was suitably impressed not only by his motivation, but also by his beginnings on this strategy.

Within a few days, I had integrated his phpUnit tests – available since r444 on 18 June – and expanded the Phing script to include some other functionality such as a php lint check, and a coding standards check (PEAR). In the weeks since, he’s provided Unit Tests for the vast majority of the Companies Module and some of the Project Module. In the meantime, I’ve been working on some of the supporting classes and functions used by the rest of the system as I’ve tracked down and closed a few bugs.

In addition to improving the quality of the system, Trevor has found and properly diagnosed at least two bugs while I’ve found a few others. Combine with this the little performance improvements and tweaks that have been made and the next release could be even more perfomant. If you’d like to browse the tests and offer feedback – constructive criticism only, please – feel free to browse our SVN repository on Sourceforge.

And in case you want to see them, the web2project Unit Test Report is available here… warts and all.

Warning: Since the vast majority of the tests run against the database with users of known permissions, etc, under no circumstances should you run the tests against your production system.

In other news, web2project v1.1 has been specified. There are a number of cleanups, improvements, and fixes going in – 27 to be exact. A couple are important, most are pretty small, but the bulk are necessary to the overall improvement of the system. About six of them are already closed, a few more are on the way.

Powered by WordPress © 2013 web2Project Design by SRS Solutions

Get web2Project at SourceForge.net. Fast, secure and Free Open Source software downloads
LiveZilla Live Help