HOME     SITEMAP     RSS     TWITTER     EMAIL    
Search:   

FollowSteph Follow Steph as he posts Blog Blazer Friday
 
 

Why It's Important to Test in Production

Every real software developer I know knows the importance of testing their software in a production environment because there’s always that slight chance that something may be different from your development environment. This is why in enterprise software you have a development environment, a staging environment, and a production environment. The development environment is as you might expect, is where things are tried out. However staging is where things get different, this is where your environment should replicate as closely as possible your production environment. Although it’s not always entirely possible to completely reproduce it, the closer the better. And production is your live environment.

Normally for LandlordMax, when we’re developing we run it directly from our IDE (Integrated Development Environment), which is our development environment. If everything works here, it should work in the production environment. You always want to test it in staging though, just in case, which we do. Also, to remove the chances of errors, what you also want to do is automate the process of taking your development application and “productizing it”. That is to say, you want to create something called a build script which will automatically create everything for you, removing any chances of human errors in creating the final product.

Once that’s done, at least for us here at LandlordMax, you have an installer created. You then try the installer. You then run the software to make sure everything is still working the same (hopefully someone else will do this to avoid any biases while testing). It’s a pretty simple process.

However with version 3.11 of LandlordMax we re-learned the valuable lesson of just important it is to test and re-test the software after it’s been productized. Yes we normally run it through it’s gamut of tests, but for some reason we missed one simple test case with version 3.11 that where we just a few minutes ago released version 3.11a tonight to correct. The bug, which worked in our development environment, didn’t work in staging, or production. Unfortunately it wasn’t caught until just recently by two of our customers, which I personally thank you for letting us know so quickly. The good news is that because they contacted us right away, within 1 day we have a new version with this fix available!

So what happened between the two environments, shouldn’t they be the same? Yes they should be the same, there should absolutely be no difference. However this was not the case with version 3.11. But before I get into the details, let me step back a minute and explain what happens in our automated script (which by the way was not at fault for those of you thinking ahead).

Our build script consists of several steps. First it gets the latest code from our version control, compiles it, and creates the appropriate objects. Once this is done, it grabs all the appropriate resources (for example images, etc.) and puts them into their appropriate objects. After that, it takes these objects and “Obfuscates” them (if you’re interested there is a famous contest held each year to see who can create the most obfuscated code called IOCCC). This is important for us as a company because it takes the compiled objects (intellectual property) and makes it extremely hard to reverse engineer. Nothing is impossible, but I can tell you from looking at the code after the obfuscater has run through it that I can barely understand it myself! Anyways, once this is done, it takes all the objects, and runs another script which then creates the installer (LLMaxSetup.exe) which you download and install. That’s our build script. Not too complicated, but not too easy either (I’m glossing over some of the details).

What happened with version 3.11 is that we updated the software that obfuscates LandlordMax. We’ve done this many times over the last 4 years, but this time for some reason it changed the way it reads the configuration file. Not significantly, but enough that it caused this issue. Without being too technical, in our code we overwrite a few libraries we use (for example we changed how the report printout calculates the report totals by adding a clause for “NSF” checks, and so on). Now when LandlordMax tries to call this library, our code is intercepted beforehand and is used rather than just going directly to the library’s code. Nothing major, this is called “overwriting” in programming. However, one key feature in overwriting code is that you need to use the exact same names!

Well to our dismay, the configuration in our obfuscater no longer accepted the wild card we used in the past. It overwrote the names of these classes, and therefore because the names weren’t the same, our code didn’t intercept the library’s code. And because of this, the software didn’t know how to handle “NSF” or other little tweaks we added! Hence all the totals were $0.00 on the printout.

So between our development environment and our staging environment something had changed. Something that wasn’t suppose to change, had never changed in the past, but suddenly now did. This is why it’s important to thoroughly test your final production product. We did, but we somehow still missed this issue and for this I apologize to all our customers. We have therefore just released a new version (version 3.11a) that you can download and install to resolve this issue right now.

PS: As an aside, I’d just like to say this was a fairly difficult bug to track down. This is a bug that worked in every development environment but not in our staging or production environment, regardless of the settings and configurations! It also illustrates even more the importance of properly testing in every environment!



 
Like this article?

Comments:

  •     GammaGaga
    · December 6th, 2006  · 6:32 pm  · Permalink

    It should be named: “why is it important to have a good staging environment”

  •     Steph
    · December 6th, 2006  · 11:58 pm  · Permalink

    If could very well be named that.

  •     R.T
    · December 22nd, 2010  · 12:59 am  · Permalink

    Nice article, totally agree about the production testing, and even if your test cases pass in staging env. that still doesn’t mean it will pass for production env.

Write a reply:





 


SOFTWARE AND BOOKS BY STEPHANE GRENIER:

LandlordMax Property Management Software

LandlordMax is the EASIEST
Property Management
Software available!
Try it for free!

Real Estate Pigeon

Real Estate Pigeon
The place to ask and answer
all your real estate questions

Blog Blazers: 40 Top Bloggers Share Their Secrets to Creating a High-Profile, High-Traffic, and High-Profit Blog!

Blog Blazers is a book that
features secrets from the
Top 40 Bloggers on the web

How to Generate Traffic to Your Website ebook

How to Generate Traffic to
Your Website
is an ebook for
to you achieve success


 

FollowSteph
More resources from Stephane Grenier:
PUBLICATIONS
For people who work on the web
Blog Blazers
How to Generate Traffic to Your Website
 
SOFTWARE
The EASIEST Property Management Software available!
LandlordMax


Copyright @2003-2024
LandlordMax Property Management Software

Disclaimer: This is a personal blog about my thoughts, experiences and ideas. The contents of this blog are for informational purposes only. No content should be construed as financial, business, personal, or any other type of advice. Commenters, advertisers and linked sites are entirely responsible for their own content and do not represent the views of myself. All decisions involve risks and results are not guaranteed. Always do your own research, due diligence, and consult your own professional advisors before making any decision. This blog (including myself) assumes no liability with regard to results based on use of information from this blog. If this blog contains any errors, misrepresentations, or omissions, please contact me or leave a comment to have the content corrected.