8

There is a plethora of tools available for engineers to test their code these days. However, frameworks like Mocha.js came around only in 2011 with the ascent of NPM. So I wonder what were the practices around software design a few decades ago?

closed as too broad by Cody Gray, George Phillips, a CVn, JAL, Stephen Kitt Jul 13 '17 at 8:36

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 5
    Today, you seem to have a "commonly acknowledged recipe for successful software development" for any type of software - Before ~2000, these recipes had to be developed by the development teams themselves and were handed down from team lead to team lead. And, obviously, the recipes very much varied in quality and usability. When I started as a software development engineer in 1986, my that time manager (EE by trade) asked me why we "put so much effort into testing" and not just simply "did it right in the first place"... – tofro Jul 9 '17 at 16:57
  • 3
    Welcome to Retrocomputing. I have a sneaking suspicion that this might be too broad - things weren't really standardised in the late 80s / early 90s as things were written low-level and that changes relatively quickly. Unfortunately, if you didn't have background experience already, you wouldn't have known that the answer was big - if you had the experience you wouldn't be asking the question. – wizzwizz4 Jul 9 '17 at 17:32
  • 4
    19xx is a very long time period. In 1994 the company I worked at had a very extensive set of regression tests for its products, but the framework for them was developed in house. Though it wasn't developed in a vacuum, it was based on other test environments the developers were familiar with. The DejaGNU test framework dates back to 1993, though I'm not sure how much use it outside of Cygnus got back then. – Ross Ridge Jul 9 '17 at 20:14
  • 2
    Go back far enough and there weren't "units" to test with unit testing. There were programs that had known (or known range) inputs, and expected (acceptable) outputs, and known out-of-bounds inputs with expected error outputs. The program was run against those and the output compared to the expected results. Pass/Fail. As hotpaw2 says, "conformance tests" were how it was done. (That's how I still do it 90% of the time, and on a smaller scale, that's all unit test are anyway.) – Gypsy Spellweaver Jul 10 '17 at 0:36
  • 2
    "Testing? What's that? If it compiles, it is good; if it starts up, it is perfect." (paraphrasing Linus Torvalds) – snips-n-snails Jul 10 '17 at 21:27
9

Back when I started in the late 1980's, we still had test suites and test cases. It's just that all the tests were carried out by hand. Unit tests were pretty much unheard of - the developer just did some ad hoc testing before checking his (it usually was a he) code in. Then there was formal testing that was structured into several tiers.

You had your module tests, perhaps integration tests, functional tests, system tests and finally (you hoped) acceptance tests. Sometimes there were also user tests, but showing the system to the users before it was ready was sometimes considered politically sensitive. One system in particular stands out. I worked on the first British computerised passport issuing system. The office staff who were then still writing out passports by hand, were kept completely out of the loop during development because it was feared they'd all go on strike or something. In the end, they did anyway and, as a result of not consulting the users, basic mistakes were made in design of the user interface.

Anyway, on that particular project, we designed the individual modules using a technique called JSP (Jackson Structured Programming). We drew our JSP diagrams and then we converted that into a special kind of pseudo code. We'd use the JSP diagram to enumerate all of the possible paths through the code and produce a series of test scripts from that. Then (and this is the first step done not with pen and paper) we typed the pseudo code as comments in an empty Cobol source file and wrote the code between the comments. Then we would run the test scripts.

The other types of tests were made by reference to a test plan and the functional specification. There would, for example, be a section in the functional specification that described the facility to enter a new passport application from an application form. You would examine that and write a series of test cases - probably filling in real application forms - and then you'd create a test script for the tester to follow (note: all of this is being done by hand, you wrote the scripts out with pen and paper and sent them to the typing pool to be typed). An army of testers would then run the tests and raise defect reports for when they went wrong.

The whole process from start to finish was unbelievably tedious, especially the module tests, which meant, of course, that they were frequently not done as well as they might be. Hence, it was not unusual to find fairly basic bugs even as late as acceptance testing. Once the system was delivered and in support, regression testing was an unattainable fantasy. The support team simply didn't have the resources to run through the mountain of paper rerunning the functional tests.

For those who are interested, the above system was written for Tandem Non Stop Cyclone systems which were designed with redundant hardware for maximum uptime. One of the system tests involved physically pulling a CPU module out of the rack while the system was running to simulate a hardware failure. The software was mostly written in Cobol talking to ISAM files at the back end. It ran in a transaction process monitor and the UI was written in a Cobol like screen definition language whose name I forget.

  • It's weird as I definitely did have test data and when I was doing chip design work we had lots of test code that did unit,regression and integration tests of the chips but not for the code running them. I can't think why we didn't make the leap to TDD... – PeterI Jul 11 '17 at 10:44
  • @PeterI yes, it is weird. On that project, we could easily have automated module testing because the business logic was well separated from the UI so we could have written a test harness to feed test data to the Cobol modules and inspect the results. But we never thought of it. – JeremyP Jul 11 '17 at 10:50
  • I've done that, pulled out a CPU module (and a power supply, and a memory module, ...) from a Tandem computer. Lots of fun. – Ross Ridge Jul 12 '17 at 4:19
6

By late 1983, Apple developers had developed an almost complete Apple Macintosh OS and were working on software for it.

