Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Case Studies in Terrible Testing

Case Studies in Terrible Testing

Projects fail because they don’t test. Some fail because they test the wrong things. Others fail because they test too much. In this session, an enterprise consultant turned startup entrepreneur will share project case studies in testing atrocities and what can be learned from them. You’ll come away questioning your own testing. Check your dogma and let’s build better software.

Check out TrackJS JavaScript Error Monitoring
https://trackjs.com/javascript?utm_source=slides&utm_medium=speakerdeck&utm_term=testing

Todd Gardner

April 13, 2015
Tweet

More Decks by Todd Gardner

Other Decks in Technology

Transcript

  1. Assertion-Free Testing public void Test_MyObj_For_Coverage() { MyObj obj = new

    MyObj(); try { obj.method1(); } catch (Exception e) {} try { obj.method2(); } catch (Exception e) {} try { obj.method3(); } catch (Exception e) {} // 100% Coverage, W00t! }
  2. They all had their rules… 1. Thou shall test everything

    2. Thou shalt not ship code 3. Thou shall have more sys 4. Thou shall abstract test f 5. Thou shalt not duplicate
  3. Testing the Mocks public void Test_MyObj_With_Mocks() { Mock<MyObj> mockObj1 =

    new Mock<MyObj>(); Mock<OtherObj> mockObj2 = new Mock<OtherObj>(); MyObj obj = new MyObj(mockObj1, mockObj2); mockObj2.expect().toBeCalledWith(mockObj1).andReturn(mockObj1); obj.method(); mockObj1.assertExpectations(); mockObj2.assertExpectations(); // What are we testing again? }
  4. System Tests Integration Tests Unit Tests Selenium UI and Services

    Inter-Module Contract Tests TDD, Conversation-based tests Testing Pyramid
  5. System Tests Integration Tests Unit Tests Testing Pyramid Interface Risk

    Orchestration Risk Functional Risk User Tests Market Risk
  6. Interface Risk Orchestration Risk Functional Risk Market Risk Testing Scales

    System Tests Integration Tests User Tests Unit Tests
  7. Monolith ECommerce Acme Collaboration Information Technology Uninteresting Fragile Technology Poorly

    Tested Success! Engineering Advancing Latest Technology Well Tested Failure!
  8. Interface Risk Orchestration Risk Functional Risk Market Risk Testing Scales

    System Tests Integration Tests User Tests Unit Tests