A regression of the art of database development

  • Comments posted to this topic are about the item A regression of the art of database development

    Best wishes,
    Phil Factor

  • It's great to see that I'm not completely crazy. I mentioned building a test harness to my area a few years ago and I was laughed at! Every person on my team asked me "why would we want to do that?" "That's a waste of time!" Now, we struggle to get anything tested properly, test scripts are too high-level and as a developer, I've had to resort to validate test results from testers to ensure that quirks weren't dismissed as "features." Yes, to a test harness! Also, it doesn't take expensive software to test code. Experience, knowledge and creativity should be able to get most to the point of coming up with a solid way to test code/apps. And yes, nothing new about all this. I definitely feel that having a test plan in mind/on paper when stuff is being coded is a great idea. This can actually help to keep stuff getting too far off of spec since you will know up front how to test your destination and with that in mind, you most likely will know as you are coding if what you are doing anything that will cause you to miss your mark ( go off spec).

  • I can understand some mild frustation over the newness of unit testing! But...practically and pragmatically, maybe now is the time to join in the shouting to see if we can tip it over to mainstream status.

  • Having recently received my fourth version of non-working customized code from a vendor I was beginning to believe that all testing was considered too "old school" to even waste time thinking about it.

    Glad to hear a voice of sanity still exists in the wilderness!

  • definitely agree that in the good old mainframe days unit testing was a de rigueur phase of the development cycle.

    In these days of rapid development, time to market and dare I say it outsourcing code development, it no longer seems to be drilled into developers (not trying to tar all with the same brush here). This may be due to unrealistic time pressures applied.

    I have seen cases of 'the contract says deliver the code, well here it is, box ticked, wheres my money?'

    ---------------------------------------------------------------------

  • The article mentions "client-based test harnesses that can simulate real usage". Does anyone have any recommendations for information on developing client-based testing methods? Maybe something automated?

    This is something that I am being tasked with, and I would like to see if I can improve on my methodology.

    Thanks!

    Dave Fulton

  • It is phooey that testing is new to database developers.

    There is a bit of envy to be had from some of the testing frameworks for the OOP world. However, it is really important to realize that database developers face different challenges. Testing a deterministic scalar UDF is a piece of cake not even really needing a test harness. Although there are a test harnes does allow for automation and should net be ignored. However, testing a stored procedure with set based inputs and artifacts is a bit more complicated. I'm open to suggestions on real sample data and ddl management techniques for database developers. This is a conversation worth spending some time on. Taking testing techniques up to new levels of quality and simplicity is a worthy goal.

    Some colleagues from the Philadelphia SQL Server Users Group, PSSUG, put together a solution that is worth looking at.

    http://www.sqlity.net/sqlity/articles/tSQLtTutorial

    {boy are they going to be surprised at the traffic}

    It was interesting to discuss the various solutions and techniques for implementing a TDD solution in SQL server. For Example, to use transactions and roll backs vs automated stubbing of data structures.

  • Being a self-started programmer that eventually took 3rd party training and college courses, I don't recall ever being shown how to write a test, or that one should be written first.

    I don't see any integration of TDD within the training materials/books for programming. Maybe there is a chapter in a book, or a whole book on the subject, but that's my point, it's compartmentalized.

    Somewhere in the fundamentals of learning to program in any language, that's where you should put the teaching that you start with the test, and every example in the book should set the example.

    Even "Hello World."

  • Always test with a complete, full dataset.

    As far as highly complex test setups, the best way is something like a VMWare snapshot that includes the contents of RAM; that way, the starting point is exactly the same. Less good is a full set of database backups restored each time just before a reboot, less good is the backups restored and SQL Server restarted, less good is the backups restored and the cache cleared, and so on and so forth as the starting point of each test has more and more differences system-wide from the point before.

    Good testing has been around a long time, and has been continuously adhered to in some areas... but for general programming, in a database or not, it's something that is rarely properly taught until you reach an organization that's been burned, or has people that have been burned.

  • Where do agile development practices put the testing? Agile development is supposed to produce results on a daily, weekly, or monthly basis. Where does testing fit in? With each iteration? At some milestone? I've been at some agile seminars and no one ever mentions testing.

  • It has been my expierence that in some companies the concept of testing was taken to a level of such silliness that the result began to match the output. I previously worked for a company that boasted on being CMM LEvel 3 certified. while I am not sure I understand what that means or what it takes to be certified, I can say that a change to code that consisted of one line would invlove 3 days of paperwork and reveiws. The process was so conveluted that people no longer took it seriously. The testing was second to the paperwork involved in testing. a defect was rarely reported simply from a hesitation to engage in the paperwork. If you found a defect it was a matter of procedure that a project would be delayed no less than three days. I feal I am ranting and I am sure I am revealing my bitterness to the process but I truly disliked the process. The poor product was a direct result of the over complex process that invovled way to many steps and documents.

    Dan

    If only I could snap my figures and have all the correct indexes apear and the buffer clean and.... Start day dream here.

  • skjoldtc (5/19/2010)


    Where do agile development practices put the testing? Agile development is supposed to produce results on a daily, weekly, or monthly basis. Where does testing fit in? With each iteration? At some milestone? I've been at some agile seminars and no one ever mentions testing.

    If you practice agile then testing should be part of the "definition of Done". If tests aren't checked-in then it's not Done. Non-automated tests should be completed in the same iteration - until they are it's not Done.

    Agile projects typically make extensive use of continuous integration, which means automated tests are run whenever check-ins occur. If you use a framework such as CruiseControl then the team gets rapid feedback as soon as the build is broken. Knowing that if bugs slip through they will be highlighted in that way becomes an excellent incentive for developers to test properly before they check-in!

  • With this Cruise Control, is there a way to set rules to prevent code check-in if it doesn't pass the tests?

  • Phillip - Texas (5/19/2010)


    With this Cruise Control, is there a way to set rules to prevent code check-in if it doesn't pass the tests?

    Not sure if CC can do that. I don't think so. Gated check-in is supported by Microsoft TFS 2010 apparently, but I haven't tried it yet. It's also a feature of TeamCity[/url] where it's called "Pre-tested Commit".

  • Test test and test some more. Once you have finished that, test it some more. It is always good to hammer out any errors before releasing it to the customer.

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

Viewing 15 posts - 1 through 15 (of 16 total)

You must be logged in to reply to this topic. Login to reply