??????????????????????????????????????????????????????????????????????????????????
??????????????о??????????????????????????·?????????
???????????????
??????????????????岻????????侭??????:??漲??????????????в???????????????????????????????????????????????????????????????
???????????????
?????????????????????????????????????
????1.????/????????
????2.???/???????(?????г???)
????3.???/???/??в???(??????????????????????)
????4.??????????????????
??????????????????????????????????????????????????Χ??????????????????????????????????????????????????????????????????????????????????(??????)????:
????Unit Testing
????Integration Testing
????Functional Testing
????Smoke Testing
????E2E Testing
????Regression Testing
????Acceptance Testing
????Exploratory Testing
????Performance Testing
????Infrastructure Testing
???????????????????????????????????????????
????Test Pyramid(????????????)
???????????????Mike Cohn??????????????????????-?????????????????????????????????????????Ρ?
????????Martin Fowler???????????????£?????????????д??????????????????????????????
?????????????????????????????UI/??????????????????????????????????edge case????
??????????????????happy path???????????????????????????????BDD????????????Cucumberд???????????
??????????????????????????????????????С????????????з???????????Jenkins Slave????????У????????????併?????С??????
????Unit Testing(???????)
????????????????????????????????????????????????????????д??????????????:
???????????????У?????????С
???????????????????????????????????????
???????????????????С??????????????λ?????
???????????????????????????????????????????????????λ?????????????????????????????????£?????????????????????????????????????????????κε??????е????????????????????????
?????????????????????????????????????????????????????????(Functional Level Unit Testing)??????????????????????????????????
????????????????????????????????飬?????????????????????????????js??????????70%-90%?????????????Щ??????????????????????д?????????????80%
??????????ò????????????????????????????????????????κ???????????????test case????????????ò???????????
??????????????????????????????????????????????
????TDD(????????????)
???????????????ò?????TDD???????????????????????????????д??????????д????????????????:
????1.д????????У????(??)
????2.?????????в???????(??)
????3.????????в???????(??)
?????????TDD?????????????????????????????????????????
??????????????????TDD???????????????????tasking??????story?????????С??test case?????????????裬С???????
?????????????????????TDD???????????????а??????????????????????????????????????????????????
???????????????????????????з???á?
??????TDD???????????????????????????ú????????????????????????????????????й????????
????????“????TDD????????”??????????????У????????????????????ò???TDD????????????????
????????????????TDD????????????????????(???θ?>????)???????????????????????????????????
???????????????????飬?????????????????????????????
???????????????ú???????????????DHH(Rails????????)????????TDD is Dead?????????Uncle Bob????????Martin Fowler????????е???????????????????????????????????????????????????????????????????????????????????"Long Live The Testing"??????????????
????????????TDD??????????????Щ???????????????????????????????????t??????????T-DD?????????
????Integration Testing(???????)
?????????????????????????в????????A????B??飬???????????????????Mock????Stub????????????????????????????????A?????B??????????????????????????
????????????????????????????У?????????????????????????????????????????????????
??????????????????????????????£?????????????????Pact Testing??????????????Pact?????CDC - Consumer driven contracts?????????
???????????????????Consumer?????????Provider??????????????????:
????Consumer?????????Provider??API??????????????????????????????в????????pact(json)?????????push??Provider??repo??
????Provider CI????Pact????????API?????????????????
????Provider????????????Pact??????????Restful API???Input/Output???????????????????
??????Pact????ж????????????????ruby?? Java/Scala???
????Functional Testing
??????????????????????????????????web???????????????????????????????????????????Ruby
????????????cucumber????в??????????????????Capybara??Webdriver/Selenium???????????ò???
????BDD - Behavior Driven Development??
????BDD
????BDD????????????????????Business Readable DSL??????????????????????????????????????
????Cucumber????????????????????????????:
????Given I am a super user
????When I log in the website
????Then I should see "Admin" on the top right
????????????step??д?ЩAssertion???????ж????????????
??????????????????????BDD??????????????????:
??????????????????????????????дCucumber????
???????в????????????д???????????
???????е???????????????????????????
????????Cucumber????????
???????1-4??????????????
???????????????????????????????????BDD???????????BA?????????????????д???????????????????BA
?????????????????????Щ?????д???????????????????д??????????????????????????????????????
??????????(???Cucumber????????Happy Path)?????2????????????????????????в????????????????
??????seed?Щ?????????????????????????Щ??
?????????????к???BA????Story??Acceptance Criteria?У???????д???????????????????????????????
????д??Cucumber?????step??????????????????BA??QA??????Role???????????????????????BDD??……??
????Smoke Testing(e?????)
????e???????????????????????????????????
????E2E Testing(????????)
?????????????????????????????????????е???????????????????????????????????????????????
????????????????????cover????????????????????????????????????????????????????????
????????Щ?????????????????????????в?????????????????????????????汾???????E2E???????
??????????????????鷳??????????ù??????EC2????????????????????-_-!
????Regression Testing(??????)
????????????????????????????????е?????????????y????£????????????????£????????????????:
????1.Feature Toggle
????2.Feature Branch
???????????????1???????????????
????Feature Toggle???????????????????????/????????ж???????????????????????????????????????if/else??ж???????????????
?????????????????????????????????????????????е?????????????????????/????????????????д???toggle????????????£?
???????????????????????????????toggle???????????????????д???????????????????????Toggle??????????Progression?????
???????enable????toggle???1?????????????????????????????????????????????????????????????
????Feature Branch?????μ?Branch??????1????????????????merge????????????merge hell???????????????????
??????????Feature Toggle?????Щ?????????ò???????Toggle??
????Acceptance Testing(???????)
???????????????????????????????????У???business people??show case???????????е??????????????????????OK??story???????????done???
????Exploratory Testing(????????)
?????2????????????????????????????????????????????????Щ?????bug??????ò????????????
????????Σ???????????bug??
????Performance Testing(???????)
????dark release ?????????????????????????ó????????????????????粢??????????????????
????ab??Jmeter?? Gattling???Jmeter
?????о????????鷳??Gattling?????Scala????????????????
????Infrastructure Test(???????????????)
????????????????????????????????????????????????Tech Radar??
????????DevOps?????????"Infrastructure as Code"????????????? ???“?????????????”????????
??????Щ?????????????????????????????????puppet ?? chef????????Babushka???ServerSpec???????sysadmin?????TDD?????
????????????????????????????????????? ????:
????Chaos Monkey??NetFlix??????????????
?????????????????????????????????AWS???Щ???????????????????????????????Щ???
?????????????????????????????????????????????????????????
????Nagios?????????????????????????????????????????????????????????
??????????Gomez???????????????????????
????????????????????CDN?????????????????????????д?????????????????????????CDN???????????Щ?????Header?????????
???????????????
?????????????????????bug??????δ??????????????????????????????
??????λ????
????????bug???????д??????????
??????????????
???????/??????????/???????/??????????
????????
????????????????????????????????????????????????????????????????