If you are not sure if the website you would like to visit is secure, you can verify it here. Enter the website address of the page and see parts of its content and the thumbnail images on this site. None (if any) dangerous scripts on the referenced page will be executed. Additionally, if the selected site contains subpages, you can verify it (review) in batches containing 5 pages.
favicon.ico: opensource.net/testing-your-bash-script-6 - Prevent script bugs: Test earl.

site address: opensource.net/testing-your-bash-script-6/ redirected to: opensource.net/testing-your-bash-script-6

site title: Prevent script bugs: Test early OpenSource.net

Our opinion (on Sunday 04 October 2026 9:37:53 UTC):

GREEN status (no comments) - no comments
After content analysis of this website we propose the following hashtags:



Meta tags:

Headings (most frequently used words):

test, testing, bash, early, the, in, with, design, prevent, script, bugs, about, plan, often, final, production, fuzzy, summary, author, you, might, also, like, build, efficient, scripts, templates, journey, of, system, italia, open, for, digital, public, services, programming, part, syntax, and, tools, operators, shell, tricks, level, up, your, scripting, why, love, named, parameters, apache, groovy,

Text of the page (most frequently used words):
the (104), test (48), and (39), testing (36), that (29), for (26), code (20), this (17), with (17), you (16), #script (15), your (14), shell (13), more (12), #scripts (12), about (11), program (11), there (11), production (11), are (10), fuzzy (9), time (8), final (8), all (7), guides (7), how (7), bash (7), also (7), conditions (7), template (7), some (7), not (7), each (7), can (7), description (6), under (6), 2024 (6), posted (6), part (6), most (6), sysadmins (6), plan (6), always (6), specific (6), things (5), david (5), both (5), article (5), now (5), start (5), write (5), been (5), results (5), early (5), problems (5), random (5), unexpected (5), inputs (5), just (5), what (5), environment (5), bugs (5), would (5), development (5), source (4), articles (4), submit (4), ideas (4), open (4), learn (4), like (4), functions (4), have (4), but (4), usually (4), from (4), very (4), get (4), add (4), simple (4), input (4), any (4), plans (4), new (4), should (4), complete (4), which (4), process (4), short (4), search (4), help (3), management (3), programming (3), into (3), might (3), ensure (3), create (3), methods (3), writing (3), good (3), after (3), expected (3), beginning (3), fix (3), them (3), bit (3), they (3), other (3), programs (3), tests (3), than (3), only (3), need (3), having (3), experience (3), will (3), surprises (3), during (3), intended (3), command (3), complex (3), when (3), line (3), working (3), creating (3), adding (3), meet (3), software (3), one (3), opensource (3), net (3), supported (2), copyright (2), authors (2), license (2), creative (2), share (2), guide (2), resources (2), news (2), community (2), best (2), april (2), named (2), parameters (2), why (2), january (2), operators (2), series (2), scripting (2), tasks (2), using (2), linux (2), tools (2), processes (2), quality (2), public (2), design (2), take (2), build (2), efficient (2), templates (2), post (2), these (2), next (2), variables (2), runs (2), correct (2), set (2), sysadmin (2), flawlessly (2), extensive (2), easy (2), try (2), randomness (2), before (2), even (2), aspects (2), such (2), starting (2), high (2), think (2), apply (2), result (2), regardless (2), whether (2), negative (2), outcome (2), error (2), mode (2), much (2), until (2), data (2), see (2), known (2), constitutes (2), true (2), seems (2), dangerous (2), cases (2), has (2), least (2), discovered (2), may (2), those (2), were (2), never (2), point (2), verify (2), large (2), worked (2), cycle (2), was (2), features (2), verifying (2), work (2), option (2), function (2), move (2), require (2), previous (2), ensures (2), modify (2), needs (2), executable (2), list (2), clear (2), designed (2), tested (2), formal (2), job (2), well (2), years (2), different (2), full (2), down (2), user (2), lubarsky (2), find (2), bug (2), altogether (2), automation (2), reliable (2), prevent (2), home (2), close (2), menu (2), images, link, image, licensed, commons, attribution, alike, international, ticket, osnet, editorial, style, info, privacy, policy, subscribe, our, newsletter, contact, conduct, supply, chain, practical, internet, edge, cybersecurity, cloud, practices, artificial, intelligence, categories, initiative, michelle, buckner, use, cleaner, readable, love, apache, groovy, logical, expansions, second, multi, tricks, level, automate, computer, default, syntax, august, daniele, tabellini, three, generations, guidelines, enhance, accessibility, usability, italy, journey, system, italia, digital, services, facing, repetitive, control, dives, fundamentals, equipping, enjoyed, enjoy, view, posts, author, look, initializing, understand, benefits, own, structured, way, dived, importance, aim, variety, thorough, essential, summary, completed, certainly, surprised, users, cannot, deal, significant, its, stages, then, unlikely, better, catch, while, relatively, stage, useful, locating, masked, dealing, combinations, options, selected, low, memory, levels, cpu, contending, multiple, instances, utilize, generates, output, defines, positive, success, still, controlled, specified, message, failure, son, broke, game, less, minute, pretty, ended, attempts, games, him, term, sound, randomly, hitting, keys, something, breaks, intentionally, feeding, invalid, reacts, allegedly, practice, recognition, along, long, strangers, revised, moved, becomes, ultimate, critical, nothing, testers, dream, fully, replicate, yes, considered, normal, desirable, tester, myself, reasonable, wait, say, rigorous, dedicated, choice, because, six, months, harmful, troutman, postulates, huh, wrong, expect, ready, spend, fixing, doing, functioning, earlier, broken, added, changed, later, back, produce, outputs, handle, where, entering, takes, extra, sometimes, simply, prints, intermediate, wrote, case, internal, executes, entered, once, body, comments, document, steps, required, specifications, requirements, stated, comment, probably, initialized, section, becoming, created, trivial, helps, started, properly, outset, portions, standard, does, soon, first, portion, file, often, give, keep, fairly, informal, described, below, pass, fail, handles, outcomes, desired, procedures, follow, name, being, sample, documents, found, online, searches, organizations, although, people, their, title, don, chaotic, dependent, here, consider, including, suit, middle, ground, written, consistency, run, detail, depends, upon, lots, formats, range, head, few, notes, jotted, sheet, paper, forms, functional, accomplish, perform, right, following, defined, contribute, consistent, goes, beyond, finding, actually, fixes, hardware, actions, friendly, interface, every, another, pops, worst, law, cybernetic, entomology, goal, various, explores, through, implementing, encountered, deliberately, minimized, skipped, interest, meeting, schedules, pointy, haired, bosses, let, talk, administrator, belt, seen, proper, neglected, done, rush, sixth, ensuring, correctly, taught, tutorial, grows, complexity, too, potential, pitfalls, catching, errors, saves, frustration, incorporating, identify, snowball, leading, robust, bulletproof, key,


