Home > java > Testing in production

Testing in production

Do you ever test your code after it has been deployed to production ? During my first few years programming, I thought this was a bad idea and was told repeatedly told not to test anything in Prod.

After being bitten time and again by environment related problems, I decided to make it a point to perform a smoke test in Prod before handing it to users. Even if it meant a transaction with real money was involved.

Let me take a few moments to recite some of the follies that befell me when I did not test in Prod.

  • Code moves to production. We find out that the SSL certificates in QA are installed in a different configuration when compared to Prod. The isSecure() flag on the HttpServletRequest returned a different value because of this and the code bombed.
  • A process tries to check in and check out files from clear case. The live environment has some clear case triggers that prevent check in based on certain rules. These rules are absent in QA. Kaboom.
  • A web service provider used an unsigned certificate in prod and didnt tell us about it. The cert chain hierarchy broke and the application stopped working.
  • An insert into a table in DEV was done using dummy user GUIDs. When the code was moved to Prod, we found out that all production GUIDs are of length 42 but the test GUIDs were of length 30.
  • And so on…

I think it is justifiable to even test code in Prod when money is involved. Just test for a transaction value of oneĀ  dollar and then roll it back. Sure beats a customer coming back to you and telling you that your system is broken.

But enough about what I think. What do you think ? Do you test your code in the live environment ? Take a small yes / no poll and if you feel the answer should be no, feel free to leave a comment.

Do you test your code in production ?

View Results

Loading ... Loading ...





Categories: java Tags: , ,
  1. rnmanhon
    July 2nd, 2010 at 08:55 | #1

    Your UAT environment (or one of the testing environment) should be identical as the production environment.

  2. July 2nd, 2010 at 12:38 | #2

    @rnmanhon

    Yeah I know. But most often this is not the case :( Which is how these problems creep in

  1. July 3rd, 2010 at 02:57 | #1