談談最早的軟體測試

Jersey Su
5 min readOct 13, 2020

--

That’s one small step for “a” man, one giant leap for mankind. — Neil Alden Armstrong

Apollo 11

今天早上 Daily 完, 跟 RZ 還有 Salagado 在閒聊軟體測試的歷史, 聊一聊後想想, 不如把這題也丟到 Twitter 上面好了.

沒想到引出了 @BugHunterSam 跟 @TestingWithFun 來留言, 緊接者, 就開啟了一長串的對話, 最後 @BugHunterSam 也發了一篇文記錄. 真是有意思的過程.

Sam’s Tweet

究竟, 195x 左右的人是怎麼測試軟體的呢?

說起軟體測試的歷史, 讓我們回朔到 195x ~ 196x 那個美國和蘇聯的太空競賽時代, 兩國都想把太空人送到太空. 在美國有兩個重要的計畫 (Project Mercury, Apollo-11), 這些計畫同時也需要太空人及科學家們投入大量的軟硬體測試, 因為他們沒有第二次機會, 必須做出 Bug-Free 的軟體, 甚至必須拿生命在 Testing In Production. 做登月計劃的同時, 他們也發展出良好的軟體開發的實踐, 並確立了今日軟體開發流程.

先不談太空計畫的細節, 從 NASA 釋出的 MERCURY PROJECT SUMMARY (NASA SP-45) 可以看出幾個跟軟體開發及測試相關的守則.

  • Building block approach to testing. Each component was verified before integration testing.
  • End-to-end testing. The use of mocks and substitutes was minimized.
  • Isolation and functional verification of all redundancies. All code paths were proven with end-to-end tests.
  • Interface testing and verification. All interfaces were consistent.
  • Mission profile simulation. The astronauts were involved with real user testing.

對比到現在的軟體開發及測試的流程, 是不是很熟悉呢? 此外, 另一件讓我眼睛發亮的是在文獻中也記載了 Test Preparation, Quality Assurance, Failure Analysis, Troubleshooting 等在軟體開發維運中幾個重要的環節.

Rapid feedback of test results and failure analyses to design and manufacturing personnel was necessary and led to the increase of inspection and on-the-spot failure analysis. — NASA SP-45

在另外一篇文獻中 (Computers in Spaceflight: The NASA Experience), 也簡單的定義了軟體開發的週期: design, coding, testing, and maintenance. 更能對比到現今的軟體開發. 其中也有一大篇幅在講解 Verification and Validation.

如果你/妳對 Apollo-11 的 Source Code 有興趣. 去翻翻它吧!

今非昔比, 我們不需要再花大錢建立太空機櫃作整個 End-To-End test, 取而代之, 有各種各式各樣的工具能夠幫助我們完成 CI, Unit, End To End, Mock Test. 倘若世界上已經有這麼方便的工具箱放在我們眼前, 你/妳還在等什麼呢?

馬上就開始寫一支測試程式吧!

[同場加映]

Jerry Weinberg 專訪

https://testingpodcast.com/tag/jerry-weinberg/

--

--

Jersey Su

我是哲西, 熱愛測試 I am Jersey, I love Software Testing!!!