Text of the page (random words):
prevent script bugs test early opensource net menu search menu opensource net home about submit your ideas or articles search close search for search opensource net close home about submit your ideas or articles guides resources prevent script bugs test early posted by by david both may 7 2024 write bulletproof shell scripts learn key testing methods for reliable automation as your shell script grows in complexity so too do the potential pitfalls catching errors early in the development process saves time and frustration down the line by incorporating testing from the beginning you can identify and fix problems before they snowball leading to a more robust and reliable script this is the sixth post in a tutorial series on automation with shell scripts learn about ensuring that your program runs correctly the previous one taught you how to build efficient scripts with templates let s talk about testing in my experience as a linux administrator with years of testing under my belt i ve seen proper testing for shell scripts get neglected altogether or done in a rush i ve also encountered cases in which testing was deliberately minimized or skipped altogether in the interest of meeting the pointy haired bosses schedules as a sysadmin my goal is to write shell scripts that work flawlessly under various conditions this article explores different testing methods and guides you through implementing them about testing there is always one more bug lubarsky s law of cybernetic entomology lubarsky is correct you can never find all the bugs in your code for every bug i find there always seems to be another that pops up usually at the worst time testing is not just about programs testing goes beyond just finding bugs in the code it s also about verifying that the script actually fixes the problems it s designed for regardless of the source hardware software or even unexpected user actions testing also ensures the script is user friendly and has a clear interface following a well defined process when writing and testing shell scripts can contribute to consistent and high quality results my process is simple create a simple test plan start testing right at the beginning of development perform a final test when the code is complete move to production and test more the test plan there are lots of different formats for test plans i ve worked with the full range from having it all in my head to a few notes jotted down on a sheet of paper to a complex set of forms that require a full description of each test which functional code it would test what the test would accomplish and what the inputs and results should be after years of experience now i try to take the middle ground having at least a short written test plan will ensure consistency from one test run to the next how much detail you need depends upon how formal your development and test functions are the sample test plan documents i found with my online searches were complex and intended for large organizations with very formal development and test processes although those test plans would be good for people with test in their job title they don t apply well to sysadmins more chaotic and time dependent working conditions as in most other aspects of the job sysadmins need to be creative so here s a short list of things to consider including in your test plan modify it to suit your needs the name and a short description of the software being tested a description of the software features to be tested the starting conditions for each test the procedures to follow for each test a description of the desired outcome for each test specific tests designed to test for negative outcomes tests for how the program handles unexpected inputs a clear description of what constitutes pass or fail for each test fuzzy testing which is described below this list should give you some ideas for creating your test plans most sysadmins should keep it simple and fairly informal test early test often i always start testing my shell scripts as soon as i complete the first portion that is executable this is true whether i am writing a short command line program or a script that is an executable file i usually start creating new programs with the shell script template that we created in the previous article i write the code for the help function and test it this is usually a trivial part of the process but it helps me get started and ensures that things in the template are working properly at the outset at this point it s easy to fix problems with the template portions of the script or to modify it to meet needs that the standard template does not once the template and help function are working i move on to creating the body of the program by adding comments to document the programming steps required to meet the program specifications now i start adding code to meet the requirements stated in each comment this code will probably require adding variables that are initialized in that section of the template which is now becoming a shell script this is where testing is more than just entering data and verifying the results it takes a bit of extra work sometimes i add a command that simply prints the intermediate result of the code i just wrote and verify that for more complex scripts i add a t option for test mode in this case the internal test code executes only when the t option is entered on the command line final testing after the code is complete i go back to do a complete test of all the features and functions using known inputs to produce specific outputs i also test some random inputs to see if the program can handle unexpected input final testing is intended to verify that the program is functioning as intended a large part of the final test is to ensure that functions that worked earlier in the development cycle have not been broken by code that was added or changed later in the cycle if you have been testing the script as you add new code to it you may think there should not be any surprises during the final test wrong there are always surprises during final testing always expect those surprises and be ready to spend time fixing them if there were never any bugs discovered during final testing there would be no point in doing a final test would there testing in production huh what not until a program has been in production for at least six months will the most harmful error be discovered troutman s programming postulates yes testing in production is now considered normal and desirable having been a tester myself this seems reasonable but wait that s dangerous you say my experience is that it s no more dangerous than extensive and rigorous testing in a dedicated test environment in some cases there is no choice because there is no test environment only production sysadmins are no strangers to the need to test new or revised scripts in production any time a script is moved into production that becomes the ultimate test the production environment constitutes the most critical part of that test nothing that testers can dream up in a test environment can fully replicate the true production environment the allegedly new practice of testing in production is just the recognition of what sysadmins have known all along the best test is production so long as it is not the only test fuzzy testing the term fuzzy testing might sound like randomly hitting keys until something breaks but there s more to it it s about intentionally feeding the program unexpected or invalid data to see how it reacts fuzzy testing is a bit like the time my son broke the code for a game in less than a minute with random input that pretty much ended my attempts to write games for him most test plans utilize very specific input that generates a specific result or output regardless of whether the test defines a positive or negative outcome as a success it is still controlled and the inputs and results are specified and expected such as a specific error message for a specific failure mode fuzzy testing is about dealing with randomness in all aspects of the test such as starting conditions very random and unexpected input random combinations of options selected low memory high levels of cpu contending with other programs multiple instances of the program under test and any other random conditions that you can think of to apply to the tests i try to do some fuzzy testing from the beginning if the bash script cannot deal with significant randomness in its very early stages then it is unlikely to get better as you add more code this is a good time to catch these problems and fix them while the code is relatively simple a bit of fuzzy testing at each stage is also useful in locating problems before they get masked by even more code after the code is completed i like to do some more extensive fuzzy testing always do some fuzzy testing i have certainly been surprised by some of the results it is easy to test for the expected things but users do not usually do the expected things with a script summary in this article we ve dived into the importance and methods of testing the shell scripts we write as a sysadmin i aim to create code that functions flawlessly under a variety of conditions this is why thorough testing is an essential part of writing good scripts now that you understand the benefits it s time to create your own test plan and start testing the bash script template in a structured way next up we ll look at initializing variables to ensure that your program runs under the correct set of conditions author david both view all posts share this article you might also like if you enjoyed this post you might also enjoy these guides build efficient bash scripts with templates sysadmins facing repetitive tasks take control with bash scripting this guide dives into the fundamentals equipping posted by david both april 18 2024 community management news the journey of design system italia open design for digital public services three generations of guidelines tools and processes to enhance accessibility usability and quality in italy s public posted by daniele tabellini august 1 2024 guides programming with bash part 1 syntax and tools learn how to automate tasks on your computer using bash the default shell for most linux posted by david both january 23 2024 guides bash operators shell tricks level up your scripting learn about logical operators and shell expansions in the second article in this multi part series on posted by david both january 25 2024 guides why i love named parameters in apache groovy how i use named parameters for cleaner more readable code posted by michelle buckner april 23 2024 supported by the open source initiative categories artificial intelligence best open practices cloud management community management cybersecurity edge guides internet of things news practical open source resources supply chain about code of conduct contact us subscribe to our newsletter privacy policy help info osnet editorial style guide submit ticket submit your ideas or articles all articles are copyright of the authors and licensed under a creative commons attribution share alike 4 0 international license images are copyright of the authors license and link to source in the image description supported by
Thumbnail images (randomly selected): * Images may be subject to copyright.GREEN status (no comments)
  • David Both
  • Design system .italia

