Upload
derek-chan
View
9
Download
0
Tags:
Embed Size (px)
Citation preview
AgendaBatch Process Management
• Problems. • Job Scheduling Framework, Quartz.NET• What’s Next.
Developer Testing• Unit testing. • End to end testing.
Problems• No Automated Deployment
• Developer spend more time in deployment.• Cumbersome Error Log Analysis
• Support team having difficulties in troubleshooting.
Solution - “Job Scheduling Framework"• Quartz.NET, Open Source• Port of Java Scheduling Framework, Quartz.• Set up as Windows Service.
Download & Set-up Put in your job Your job is ready
Solution for Cumbersome Error Log Analysis• Quartz.NET with Common Logging Framework
Integration.• Send logging messages to Centralised Logging
Framework (ELK Stack).
Quartz.NET Features• Provide API method to interact with main
scheduler.• Support job execution on any .NET class that
implements the generic interface.
Quartz.NET Scheduling• Flexible triggers and rules
with Cron Expressions.• Time Zone specific
schedulers.• http://www.cronmaker.com/
Job Scheduler’s ParametersJob Parameter Remark
JobItemClassName Job namespace and class name . It have to be unique among the Job Item. Example: “Speakgeek.Session” that will accept topic name as parameter
Cron Schedule For Cron Schedule go to http://www.cronmaker.com/ to generate the expressionExample: “0 0 8 1/1 * ? *” – Run every day start from 8am
File Path Your dll, exe file location, beware of the securityExample: “C:\Speakgeek\speakgeek.dll or speakgeek.exe”
Argument Custom argument that you can pass to the jobExample: topic name :“BatchProcess, ContinouesIntegration”
HandleMisFire Misfired rule such as • Execute misfired immediately• Do nothing
What’s Next• Expose Quartz.NET as Web Service
• Campaign Scheduler • Reporting Scheduler
• Clustering in Quartz.NET
Benefits of Quartz.NET• Low Set-up Time and Cost• Flexibility in Job Scheduling • Ease of Integration• Maintainability with Centralised Logging
Framework• Scalability with Clustering
Helpful Links• Quartz.NET Official Website
• http://www.quartz-scheduler.net/
• Cron Maker• http://www.cronmaker.com/
• Cron Maker Tutorial• http://www.quartz-scheduler.org/documentation/quartz-1.x/tutorials/crontrigger
• Common Logging .NET• https://github.com/net-commons/common-logging
• Geeks with Blogs with detail walkthrough • http://bit.ly/1dzCwgA
Unit Testing
Unit testing framework
Unit testablecode Mocking Methodology
xUnit AutofacMEF
NSubstituteMockQ
Test Driven Development
Unit testing framework
Unit testablecode Mocking Methodology
Working!• Legacy code• Inexperienced
• Static object• Refactoring• Time consuming
No one knows TDD in a proper way
1st round: Result
http://epkulbld02:8080/view/360%20KUL/job/360%20%28T%29%20BUILD-TEST/
End to end (E2E) testing
Verify that a system meets external requirements and
achieves its goals, testing the entire system, from end to end
Unit vs Integration vs E2E testing
Stimulate real user scenarios.
End to endtesting
Takes a small group of units (2 units), tests their behaviour as a
whole
Integrationtesting
Test a small piece of the product in
isolation
Unittesting
The Benefits of SpecFlow
Standard way of defining test case Reusable Human
understandable
Hide awayimplementation
details
Less require tech knowledge
http://epkulbld02:8080/view/360%20KUL/job/360%20Api%20%28T%29%20TEST%20QaBeta/
The Testing Pyramid
• Fast• Reliable • Isolate failure
Need initialization, slower
• Stimulate real user • Take longer time
• Take longer time Manual tests
E2E tests
Integration tests
Unit tests
Number of tests
Journey thus Far
Start small
Having experienced guides
Motivation
Communication
What we’ve learn
Increase code coverage
Implement unit test for defects / enhancements
Where we’re heading to
Automate performance testing