Scaling TDD, CI and CD for Hardware, Firmware and Software, presented at Scaleconf 2013
© Nomanini, 2013Scalability and Hardware
View Slide
© Nomanini, 2013@dalehumbynomanini.com
© Nomanini, 2013million700 pa85$ bn60$Mobile subscribersin AfricaAve spend bymobile subscribersTotal marketSource: Pyramid Forecast for AME, McKinsey Global Institute, Lions on the move, Jan 2010
© Nomanini, 2013FastTransactionsEasy to useTrustedmethod• Fast printing• Trusted proof oftransaction• Reliable• Simple interface123ScratchcardsNomaniniterminal
© Nomanini, 2013
© Nomanini, 2013Pick nPayMTNVodacomServer onGAECashAirtimeCreditRedemptionPrintedvoucherSeller MobilesubscriberCash
© Nomanini, 2013Please add a Lock button
© Nomanini, 2013Planned Dev Test Demo UAT Package ReleasedReady Monitor
© Nomanini, 2013Cross-functional people
© Nomanini, 20138-bit CPU16 kB Flash2 kB RAM
© Nomanini, 2013KeyboardLEDDriverStateMachineLogicHardwareVdd
© Nomanini, 2013KeyboardLEDDriver RAMStateMachineLogicProxyforhardware
© Nomanini, 2013KeyBoardHelperLEDHelperDriverMocks RAMStateMachineLogicProxyforhardware
© Nomanini, 2013bool TestStateManager_LockLEDOnWhenLockPressed(void){// GIVEN Lock LED is offLED_TurnLockLEDOff();// WHEN Lock button is pressedKeyBoardHelper_PressLockButton();// AND scan keyboardStateMachine_Update();// THEN Lock LED should be onASSERT_TRUE_MESSAGE(LED_IsRedLockLEDOn(),“Red Lock LED should be on”);}
© Nomanini, 2013KeyBoardHelperLEDHelperDriverMocks RAMFALSEStateMachineLogic Test// GIVEN Lock LED is offLED_TurnLockLEDOff();
© Nomanini, 2013KeyBoardHelperLEDHelperRAMTRUEFALSEStateMachineLogic TestPressbutton// WHEN Lock button is pressedKeyBoardHelper_PressLockButton();DriverMocks
© Nomanini, 2013KeyBoardHelperLEDHelperRAMTRUETRUEStateMachineLogic TestPressbuttonUpdate// AND scan keyboardStateMachine_Update();DriverMocks
© Nomanini, 2013KeyBoardHelperLEDHelperRAMTRUETRUEStateMachineLogic TestPressbuttonUpdateAssert// THEN Lock LED should be onASSERT_TRUE_MESSAGE(LED_IsRedLockLEDOn(),“Red Lock LED should be on”);DriverMocks
© Nomanini, 2013Running All Tests...Hardware Rev 6, rel 2Firmware 2623-0d8ab4be2f02Running Test Fixture: State Manager Tests (Part A)---------------------TestStateManager_ButtonPressTimesOut:PASSTestStateManager_LockLEDOnWhenLockPressed:PASS...TestStateManager_StaysLockedWhileCharging:FAIL11 Tests 1 Failures 1 IgnoredTest Run FAILED. 10/11 tests passed.Terminal output
© Nomanini, 2013Jenkins CI
© Nomanini, 2013Started by upstream project "Slave-Build" build #361run_functional_tests.py -c ci.initests(INFO): TEST_BLOCK_1.s19 ... oktests(INFO): TEST_BLOCK_2.s19 ... oktests(INFO): TEST_BLOCK_3.s19 ... oktests(INFO): TEST_BLOCK_4.s19 ... oktests(INFO): TEST_BLOCK_5.s19 ... ok...tests(INFO): TEST_BLOCK_23.s19 ... oktests(INFO): Test run passedTriggering a new build of Upload_to_FTP_for_CI #245Notifying upstream projects of job completionFinished: SUCCESSConsole Output
© Nomanini, 2013Doneisused by customers
© Nomanini, 2013Feature flags
© Nomanini, 2013Monitoring
© Nomanini, 2013Measure everythingFind the bottlenecksFix them methodicallyStart today
© Nomanini, 2013Dale Humby[email protected]@dalehumby