Coffeehouse Thread

8 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

Unit tests documentation ... for QA?

Back to Forum: Coffeehouse
  • User profile image
    Richard.Hein

    Has anyone here been asked to write documentation describing all the unit tests they have done on their code, for QA to review, with pass/fail signoffs on everything?

    The reason I ask is because I've never been asked to do this kind of documentation, and it's not even "unit tests" they are asking about, what they really mean is some functional testing done on a web application that covers the use cases, but "not in as much detail" as the QA teams test cases.  I sent QA a draft of what I think they wanted, and asked for feedback "because I've never had to write this kind of documentation and I'm not sure if this is what you want", and got back a reply, "I'm surprised that you do not understand ... I'd expect a developer to know what unit tests are and to have done this for all your code in the past" with a CC to my project manager, which was basically trying to make me look bad, and that basic kind of attitude.  I replied that our definitions of "unit test" were completely different....  Wondering if there's any opinion, because I am really pissed off right now.

  • User profile image
    andy_hanger​18

    Richard.Hein wrote:
    "I'm surprised that you do not understand ... I'd expect a developer to know what unit tests are and to have done this for all your code in the past".


    That statement is simply rubbish. Most developers know what unit tests are but not everyone unit tests their code.  I'd just say that the guy has a bee in his bonnet about unit testing. He thinks its the best thing since sliced bread and everyone should do it.

    Unit testing is still fairly new in my opinion. More and more people are taking it up but its not as popular as this guy seems to think. No doubt some people have been doing it for years but I'd say more just don't.

    Another case of a little knowledge can be dangerous I think.

    Personally, unless your company procedures call for including unit testing when you write code then I wouldn't worry about it.

  • User profile image
    Dr Herbie

    Richard.Hein wrote:
    Has anyone here been asked to write documentation describing all the unit tests they have done on their code, for QA to review, with pass/fail signoffs on everything?

    The reason I ask is because I've never been asked to do this kind of documentation, and it's not even "unit tests" they are asking about, what they really mean is some functional testing done on a web application that covers the use cases, but "not in as much detail" as the QA teams test cases.  I sent QA a draft of what I think they wanted, and asked for feedback "because I've never had to write this kind of documentation and I'm not sure if this is what you want", and got back a reply, "I'm surprised that you do not understand ... I'd expect a developer to know what unit tests are and to have done this for all your code in the past" with a CC to my project manager, which was basically trying to make me look bad, and that basic kind of attitude.  I replied that our definitions of "unit test" were completely different....  Wondering if there's any opinion, because I am really pissed off right now.


    Sounds like a bumptious prat. CCing your PM was a ridiculous thing to do. He's probably a failed developer.  Have you talked to your PM about this?

    What do your company processes say anout Unit Tests?

    I've never fully documented Unit Tests (as opposed to commenting each to say what it tests) because Unit Test usually come from part of the spec, so all each one really needs is a reference to the spec that's being tested.
    I've worked in scientific and medical software before now, FDA approved.  As far as our documentation was concerned tests come from spec, so a reference is all that's needed.

    Herbie

  • User profile image
    ScanIAm

    It's highly likely that the QA guy is looking for you to do his job.  He's read a few articles in the various trade mags about unit tests, and like others have pointed out, he's trying to make you look bad.

    I wouldn't mess with him, head on, but instead, I'd document 20 or so unit tests and send them to him.  And by document, I mean press "///" and let .NET do the documentation for you.  Fill it out in intricate detail with only the most obvious of comments.  Things like:

    i++;   // Add 1 to i

    etc.

    Be sure to send them back, (cc your PM) and ask him if that is the level and kind of documentation he is looking for.

    Then, sleep with his wife.

  • User profile image
    Richard.Hein

    Dr Herbie wrote:
    
    Sounds like a bumptious prat. CCing your PM was a ridiculous thing to do. He's probably a failed developer.  Have you talked to your PM about this?

    What do your company processes say anout Unit Tests?

    Herbie



    Thanks for the feedback.  I've also worked on software for clinical trials and much more stringent testing and QA processes and in fact I am the guy that brought unit testing in-house at my last employer.  Anyways, the company processes don't say squat about unit tests.  They sent me a template, but it had nothing filled in, so I asked for clarification on the level of detail, and content.  I searched for other examples across all the documentation currently available, and there's nothing except a "summary" document from another dev who wrote each .dll name and stored proc, with "As Designed" next to Result of test, and the fact that he tested it.  I wasn't sure if that's what they wanted, and for the life of me can't imagine what use the doc is but to waste a developers time.

    I haven't talked to my PM but did CC him my reply, which stated, "Your definition of unit tests is completely different ... I've done plenty of unit testing but have never had to document them ..." and attached a link to Wikipedia on unit testing.

  • User profile image
    Richard.Hein

    ScanIAm wrote:
    It's highly likely that the QA guy is looking for you to do his job.  He's read a few articles in the various trade mags about unit tests, and like others have pointed out, he's trying to make you look bad.

    I wouldn't mess with him, head on, but instead, I'd document 20 or so unit tests and send them to him.  And by document, I mean press "///" and let .NET do the documentation for you.  Fill it out in intricate detail with only the most obvious of comments.  Things like:

    i++;   // Add 1 to i

    etc.

    Be sure to send them back, (cc your PM) and ask him if that is the level and kind of documentation he is looking for.

    Then, sleep with his wife.


    I was thinking about that (the part about writing 20 or so unit tests and sending the .NET documentation Wink), but that would involve getting IT requests for intalling NUnit or some other harness, etc....  AFter I talk to my PM I'll see if they want real unit tests or not.

  • User profile image
    Richard.Hein

    andy_hanger18 wrote:
    
    Richard.Hein wrote:
    "I'm surprised that you do not understand ... I'd expect a developer to know what unit tests are and to have done this for all your code in the past".


    That statement is simply rubbish. Most developers know what unit tests are but not everyone unit tests their code.  I'd just say that the guy has a bee in his bonnet about unit testing. He thinks its the best thing since sliced bread and everyone should do it.

    Unit testing is still fairly new in my opinion. More and more people are taking it up but its not as popular as this guy seems to think. No doubt some people have been doing it for years but I'd say more just don't.

    Another case of a little knowledge can be dangerous I think.

    Personally, unless your company procedures call for including unit testing when you write code then I wouldn't worry about it.


    Nobody mentioned unit tests, and nothing in the processes documentation mentioned it (I am a contractor); it was brought up just before deployment after 4 months of coding.  Of course, I believe that testing should happen as soon as possible for each bit, but they want "sign off" on ALL the test cases "before QA is involved".

  • User profile image
    harumscarum

    Man it is one of my pet peeves when people CC mgrs or other senior people. I had consulted on a project once where they gave us a template and said part of the process was to document the unit tests. The funny thing is I don't think anyone looked or cared about them. It was just something they read in the PM certification process so though it was necessary.

    I do however require a unit test document for each feature in a sprint from the developers. However I am very upfront on what I expect to see in the documentation.

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.