{"id":649,"date":"2013-06-05T22:06:40","date_gmt":"2013-06-06T05:06:40","guid":{"rendered":"http:\/\/angryweasel.com\/blog\/?p=649"},"modified":"2013-06-06T07:26:51","modified_gmt":"2013-06-06T14:26:51","slug":"coding-testing-and-the-a-word","status":"publish","type":"post","link":"https:\/\/angryweasel.com\/blog\/coding-testing-and-the-a-word\/","title":{"rendered":"Coding, Testing, and the &ldquo;A&rdquo; Word"},"content":{"rendered":"<p>I frequently go days at work without writing code. On many days, I do \u201ctypical\u201d test activities (seeing what works, what doesn\u2019t work, etc.) Some days I\u2019m debugging all day. Other days, I\u2019m sifting through the perl and batch scripts that bolt our build process together. On other days, I\u2019m managing projects, tweaking excel, or trying not to cause too many problems in SQL. This afternoon, at least after lunch, was coding time \u2013 and probably the first extended code time I\u2019ve had in a few weeks.<\/p>\n<p>Without too many boring details, I had a backlog item to write a service to automatically launch a memory analysis tool and periodically take snapshots of memory allocations in specified processes. The memory analysis tools (which I also <s>wrote<\/s> adapted from another project) work really well, but need a lot of manual intervention in order to get accurate data. I wrote a quick \u201cspec\u201d on my whiteboard, wrote tests as I went along, and in about four hours I had it up and running successfully. I\u2019m confident that the service will make it much easier for our team to find and isolate memory issues. To me, writing this tool was a <i>testing activity<\/i>. It doesn\u2019t test anything, but certainly makes testing of the product much easier.<\/p>\n<p>On my drive home, I was pondering the universe (and my day) and remembered that there\u2019s a sad bit of truth in the software world. It\u2019s a fallacy that causes great confusion. It promotes poor strategies, bad hiring decisions, and endless confusion among management, contributors, and consultants. It may very well be the most misunderstood word in the world of software. It\u2019s the \u201cA\u201d word that is practically ruining testing.<\/p>\n<p>Automation.<\/p>\n<p>Yes \u2013 as much as I hate them, I used a one word paragraph. I did it because the abuse and misuse of \u201cautomation\u201d in testing is causing too many smart people to do too many dumb things. That said, I suppose an explanation is in order.<\/p>\n<p>Once upon a time, someone noticed that testers who knew how to code (or coders who knew how to test) were doing some wicked-cool testing. They had tools and stress tests and monitoring and analysis and they found great bugs that nobody else could find \u2013 \u201cTest Developers\u201d were all the rage\u2026so we (the industry) hired more of them. Not much later (and possibly simultaneously), someone else decided that testers who could code could <i>automate<\/i> all of the tasks that the silly testers who didn\u2019t code <i>used<\/i> to do. Instead of finding really cool bugs, coding testers were now <i>automating<\/i> a bunch of steps previously done manually. Not to be left out, UI automation frameworks began to sprout, with a promise that \u201canyone can automate \u2013 <i>even a tester<\/i>.\u201d Now, test teams can spend the bulk of their time maintaining and debugging tests that <i>never should have been automated in the first place.<\/i><\/p>\n<p>And that was the first step into darkness.<\/p>\n<p>This mindset, although common, kills me: <\/p>\n<ul>\n<li>Testers who code write automation <\/li>\n<li>Automation is primarily made up of a suite of user tasks <\/li>\n<li>Automation is primarily done through the GUI <\/li>\n<\/ul>\n<p>All of these items are, in my opinion, idiotic &#8211; and likely <em>harmful<\/em> to software quality. It focuses test teams in the wrong place and is, frankly, insulting to testers who know coding. <\/p>\n<p>If you\u2019re a tester who writes code (or a coder who cares about testing), try this: <\/p>\n<ul>\n<li>Write tools that help you find important bugs quickly <\/li>\n<li>Write a few high level tests that ensure user actions \u201cwork\u201d, but leave most of it for exploratory testing, user testing (assuming you have great monitoring tools), or both. <\/li>\n<li>If you must write GUI tests for the above, write fewer of them (that way you\u2019ll spend less time investigating their flaky behavior).\n<\/p>\n<\/li>\n<\/ul>\n<p>If you\u2019re a tester who writes code, you\u2019re not a test automator, you\u2019re not a test automation engineer, and you don\u2019t write test automation or test code.<\/p>\n<p>You write code. And you test.<\/p>\n<p>You write code that helps the product get out the door sooner. And if the code you write (or the testing you do) doesn\u2019t help the product, why are you doing it in the first place?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I frequently go days at work without writing code. On many days, I do \u201ctypical\u201d test activities (seeing what works, what doesn\u2019t work, etc.) Some days I\u2019m debugging all day. Other days, I\u2019m sifting through the perl and batch scripts that bolt our build process together. On other days, I\u2019m managing projects, tweaking excel, or&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[1],"tags":[],"class_list":["post-649","post","type-post","status-publish","format-standard","hentry","category-allposts"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_likes_enabled":true,"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/angryweasel.com\/blog\/wp-json\/wp\/v2\/posts\/649","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/angryweasel.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/angryweasel.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/angryweasel.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/angryweasel.com\/blog\/wp-json\/wp\/v2\/comments?post=649"}],"version-history":[{"count":0,"href":"https:\/\/angryweasel.com\/blog\/wp-json\/wp\/v2\/posts\/649\/revisions"}],"wp:attachment":[{"href":"https:\/\/angryweasel.com\/blog\/wp-json\/wp\/v2\/media?parent=649"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/angryweasel.com\/blog\/wp-json\/wp\/v2\/categories?post=649"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/angryweasel.com\/blog\/wp-json\/wp\/v2\/tags?post=649"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}