Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

New answers tagged


The terms "test harness" and "test bed" have been used in relation to automated software tests. I've heard these as far back as 1999. They go much further back, and they come from hardware engineering, probably. I haven't heard these term in any recent conversations about software, though.


To differentiate between tests expressed in a form of source code, and tests expressed as manual instructions to be executed by humans, you can use the term “automated tests,” as opposed to “manual tests.” Both terms are frequently used, including in the debate about whether all tests should be automated or not. When it comes to your second distinction, I'm ...


First, in the shown case, it makes no sense to introduce an explaining variable since using the function directly is equally readable, so you could write: function hello(suffix) { if (isSuffixString(suffix)) { return `Hello ${suffix}` } else { return 'Invalid entry' } } However, if you need the result of a function call more than once, it ...


This is probably a matter of personal tastes. I have several verb prefixes that I use for functions. In your case I'd use check. For me, a function like check...() must always return true or false (or raise an exception), and must be idempotent. So I would write, const checkedIsSuffixString = checkIsSuffixString(suffix) if (checkedIsSuffixString) { // ...


How about incorporating the implication into your flip value rather than a meaningless "lower" or "upper"? ActionThreshold and WarningThreshold. Whether the implication would be effective above or below could differ but should be clear from context.


If metric is lower than upperThreshold, then Warning. If metric is lower than lowerThreshold, then Action. [For cases when bigger is better.] I propose this naming scheme. Prefix "minimum" for metrics where larger value is better. Prefix "maximum" for values where smaller values is better. Suffix "recommended" for warning thresholds. Suffix "...

Top 50 recent answers are included