Presentation is loading. Please wait.

Presentation is loading. Please wait.

PagerDuty Integration Development

Similar presentations


Presentation on theme: "PagerDuty Integration Development"— Presentation transcript:

1 PagerDuty Integration Development

2 What can PagerDuty do

3 Schedule Auto escalation policy Support with many component, provide API for custom

4 Integrated with IMP Use API Incident Schedule Service User
Get/trigger/acknowledge/resolve Log Schedule Get on-call Service Get group User Get user

5 Design Request Response Action Entity Test Some like Facebook thrift
Different directory ; different from MVC (models, controls, views) PHPUnit

6

7 Why Request\Response Separate Request and Response that can use any Http communicate library Action put them together Entity hide all the details beyond them, so that it can switch to other data source Raise exception so that caller can deal it outside the library Thrift Domain object size Common deal

8 Test Not clear what to do, always change. Need to ensure code runs well after every change Quick test between different PagerDuty account Integrated with automated tools like CI Test example PHPUnit official link/doc/function Github source Kinds of test: functional, unit, integration, ui TDD,BDD,CDD Test case level :low/high CI, SVN, Jenkins continuous integration Selenium Phantom Online test

9 How to do PHPUnit test phpunit –coverage --bootstrap Test/Bootstrap.php Test/PagerDuty/User/ Always use boot file : define root path, const, auto load, exception handle Should not include http test, should mock it Request, response don’t have outside resource Action dose

10 Code Coverage Report xdebug

11

12 Why still have problems

13 Tips Bootstrap Namespace Exception Unit test case Annotation
Coverage test What’s a good OOP design? Why not use get(“action”)? No variable, must be const. Why exception? Do not have logger, handle in caller Auto generate test case for input/output, like mars Annotation / Reflection / Decorator Default Input Output/multiple data format Server Client Test


Download ppt "PagerDuty Integration Development"

Similar presentations


Ads by Google