MacWrite and MacPaint were pretty much feature complete but still needed a lot of testing, especially in low memory conditions. MacPaint needed to allocate three off-screen buffers, with each the size of the entire screen, so it was always skirting the edge of running out of memory, especially when you brought up a desk accessory, but the specific sequences that led to crashes were difficult to reproduce.

This lack of memory meant that there was not enough memory for a large testing program, nor a large set of test-cases. Steve Capps, whilst working on the Guided Tour disk, realised that the underlying system that powered the playback of pre-recorded actions could be used as the basis for one of the first GUI fuzzers: the Monkey.

The Monkey was a small desk accessory that used the journaling hooks to feed random events to the current application, so the Macintosh seemed to be operated by an incredibly fast, somewhat angry monkey, banging away at the mouse and keyboard, generating clicks and drags at random positions with wild abandon. It had great potential as a testing tool, so Capps refined it to generate more semantically rich events, with a certain percentage of the events as menu commands, a certain percentage as window drags, etc.

For more information and the source of these quotations, see Folklore.org: Monkey Lives.

  • 2
    The PalmOS development kit came with an Emulator that allowed the use of Gremlins, a test feature that constantly injected random (but reproducible) UI events into the application, very much like a typing monkey. (artnetweb.com/gh/palm_emulator/UsingPOSE.pdf ), Page 44. – tofro Jul 10 '17 at 19:36
  • 2
    I have never tried to expose them to water or feed them after midnight, though. – tofro Jul 10 '17 at 19:41
  • I wonder if that's why Netflix named their similar testing tool for injecting random events into networked infrastructure the "Chaos Monkey". – Brian H Jul 12 '17 at 3:26
6

Admittedly, your question is way too broad - Even today, that question cannot be answered for the bandwidth of what commonly qualifies as "software". Embedded Software requires (and required) an entirely different test strategy and, obviously, the approach to testing safety-critical software like a moon lander will be entirely different from that of a home computer game.

When I started developing software in 1986, I was working on a satellite payload system for telemetry and range finding. That system was entirely developed on IBM PCs that had a number of Z-80 daughter boards (the target system was Z80-based). The entire system was module tested on the PC that emulated the on-board connectivity. There was only one single "real" target system that was heavily guarded for safety and confidentiality issues and only accessible after a long-winding procedure after passing quite a number of (physical) gates. That system was normally used only for integration and acceptance tests. What you did was feed your software running on the Z80 boards with proper stimuli from the PC using small (PC) assembler programs and hope you'd get the right results out of the simulated base station comms. If something didn't work, you'd start a CP/M debugger to remotely debug the Z80 software on the boards. You didn't have any symbol support or even symbolic debugging, but rather worked with large piles of paper from the linker map file and assembler source code, single-stepping instruction by instruction. Paper was generally much more important to programming than it is today. The teams were also much smaller that they probably are today - On that whole system, only 4 developers were working for about a year. As there was no way to on-board-update the software in case you found an error after launch (or a simple way to recall the system for a quick factory fix... Anything that was invented by then would have involved a crater...), the system had a number of very space-limited "patch areas" (empty static RAM pages that were kept as reserve to be able to replace faulty software with small "backpack" routines) and testing was really nearly half of the development effort if I remember right.

On another job some years later, we were working on technical GUI software - There was no such thing as automated testing for GUIs, even less than on the satellite payload - All testing would be done by hand (and mouse!) according to "user stories" (what a modern term...) that were documented in huge piles of paper (again) with expected input or output. After such a story, a database script was run to see whether the database contents looked like expected, and that was the only "automated testing" we had. We also didn't have a dedicated test team - for the bi-yearly product releases, development was simply shut down for a month or so and all hands were called in to do a number of incremental test sessions, document the results (again on paper) and then fixed the bugs you found. At least, nobody was normally assigned to test something they had not written themselves, so you had the chance to see parts of the software you weren't aware they were existing before that.

In another job, I was working on the control software for large spinning machines - We had a cut-down "real machine" (just cut down in size so that each sensor/actor/motor on the real thing was actually present at least once) in the middle of the office that could be (and was) used for testing. The software was developed on OS/9 development systems (PCs with 68k cards, embedded systems and some Atari STs (!) running OS/9) and then tested on the machine. Main testing was, however, done by finding out whether the various sub-systems that were communicating with each other over RS-232 lines exchanged the expected messages - so your most important testing tool was the protocol analyzer.

5

IIRC, there were conformance tests (input decks with known outputs) back in the day of FORTRAN programs on punched cards.

4

Agree with tofro, a broad question with no simple answer and depends on how critical the application was and the budget.

c1982, writing assembler (2650) for a TV video games console, if the game could be played and no-one could crash it, make it do something odd, or get strange displays or sounds, then it was good to go. For the most part if anything at all was amiss the output would be total garbage and easy to spot, but there wasn't much technology available to find the cause.

c1985, again writing assembler but for a system with 12 6809 processors. Algorithms were developed in psuedo-code, then I wrote and thoroughly tested code for each psuedo-code structure (ie IfThenElse, ForN=x->y etc) before converting the algorithms to code. This unit fed data to a minicomputer, and the guy who was writing the code for that created test beds for the unit. These two components were part of a much larger communications loop, but I never got any feedback from system integration and field testing.

Not the answer you're looking for? Browse other questions tagged or ask your own question.