Slashdot Mirror


How Can I Make Testing Software More Stimulating?

An anonymous reader writes "I like writing software. In fact, I revel in it. However, one thing has always kept me back from being able to write the best software I possibly can: testing. I consider testing to be the absolute bane of my existence. It is so boring and un-stimulating that I usually skip it entirely, pass the testing off to someone else, or even worse, if I absolutely have to test, I do a very poor job at it. I know I'm not that lazy, as I can spend hours on end writing software, but there's something about testing that makes my mind constantly want to wander off and think about something else. Does anyone have any tips on how I can make non-automated testing a little bit more stimulating so I can at least begin to form a habit of doing so?"

59 of 396 comments (clear)

  1. sharks with lasers by master_kaos · · Score: 5, Funny

    just imagine if you don't test giant sharks with lasers will attack you.. with that stimulate you enough?

    1. Re:sharks with lasers by arthur.gunn · · Score: 4, Interesting

      Or another way to make it more fun - Godlike!

      http://github.com/gunn/godlike

      Plays a sound when you acheive 100% test passing rate. The default sound is the Unreal Tournament voice: GODLIKE, but you have as other sound options: headshot, killingspree, perfect, supreme_victory, ultrakill, flag_capture, and frag.

  2. Too close to the subject... by bgibby9 · · Score: 5, Insightful

    Personally I feel that the dev should never do the testing of their own code as they are too close to the subject to test every angle.

    Sorry this doesn't answer you question :P

    --
    http://www.gibby.net.au
    1. Re:Too close to the subject... by SpinyNorman · · Score: 5, Informative

      The developer should unit test, and the test group should system test. The two are complementary.

      The test group will hopefully test the software in ways you never thought it would be used, but you'll hopefully have tested every code path and end case that only you are aware of from having written it.

      Of course the developer can system test do, or at least contribute test cases.

    2. Re:Too close to the subject... by Chuck_McDevitt · · Score: 4, Insightful

      The developer should never be the ONLY one testing the code. But the developer should absolutely test the code before turning it over to QA. You should be convinced your code works before giving it to someone else to test.

    3. Re:Too close to the subject... by NorbrookC · · Score: 4, Insightful

      When I wrote code, I knew how the program was supposed to work. I made the user interfaces "obvious" - to me. So my "testing" was along the lines of "does this compile properly," and "does it output what I expected it to?" The rude awakening came when I handed off the "finished" product to someone else. All sorts of errors I hadn't thought about handling happened, people were confused by the user interface, and more than one "oops" cropped up. While the "boring" testing you're doing on your code may catch the obvious things, it's always better to have someone else test it.

    4. Re:Too close to the subject... by Z34107 · · Score: 5, Interesting

      That's similar to what my workplace does. You're not really expected to test your own code - it's assumed that if you're handing it to a QAer that all the use cases you could think of are working. Instead, you get at least one round of "programmer QA" where another developer on your team examines your code for correctness and efficiency before handing it off to QA proper.

      The QA folks do mostly UI and workflow testing; they're fairly technical, but they're not coders. If they manage to break anything, you get your code back to fix and the process starts from step one.

      That seems to work pretty well - you're not testing your own code, but trying to break your coworker's code before QA gets a chance to.

      But, how to make testing your own code interesting? I'm not sure about that - there's not much you can do to make unit tests interesting. But people finding your UI baffling suggests a lack of design. Have you ever done a mock-up and demoed it to end-user victims? They make us at least find other developers before we start throwing around hWnds.

      --
      DATABASE WOW WOW
    5. Re:Too close to the subject... by FooAtWFU · · Score: 4, Informative

      It's hard to effectively test after you've written code, because it is really boring. So I like the "test driven development" approach. You write the test first (or shortly after some very skeletal code) and when it passes, you know that you're done. (Well, or that you need to write more tests.) The time spent writing tests doubles as time to review and internalize the requirements of the task ahead of you. Benefits of the approach include extensive unit test coverage (which provides cover for you when you're refactoring) and uncovering (or sometimes even anticipating) boatloads of small bugs, long before they even hit QA.

      --
      The World Wide Web is dying. Soon, we shall have only the Internet.
    6. Re:Too close to the subject... by bgibby9 · · Score: 2, Insightful

      I think my point is that, devs that do unit testing are contributing to the testing overall which is sweet, but come on, who ever makes unit tests that are 'decent' enough to ensure that the testing is done correctly?

      IMHO testing should be done by people who CARE about testing. Devs who do shitty unit testing contribute to the facade that the testing is done and working properly but in reality a shitty unit test could mask other problems.

      At that point you're creating more problems than you are solving!

      --
      http://www.gibby.net.au
    7. Re:Too close to the subject... by euphemistic · · Score: 4, Interesting

      You have no idea how much I empathise. My current job is to design and develop websites for what is probably the most computer illiterate demographic on earth. 45-65 year olds working in a non-technical environment, the majority being women. The assumptions and knowledge that have been ingrained into me does not apply to this group of people - this is something I very quickly learnt.

      Dropdown select boxes? Not enough of a visual cue, despite being pretty standard interface elements for decades now. The word online? That's fine. The word offline? Too technical. The phrase 'more options' in the context of a search box? They didn't understand what that meant.

      Everytime I do user testing, my mind is absolutely blown by the number of things I've taken for granted about user interfaces. Swearing usually entails after finding out your design is no longer possible due to one of these underlying assumptions. The moral of the story being, you need someone else to test your work... and if you have no eye for user interface design, find someone who does.

    8. Re:Too close to the subject... by tqk · · Score: 3, Funny

      So I like the "test driven development" approach.

      I like the "Ethel" approach (I may have got her name wrong; sorry $ethel).

      The story was there was this great tester lady, and when she found a bug she pounced on you "Ah hah!" like. She really took her job seriously.

      The developers loved her. Go figger.

      No, you can't definitively test your code. That's what users / testers are for. You can only ensure it works, within your limited space of $works. That's where $ethel comes in.

      --
      "Tongue tied and twisted, just an Earth bound misfit ..." -- Pink Floyd.
    9. Re:Too close to the subject... by bertok · · Score: 3, Insightful

      UI design is one of those areas of expertise that is both an "Art" and a "Science" at the same time. Very few people are capable of excelling at both simultaneously. That's why you end up with ugly but capable interfaces, or beautiful but useless interfaces. There are several examples in other industries that are similarly difficult, and the people who do them tend to be highly paid specialists. Plastic surgery comes to mind, for example.

      The computer industry hasn't evolved to quite that level yet, people just don't realize that good UI design is hard, so it often ends up a some random task assigned to whoever is available.

    10. Re:Too close to the subject... by weicco · · Score: 2, Insightful

      Developers shouldn't necessarily participate in unit tests if you follow TDD and CI techniques. Automate your unit tests and the whole build environment and you get regression tests as a bonus.

      I think that developer shouldn't test, at least, his own code. When ever I test my code it magically just works. When I pass it to someone else everything suddenly breaks. If you have to test your own code you need at least dedicated test environment.

      In system tests developers are a big no-no. We are currently running system test for production control system in a real production environment, which is rather complex factory with robots and stuff. Developers tend to cut some corners by doing hot-fixes in the middle of the test and altering data directly into the database. They don't even tell us who did and what and most importantly why all the time! This makes it impossible to write decent bug reports for instance. The worst thing is that they are interfering with the tests when they should be fixing the reported bugs.

      So there's couple of points why I think developer as a tester is (most likely) not a good thing. By hiring couple of tester, who knows their stuff, you really increase the quality of your product.

      --
      You don't know what you don't know.
    11. Re:Too close to the subject... by Goetterdaemmerung · · Score: 2, Insightful

      I am a test engineer (ie electrical/computer engineer with an emphasis in development for test and QA, not the guy who runs equipment) and I write a lot of software. I'm going to answer the question of how to create stable software rather than the mindset that all software needs to be unit or regression tested. This definitely serves an important purpose in any complex system and can't be disregarded, but I see most implementations created to test conditions that will never fail. It's a matter of focusing your testing optimally.

      Correctly implemented code is more a state of mind and what your focus is. I perpetually think of how code can fail and I am also a minimalist. This is an inherent conflict of interest, but it really makes my code stable and reusable by numerous other groups. I've been complimented that my product "just works."

      Creating stable code is a matter of understanding your inputs and performing error and bounds checking as necessary, but not obsessively. The act of implementing test code often creates bugs when the goal is to reduce bugs. Correct error handling is another topic of consideration. Unit and regression testing is important when used in the right places.

      I suppose what I'm getting at is the process of creating good code takes time, effort and skill. Developing testing criteria is similar. If you feel you are wasting your time doing code testing, you aren't focusing your efforts in the right place.

    12. Re:Too close to the subject... by Anonymous Coward · · Score: 2, Funny

      No, you can't definitively test your code. That's what users / testers are for.

      Are you serious? Users are there to test your code?!? Do you happen to work for Microsoft?

    13. Re:Too close to the subject... by dgatwood · · Score: 2, Interesting

      A fun bit of psychology: assuming you're from a country where traffic lights follow the usual red-yellow-green pattern, you should make successful tests show the word "OK" in uppercase green. Make unsuccessful tests show the word "fail" or "Fail" in lowercase/mixed-case red. This causes you to feel a sense of satisfaction when tests come up green, and in some subtle way causes you to enjoy creating more tests because things turn green.

      You do, however, have to be careful not to allow yourself to fall into the trap of changing the test result data to match the actual results just to get more green (unless you're sure that the changes really are expected, of course). That requires a great deal of discipline.

      --

      Check out my sci-fi/humor trilogy at PatriotsBooks.

    14. Re:Too close to the subject... by Firehed · · Score: 3, Insightful

      If your users aren't testing your code, then you don't have users.

      Of course, they shouldn't be the first people to test your code...

      --
      How are sites slashdotted when nobody reads TFAs?
    15. Re:Too close to the subject... by donscarletti · · Score: 2, Insightful

      Personally I feel that the dev should never do the testing of their own code as they are too close to the subject to test every angle.

      No, the dev should never do final testing, since they have a subconscious incentive to do it badly in order to find less mistakes. However, nobody is as qualified to know the edge cases and weaknesses than the individual who just wrote it. So, the best result comes from giving the developers a large incentive to find problems in their own code before the reviewer gets to it. The system I have seen work very well in the past is to create a culture of accountability, where as part of finding the bug, if nobody owns up to making a mistake, the SVN logs are traced to find the originator of the bug and it filed as part of the bug report. It sounds vindictive, but it is more a learning exercise to find out the weaknesses in our development process. What this does however is give someone a great incentive to test every case before committing, since their mistakes will be known to the whole team soon. Nobody tests better than the original dev, when his pride is on the line.

      However, this system's result is very much dependant on culture. In Australia, people are used to being told "you fucked up mate" the minute that their mistakes are uncovered, in other places, maybe not. The system is very much dependant on individuals expected to set a good example, such as managers and senior staff acknowledging when they themselves make a mistake without prompting.

      --
      When Argumentum ad Hominem falls short, try Argumentum ad Matrem
    16. Re:Too close to the subject... by maxwell+demon · · Score: 2, Interesting

      Maybe you should arrange that changing the test cases causes enough work to offset that urge. For example, if you are working on a machine where you have root, you could add a second account for yourself as tester, and use an extremely tedious password for that. Then, when the test cases are ready, log out of that account before using the (readonly from your developer account) test cases. Since it's tedious to change a test case (log in to the test case account, type tedious password), you'll avoid it if it's not necessary (it also is an incentive to get your test cases right before applying them).

      --
      The Tao of math: The numbers you can count are not the real numbers.
    17. Re:Too close to the subject... by Phloebas · · Score: 2, Insightful

      As a software tester by trade, I find that not a whole lot can make it nearly as interesting or stimulating as actually writing the software in the first place. However, properly written test cases do help. And by properly written I don't just mean exhaustive. Written with intelligence, test cases will test all possible code paths without boring the tester to death repeating the same steps over and over. Also, and I don't know if this will help, but I tend to populate my test cases with test data inspired by popular culture and films. My first person to use is DarthV@deathstar.com.

    18. Re:Too close to the subject... by SQLGuru · · Score: 3, Insightful

      Yep. Much more fun to try to break someone else's code than it is to trudge back through your own. Pair up with someone (officially or unofficially) and swap code. Your goal is to find more bugs than he does. I've got a reputation for finding "gnats" that I'm quite proud of. Everyone "hates" that I find them, but the code from our group is usually pretty solid because of it; making the whole team look good.

    19. Re:Too close to the subject... by CyberDong · · Score: 2, Insightful

      At the risk of sounding pedantic, I'd suggest that you limit your email testing to either address you own, or else domains like "example.com" that are reserved for testing. Domains like asdf.com are routinely flooded with unsolicited email due to people using it as a bogus domain name. More importantly, by using real domain names while testing software, you risk inadvertently emailing sensitive data to somewhere it should not go!

  3. It may not be more stimulating by NEDHead · · Score: 3, Informative

    But you should be writing the test as you write the code

    1. Re:It may not be more stimulating by Anonymous Coward · · Score: 2, Interesting

      That's exactly whats wrong with programmers these days. They never try large inputs. Like say, more than 1024 characters for their 1024 character, null terminated string. They never try weird input, such as input containing single quotes. Not so clear cut? I say, very clear cut! Programmers, that can't think of weird or bad stuff to give their program to swallow should not be programmers at all. They don't deserve it. How can they write good and secure code, if they can only ever think of the most straightforward way of using their program.

      That said, it is different from the repetitive and boring clicking through your application from a users point of view. But in that case, do automated user tests (where possible). Where not, get a grip. Force yourself to do boring stuff. Its a skill you need in life anyway. Trying to make things interesting only ends in creating over-engineered solutions.

      I don't say the story submitter is such a person, but a lot of people write "interesting" software, rather than the software that is needed. You can make programming interesting and have fun all day long and in the end, the customer still doesn't have his application running, which should have taken a month to implement. Instead he gets a framework for a framework for a framework to create the application that he really wanted after 12 months.

  4. Simple by Anonymous Coward · · Score: 5, Insightful

    Add porn

  5. Re:You can't? by Anonymous Coward · · Score: 5, Funny

    Wear a different hat each day.

  6. Focus your attention elsewhere by afaik_ianal · · Score: 5, Insightful

    Does anyone have any tips on how I can make non-automated testing a little bit more stimulating so I can at least begin to form a habit of doing so?

    No, I don't. I strongly think you're directing your effort the wrong way, and duplicating work if you're spending too much time on non-automated testing.

    Software Engineers are not good at poking holes in their own work, so you should have someone else doing the bulk of that kind of testing anyway. You obviously need to do some cursory testing to avoid wasting someone else's time, but there are much better ways of directing your testing effort.

    Focus on developing unit tests both before and during the development effort. Avoid developing your unit tests after writing the code though - your mind will be tainted with your approach, and you'll miss the obvious stuff. Not only do unit tests reveal bugs, the act of writing them will also help you get interfaces right, and help ensure a better overall design for your code.

    1. Re:Focus your attention elsewhere by ^Bobby^ · · Score: 2, Insightful

      My expectation would be that engineers are scientifically-minded and skeptical

      This is actually the problem; being scientifically minded means you tend to miss the bugs that are exposed by someone doing something that makes you go 'what were they thinking to try that?

  7. More bugs by MichaelSmith · · Score: 3, Funny

    Clearly there aren't enough bugs in the software you are testing. As an experienced C programmer I can help fix this problem...

    1. Re:More bugs by croftj · · Score: 4, Funny

      Let me guess, you can do that by writing your code in java or C#

      --
      -- Many men would appreciate a woman's mind more if they could fondle it
  8. BDD by Dishwasha · · Score: 3, Informative

    First off, don't do non-automated testing. It's unnecessary. Do Behavior Driven Development with Cucumber http://cukes.info./ It's massively more fun than unit testing.

  9. You need to get into Test Driven Development by CodeBuster · · Score: 4, Informative

    Have you given Test Driven Development and NUnit a try? If you haven't heard of these things or taken one of the TDD frameworks out for a test drive then you owe it to yourself to invest some time. The software industry in general and the .NET community in particular is moving towards automated unit testing and Continuous Integration. You should get on this train too.

  10. Reward yourself! by LividBovine · · Score: 2, Funny

    Allow yourself one porn^H^H^H^H^H download per bug found. Not only will this stimulate you, but you will be able to test with one hand.^H tied behind your back.

  11. Change hat to a darker color. by Short+Circuit · · Score: 5, Interesting

    Imagine that the guy who wrote the code is the royal, snobbish jerk who always thinks his code is better than anything else. Realize that, at some point, he's going to make a change that will change the way the component behaves, and will yet again break your code that uses that component. Don't let him get away with it. Let your fingers pound as you write code to check for the smallest fault. Let your lips curl in a snarl as you feed it poisoned data. Relish in the thought that you can catch him in every slightest mistake. Think of all those things that might not think to catch in the future. Not just the important stuff that defines the role of the component, but those little things that some people might call "implementation details".

    Also remember that he's the same jerk who wrote those unit tests that screwed you over all those times. Don't just pay it back; pay it forward.

    1. Re:Change hat to a darker color. by jmcharry · · Score: 2, Interesting

      Not bad, but pair with somebody. Test each others code, balance off the bugs, and pay for the difference in beers, or some other appropriate currency. Just gloating might do.

  12. Don't test manually by Scareduck · · Score: 2, Informative

    If you're not testing your code, you're not doing your job. Find ways to automate your tests.

    --

    Dog is my co-pilot.

  13. Unit testing achievements by hansamurai · · Score: 5, Funny

    http://exogen.github.com/nose-achievements/

    *
    Instant Feedback
    A suite of at least 50 tests takes less than a second to run.
    *
    Coffee Break
    The suite takes between 5 and 15 minutes to run.
    *
    Take a Walk
    The suite takes between 15 and 60 minutes to run.
    *
    Take a Nap
    The suite takes between 1 and 5 hours to run.
    *
    Take a Vacation
    The suite takes at least 3 days to run.
    *

    Coming soon!
    Anticipation
    One test in a suite of at least 10 is slow, and all the rest pass.

    Time

    *
    Night Shift
    Make a failing suite pass between midnight and 5am.
    *
    Punctuality
    Make a failing suite pass at 9am (give or take a minute).

    Failure

    *
    Complete Failure
    All tests in a suite of 50 to 999 fail.
    *
    Epic Fail
    All tests in a suite of at least 1,000 fail.
    *
    Minor Letdown
    All tests in a suite of 10 to 99 pass...except the last.
    *
    Major Letdown
    All tests in a suite of at least 100 pass...except the last.
    *
    Happy Ending
    All tests in a suite of at least 10 fail...except the last.
    *

    Coming soon!
    Heisenbug
    Make a passing suite fail without changing anything.

    Errors

    *
    Sausage Fingers
    Cause at least 2 distinct syntax errors in a single run.
    *
    To Understand Recursion
    Exceed the maximum recursion depth.
    *

    Coming soon!
    To Err is Human
    Cause all tests in a suite of at least 50 to fail with a single error.

    Size

    *
    My God, It’s Full of Dots
    The suite has at least 2,001 passing tests.

    Frequency

    *

    Coming soon!
    OCD
    Run the suite at least 5 times in the spa

  14. recreate the stanley milgram experiment by circletimessquare · · Score: 2, Funny

    http://en.wikipedia.org/wiki/Milgram_experiment

    except for you, the shocks will be real, and you will be both tester and test subject

    every time your code throws an exception, make it so you receive a small, incrementally growing shock

    after about 10 or 20 bugs, and the growing voltage of the shocks, you should be breathing heavily and sweating and be focused like a laser on ensuring the integrity of your code

    --
    intellectual property law is philosophically incoherent. it is your moral duty to ignore it or sabotage it
  15. Read The Daily WTF by Red+Storm · · Score: 2, Insightful

    http://thedailywtf.com/Default.aspx

    The threat that one day someone will post your code and or screen shots from your programs for everyone to ridicule should be motivation to either improve or write worse code.

    --
    ---- Fight to protect your right to keep and arm bears! ummmm... ya I think that's right....
  16. Re:You can't? by sohp · · Score: 4, Funny

    Wear a different hat each day.

    I put on my robe and wizard hat.

  17. Make it a game... by LynnwoodRooster · · Score: 2, Interesting

    I hate testing too! So I devised a little game with a compatriot in code: we unit-test each other's code. Each class is unit tested by the other person, and whoever finds the most bugs wins. What do you win? Usually pizza and beer. Free lunch or dinner can be a strong motivational reason, plus the chance to brag about trouncing the other person. Makes you a MUCH better "defensive" coder, always thinking about how/which parameters to validate, return codes, etc.

    --
    Browsing at +1 - no ACs, I ignore their posts. So refreshing!
  18. Then you are lazy. by Alcoholist · · Score: 3, Insightful

    "It is so boring and un-stimulating that I usually skip it entirely, pass the testing off to someone else, or even worse, if I absolutely have to test, I do a very poor job at it."

    Which sums up why software is so shitty today. I seriously hope that you don't write software for the areospace industry because I don't feel like falling out of the sky because you were too bored to test your code.

    Every job has its boring moments, testing your code is one of those things that programmers must do. Should do, it encourages discipline and discipline is what makes good code. You can automate the testing to some degree but at some point you've got to poke it and prod it yourself because computers are stupider than even we are. If you can't hack that, find a different line of work.

    --
    Bibo Ergo Sum.
    1. Re:Then you are lazy. by R.Mo_Robert · · Score: 4, Funny

      or another title+table+paragraph in Word?

      Yer documentin' it wrong.

      --
      R.Mo
  19. the developer should participate in system testing by ciaran_o_riordan · · Score: 2, Informative

    > The developer should unit test, and the test group should system test.

    In my experience, the developer should participate in system testing too.

    System testers have to know what the corner cases are. They can't guess them all (unless they're more skilled at each unit than the unit's developer is, in which case what's this product genius doing in the system test group!). Brute force takes too long for most systems, and even brute force requires knowledge of what variables to change and what ranges to span for each variable.

    I used to program embedded systems for oil pipeline tools. (Not a sector with a glowing reputation for reliability right now, but bear with me.) The system testers had decades experience in pigging, hydraulics, tool operation, an ISO certification, but they weren't programmers. The whole team participated in system testing (or a member of each unit group did), so that we'd collectively know all the combinations worth testing.

    (As for answering the question of the story, I think the asker really should have given a hint as to what sort of software it is.)

  20. You can't, so don't try by a9db0 · · Score: 4, Insightful

    I do software QA for a living. And if you're not a tester, don't try to be. It's your job to write code that meets spec, runs clean, is efficient and effective. Write it well. Write it secure. Write it to handle errors from data, users, networks, etc. Double check that you validate input. Make sure it doesn't leak memory. Write good unit tests. Test it enough to make sure it works. Then give it to a tester.

    Good software testers are a different breed. They are a sceptical, picky, pedantic, detail oriented bunch who take new code as a personal challenge to find the inevitable bugs. They will test your code a dozen different ways you would never think of. They will find bugs that could not possibly exist. They don't care that your shiney new whistle or bell will be the next big thing that will make you all rich. They care that it doesn't barf when you pass it a string with more than 256 characters. Including special characters. In German. Or Japanese. They care that when it's been running for 12 days straight with automated stuff beating on it that the memory usage hasn't ballooned. They care how it deals with data files 10 times larger than you say it should handle, or runs on a machine with half the ram it should have, or handles twice the workload it should - because somewhere out there is a user who will ask it to. They will chew it up, spit it out, and ask you to fix it. Then they will do it all again.

    Testers are a strange bunch, and good ones are hard to find. Find some good ones and cultivate them. They are a lot cheaper than a ticked off client.

    --
    -- "Never underestimate the power of human stupidity." - R.A.H.
  21. Cultivate a bit of self discipline by JuzzFunky · · Score: 2, Informative

    You don't need to make it more interesting, you need to make it part of your routine. It's like waking up at 6am to go for a run. The first few times you do it it'll be hard, but if you stick to it and do it every single day it will become just something you do. Start small - don't try to run a marathon in your first week, just don't make any excuses or invent reasons to skip it just this once. The fact that you care enough to ask slashdot suggests that it is important enough to you to make the effort. If you can make the change and stick to it you will probably find more fulfillment in your work.

    --
    Unexpect the expected!
  22. how to make non-automated testing simulating? by BLAG-blast · · Score: 3, Insightful
    Simple. Automate it!

    I used to dislike testing until I learn how to implement code designed to be tested. Use a dependency injection frame work (that will keep you busy for a while) and write testable code. Writing elegant, readable code which scalable and testable is not an easy or boring task. If you can not automate the tests, you are probably do something wrong.

    --
    M0571y H@rml355.
  23. Software always ships with bugs by xswl0931 · · Score: 2, Insightful

    The reality is that all software ships with bugs. Some known and some unknown. Typically it depends on how easy it is for the customer to find, what is the impact to the customer, cost to fix, and risk of regression. Given that software is typically patched after shipping, it means even more bugs get shipped rather than slipping the ship date.

  24. Think of it as writing examples by dr2chase · · Score: 2, Funny

    "Here's how it works..."

    That is, if you can write a test that looks like that. I work on compilers, so the trick is to write the example that tweaks just the feature that I want to check, and not 17 others. But, my test cases look like squirrelly little programs that could actually be inputs from especially peculiar users.

    You ought to also think about demonstrating your error cases. "If you do this wrong thing, it says...." I am sort of a nut about error messages, partly because I once read the Apple Human Interface guidelines and thought they were a good thing. In particular, does the error message provide the user with information that will help him make the error message go away? When you decide that an error has occurred, what special information do you have that might help? My anti-favorite error message was "Bad SOCKS version number". Not "unexpected", not "too old and not-supported", but "BAD". Morally wrong, so unspeakable that not only can the BAD number not be named, even the good numbers cannot be named, because they might therefore name the BAD number by process of elimination. Truly unspeakable, the version number that shall not be named.

  25. Re:One word by Lord_of_the_nerf · · Score: 2, Funny

    One word: Fluffers

  26. You can't... work smarter by RedLeg · · Score: 2, Insightful

    It's inherently boring....

    SO, Build hooks into the 'ware as you write it, and automate the testing.

    Work smart, not hard.

    Red

  27. Re:Go work for a porn website by hedronist · · Score: 5, Funny

    Actually it's just the opposite. It's like working in a candy factory and quickly getting completely bored/sick of the candy. I did one site where we were having problems with certain videos in different browsers and I swear to God that there was one clip of some really hot anal action that I got *really* sick of. After about the 3rd time I would watch about 5 seconds of it, see if the problem was manifesting, and then be back in the editor.

    Now I watch whale documentaries to get my jollies. ... Wait! What?

  28. Testing is a mindset more than anything else by crimsontime · · Score: 3, Insightful

    Do you enjoy finding the weak points in things? Do you use new devices, maps, etc without reading the instructions because you just think you should just know how they should work? Do you find that alarm bells go off in your head when you read a phrase that could possibly interpreted in more than one way? Do you often use things in ways that they were never intended yet those ways seem the most logical to you? Do you possess powers of intuition that lead you unforseen vulnerabilities? Do you find the needle in the haystack? Coding isn't inherently more interesting than testing. Anyway, if you identify with any of these phrases, you can apply it to testing...

  29. Re:the developer should participate in system test by lgw · · Score: 5, Insightful

    Unit tests should excercise the corner cases in your code. If you know what they are, write tests for them.

    QA testing should break all design assumptions about how the software should be used. Having the programmer sitting there telling the QA guy what to click on (and I've seen that far too often) invalidates that. The most useful bugs are the ones where the QA guy says "I did what I thought would get the job done, and instead it formatted my hard drive", leaving the dev to sputter "but, but, you're not supposed to do that". Given enough users, every possible "stupid" thing you can do with your software will be done in the field, and you really want to know that you will at least fail safely in all those "but that's not how you're supposed to do it" cases.

    --
    Socialism: a lie told by totalitarians and believed by fools.
  30. Do what I do by Eil · · Score: 2, Funny

    Read Slashdot instead.

  31. Re:Blowjobs by ErikZ · · Score: 2, Funny

    Then you have hookers killing themselves from boredom.

    Although... trying to explain away the dead hookers would make debugging a lot more interesting.

    --
    Democrats or Republicans. They are both taking us to the same place and they are not afraid of us anymore.
  32. Re:the developer should participate in system test by MadJo · · Score: 2, Insightful

    System testers have to know what the corner cases are. They can't guess them all
    That's why you need proper documentation, like use cases, technical designs. Often (and preferably) written by analists and not the developers.

    Preferably you have a setup like this:
    Business analyst writes documentation based on requirements from the business.
    Developers build the application, based on the documentation.
    Testers write testcases based on the documentation and test the software as soon as it is released to them.

    Testing is a profession too.
    And there are many tools and methodologies (TMap, ISTQB, Testframe etc) to ensure proper test-coverage and to have anything meaningful to say about the quality of the tested application.

  33. Re:the developer should participate in system test by gestalt_n_pepper · · Score: 2, Insightful

    "but, but, you're not supposed to do that".
    Yeah, that one still makes my *hair* stand up. Most devs are superb at narrow domain problem solving. Of course, reality and users tend not to accommodate them. I can't tell you how many times I've pushed the limits of a software package to get something done and it fails miserably.

    So, yes, they will have 37 instances of the software running at once and yes, they will try and save one or more projects/files with the same name at the same time and yes, no matter how many times dev says it's their fault, they're wrong. Machines are designed to accommodate people, not the other way around.

    --
    Please do not read this sig. Thank you.
  34. Re:Three non-automated test cases by Abcd1234 · · Score: 2, Insightful

    The requirements are vague, such as "difficulty of problems presented to the user must increase gradually over the course of the session," where difficulty isn't defined rigorously.

    Uh, you define the requirement. If you've written code, you've *already* done that, you've just made the requirement inaccessible as its now encoded in a programming language. Write it down first and everyone will be happier.

    The application's specification includes a physical simulation with random, pseudorandom, chaotic, or otherwise nonlinear behavior

    That's not unit testing. Most code in a simulation is *not* random, it's fed inputs from other parts of the code, which ultimately result in the behaviour you describe.

    Automating system test for something like this is interesting. First, you *must* design the code to be testable. That means being able to, for example, define random number seeds and so forth, so that a run can be reproduced.

    Second, the implicit assumption is that there is *some* way to determine, based on inputs, if the outputs of your software are correct. If you can't do that, you have far bigger problems. Of course, those tests might be fuzzy ("value should be between X and Y", "value should be greater than zero", etc), but they're still tests.

    Third, realize automated testing isn't the end-all and be-all of testing. For some systems, you will be forced to have some amount of manual testing (for example, integration testing large, complex software systems can be difficult to do in an automated fashion). That said, I'm willing to bet, for *most* systems, you can automate most if not all of the testing.

    You know your automated test suite's coverage isn't 100%, and you're doing non-automated testing to find things that your automated test suite is missing.

    Beg the question much? If your test suite is missing things, fill in the gaps. If you can't fill in the gaps, ask yourself why.