Verified site has: 32 subpage(s). Do you want to verify them? Verify pages:

1-5 6-10 11-15 16-20 21-25 26-30 31-32


Top 50 hastags from of all verified websites.

Supplementary Information (add-on for SEO geeks)*- See more on header.verify-www.com

Header

HTTP/1.1 301 Moved Permanently
Server nginx
Date Sun, 04 Oct 2026 09:37:52 GMT
Content-Type text/html
Content-Length 162
Connection keep-alive
Location htt????/opensource.net/testing-your-bash-script-6/
Alt-Svc clear
Server-Timing a8c-cdn, dc;desc=cdg, cache;desc=BYPASS;dur=1.0
HTTP/2 200
server nginx
date Sun, 04 Oct 2026 09:37:53 GMT
content-type text/html; charset=UTF-8
strict-transport-security max-age=31536000
vary Accept-Encoding
host-header wpcloud
vary accept, content-type, cookie
x-pingback htt????/opensource.net/xmlrpc.php
link <htt????/opensource.net/wp-json/>; rel= htt????/api.w.org/
link <htt????/opensource.net/wp-json/wp/v2/posts/2468>; rel= alternate ; title= JSON ; type= application/json
link <htt????/opensource.net/?p=2468>; rel=shortlink
last-modified Sun, 04 Oct 2026 09:37:53 GMT
cache-control max-age=300, must-revalidate
x-nananana Batcache-Set
content-encoding gzip
x-ac 2.ams _atomic_ams MISS
alt-svc clear
server-timing a8c-cdn, dc;desc=ams, cache;desc=MISS;dur=902.0

Meta Tags

title="Prevent script bugs: Test early OpenSource.net"
charset="UTF-8"
name="viewport" content="width=device-width, initial-scale=1.0"
name="robots" content="max-image-preview:large"
name="msapplication-TileImage" content="htt????/i0.wp.com/opensource.net/wp-content/uploads/2025/03/cropped-favicon.png?fit=270%2C270&ssl=1"
id="bilmur" property="bilmur:data" content="" data-provider="wp.cloud" data-service="pressable.com" data-custom-props='{"wpcomsp":"1","woo_active":"0"}' data-site-tz="Europe/Brussels" data-site-v="a4e47b48f47e3c059e331f50633088f2"

Load Info

page size106650
load time (s)0.957242
redirect count1
speed download25507
server IP 199.16.173.71
* all occurrences of the string "http://" have been changed to "htt???/"