This document discusses testing telephony applications. It notes that telephony applications are long-running code with inputs that may be more or less constrained, and many things can happen concurrently. It recommends using the same testing tools like RSpec, but also following principles like single responsibility per class and immutable/shared objects. The document outlines different levels of testing from integration to functional to unit, and provides examples for testing concurrency.
Dont Try Kotlin on The Backend or You'll Get HookedAlex Fedorov
If you are from Java Back-end world, you think, what is up with all the Kotlin buzz. In this talk, you'll learn why lots of smart developers are making the switch, how easy it is to make that switch, and what is so special about this one comparing to other "promising" JVM languages.
If you come from other JVM alternative (like Scala), you think: Hey we already have all these features. How is this different? It is much easier to adopt. In this talk, you'll learn, what you wish your fantastic programming language had too!
Software Engineering Thailand: Programming with ScalaBrian Topping
Meet-up, May 28, 2015, Launchpad, Bangkok. http://www.meetup.com/Software-Engineering-Thailand/events/222548484/.
Apologies for the rendering quality not matching the presentation, I did these with Apple Keynote and Slideshare does not support this format. I will try to edit them when there is more time.
Thanks to Bangkok LaunchPad (https://www.facebook.com/launchpadhq) for generously hosting this event!
A presentation I gave on Refactoring for the RIA Unleashed conference in 2011 up in Boston.
Video References:
Winston Wolfe - I Solve Problems form Pulp Fiction
http://www.youtube.com/watch?v=DO0d7dpA-K8
And the ready scene from The Last Samurai:
http://www.youtube.com/watch?v=QE3yMEfpk6E
Clan code is extremely essential to build scalable application which can be maintained quite easily and improved further
Slide was prepared with contribution to my colleague
and i thank them for the help!
Aki Salmi - Refactoring legacy code: a true story @ I T.A.K.E. Unconference 2...Mozaic Works
Talk delivered by Aki Salmi at I T.A.K.E. Unconference in Bucharest, 2014.
The presentation shows two example cases of introducing new features to the project. The first is a story of adding a search criteria to a list of 15 parameters.
The other example is total refactoring of handling files transferred to the system using FTP. It included both changes to the supported file types and the structure of the code.
In both examples, the end results are highlighted from both maintainability perspective and from business perspective.
Dont Try Kotlin on The Backend or You'll Get HookedAlex Fedorov
If you are from Java Back-end world, you think, what is up with all the Kotlin buzz. In this talk, you'll learn why lots of smart developers are making the switch, how easy it is to make that switch, and what is so special about this one comparing to other "promising" JVM languages.
If you come from other JVM alternative (like Scala), you think: Hey we already have all these features. How is this different? It is much easier to adopt. In this talk, you'll learn, what you wish your fantastic programming language had too!
Software Engineering Thailand: Programming with ScalaBrian Topping
Meet-up, May 28, 2015, Launchpad, Bangkok. http://www.meetup.com/Software-Engineering-Thailand/events/222548484/.
Apologies for the rendering quality not matching the presentation, I did these with Apple Keynote and Slideshare does not support this format. I will try to edit them when there is more time.
Thanks to Bangkok LaunchPad (https://www.facebook.com/launchpadhq) for generously hosting this event!
A presentation I gave on Refactoring for the RIA Unleashed conference in 2011 up in Boston.
Video References:
Winston Wolfe - I Solve Problems form Pulp Fiction
http://www.youtube.com/watch?v=DO0d7dpA-K8
And the ready scene from The Last Samurai:
http://www.youtube.com/watch?v=QE3yMEfpk6E
Clan code is extremely essential to build scalable application which can be maintained quite easily and improved further
Slide was prepared with contribution to my colleague
and i thank them for the help!
Aki Salmi - Refactoring legacy code: a true story @ I T.A.K.E. Unconference 2...Mozaic Works
Talk delivered by Aki Salmi at I T.A.K.E. Unconference in Bucharest, 2014.
The presentation shows two example cases of introducing new features to the project. The first is a story of adding a search criteria to a list of 15 parameters.
The other example is total refactoring of handling files transferred to the system using FTP. It included both changes to the supported file types and the structure of the code.
In both examples, the end results are highlighted from both maintainability perspective and from business perspective.
Presenting Adhearsion at ClueCon 2012. Big announcement: with the release of Adhearsion 2.1.0 we now support FreeSWITCH for the first time! Official release announcement at http://mojolingo.com/blog/2012/adhearsion-and-freeswitch-its-about-time/
Now Hear This! Putting Voice, Video, and Text into Ruby on RailsMojo Lingo
When you want to talk to someone, where do you turn? Skype? Slack or HipChat? Maybe even an old-fashioned telephone? As great (or not) as these are, they all fail in one important way: Context. As developers, why don’t we enable our users to communicate where they are doing everything else, right inside the browser or mobile app? The technology to make contextual communications is evolving quickly with exciting technologies like WebRTC, speech recognition and natural language processing. This talk is about how to apply those building blocks and bring contextual communication to your apps.
Presented at RailsConf 2015 in Atlanta, GA
Presenting Adhearsion at ClueCon 2012. Big announcement: with the release of Adhearsion 2.1.0 we now support FreeSWITCH for the first time! Official release announcement at http://mojolingo.com/blog/2012/adhearsion-and-freeswitch-its-about-time/
Now Hear This! Putting Voice, Video, and Text into Ruby on RailsMojo Lingo
When you want to talk to someone, where do you turn? Skype? Slack or HipChat? Maybe even an old-fashioned telephone? As great (or not) as these are, they all fail in one important way: Context. As developers, why don’t we enable our users to communicate where they are doing everything else, right inside the browser or mobile app? The technology to make contextual communications is evolving quickly with exciting technologies like WebRTC, speech recognition and natural language processing. This talk is about how to apply those building blocks and bring contextual communication to your apps.
Presented at RailsConf 2015 in Atlanta, GA
Learn the best QA / Testing Tools, Automation Testing tools and techniques Online & Classroom Training from the industry experts at Magnitia IT.
https://www.magnitia.com/testing-courses.html
INtelligrape Provides agile tsolution to programming quesries. With its team of experienced software programmers, we are capablle of working on various languages.
Spock testing gives you the option of testing your grails application with accurate results.
The tutorial includes a Testing overview, understanding how unit Testing works, brief about Spock Unit Testing, Writing Unit test cases, Demo & exercise. The tutorial begins with a section which gives an overview on Testing. It includes the reason to test a program, a way of thinking about testing and also includes integral development through testing like unit testing, integration testing, functional testing, acceptance testing. The overview section is followed by the Understanding section. It includes understanding unit testing, disadvantages of unit testing like test cases, advantages of unit testing like facilitating changes, simplifying integration, evolving design etc.
Afterward comes a section about Spock Testing. It includes a brief about Spock Testing, basics about Spock Testing, specifications of Spock Testing. The next section is a brief about Unit test cases. It includes Writing Unit test cases like fields like declarations, fixture methods for setting up the environment, blocks like setup, expect, where, expert block and an example.
The last section of this tutorial is about the exercises on Testing. This section can also be called Data driven Testing and includes data tabes which are a feature method, data pipes which connect a data variable to a data provider, @unroll which has its iterations reported independently, exception conditions which tell us about when a block should throw an exception, mocking which is used for implementing objects, test mixins which enhance the behavior of a typical JUNIT, test for annotations which is a class under test, mock annotations which create a mock version of any collaborators, cardinality describes how often a method call is expected and at last stubbing which is an act to respond to the method calls.
An intro to Test Driven Development for Developers and Non-Developers - covering some basics of TDD and ATDD. Presented to UXPA Cleveland at OverDrive on February 27, 2014
Lessons Learned in Test Automation From ZombielandMatt Barbour
This presentation will tell you how to apply the rules for surviving the zombie apocalypse to surviving your own zombie apocalypse - end to end testing on real devices.
https://www.youtube.com/watch?v=9IShc6tfj2E
This presentation outlines the philosophy, concepts and tools your team needs to completely test drive your products efficiently, from the front end down. It will define what unit tests and TDD are, and cover acceptance testing and ATDD with Cucumber, behavior driven development (BDD) and various test structures, mock objects, and fluent matchers.
This is an intermediate conversion course for C++, suitable for second year computing students who may have learned Java or another language in first year.
From a Joomla Day Midwest presentation, this focuses on unit testing in the open source Joomla project. The slides wrap around two demonstrations that cannot be included here.
No Show 2012 - Heather Decker-Davis and Luke Dicken - Procedural ProcessesNo Show Conference
Creating the number of levels that players are coming to expect from casual games can be a daunting task for small teams – especially when you factor in replayability and difficulty progression. In this session, Luke Dicken and Heather Decker-Davis detail the process of developing “Easy Money?”, a casual game that relies on procedural level generation. The goal of the session is to showcase some techniques that have been learnt across the whole development process. Not only will the mechanics of Artificial Intelligence system driving the generation of fun and engaging levels be explored, but also how using this approach impacted both the design decisions of the project, as well as the artistic direction. The experiences related in the session should enable teams to apply similar methodologies in their own projects and have greater success wrangling this increasingly necessary topic, which can otherwise be fraught with peril.
In this session, attendees can expect to learn about the ways that implementing procedural content generation can affect your overall workflow, your approaches to early implementation and prototyping and importantly the manner in which you iterate your designs. Although all of this will be presented in the context of the development of “Easy Money?”, the lessons imparted are intended to be generally applicable.
This presentation talks about Natural Language Processing using Java. At Museaic, a music intelligence platform, we spent time figuring out how to extract central themes from song lyrics. In this talk, I will cover some of the tasks involved in natural language processing such as named entity recognition, word sense disambiguation and concept/theme extraction. I will also cover libraries available in java such as stanford-nlp, dbpedia-spotlight and graph approaches using WordNet and semantic databases. This talk would help people understand text processing beyond simple keyword approaches and provide them with some of the best techniques/libraries for it in the Java world.
Leandro Melendez - Switching Performance Left & RightNeotys_Partner
Since its beginning, the Performance Advisory Council aims to promote engagement between various experts from around the world, to create relevant, value-added content sharing between members. For Neotys, to strengthen our position as a thought leader in load & performance testing. During this event, 12 participants convened in Chamonix (France) exploring several topics on the minds of today’s performance tester such as DevOps, Shift Left/Right, Test Automation, Blockchain and Artificial Intelligence.
ConnectJS 2015: Video Killed the Telephone StarMojo Lingo
When you want to talk to someone, where do you turn? Skype? Slack or HipChat? Maybe even an old-fashioned telephone? As great (or not) as these are, they all fail in one important way: Context. As developers, why don’t we enable our users to communicate where they are doing everything else, right inside the browser or mobile app The technology to create contextual communications is evolving quickly with exciting technologies like WebRTC. This talk is about how to use WebRTC with Rails to enhance almost any application with voice, video & text. We will cover some of the ways communications can be best employed, including design considerations, as well as available Open Source projects. We will feature a recently released Rails Engine called Talking Stick that makes adding WebRTC to any Rails app a snap.
AstriCon 2015: WebRTC: How it Works, and How it BreaksMojo Lingo
WebRTC is an exciting new technology, perhaps the most exciting thing to happen to voice communication since the invention of Voice over IP. With WebRTC, we are no longer limited to a disjointed communication experience with poor quality audio on antiquated networks. Now we have the ability to put high-definition audio and video where it will have the most impact: right in line with the business processes that benefit the most from it.
This session will present an overview of how WebRTC works, reviewing both the network services that support it and the user-facing software that delivers it. We will look at how Asterisk can be used to give WebRTC additional capabilities that aren’t possible with browsers alone, and how to deploy Asterisk to get the most out of this powerful combination.
As with all new technology, however, there are rough edges. In the final part of this presentation, we will look at the common ways that WebRTC can break down, from technical deployment problems to user interface and design issues. These lessons are drawn from real-world experience deploying WebRTC over the last 3 years and multiple applications that are in production today.
FreeSWITCH, FreeSWITCH Everywhere, and Not A Phone In SightMojo Lingo
That smartphone in your pocket has already replaced your watch, your camera, several volumes of books, whatever music device you may carry, and even in many ways your desktop computer. As technology continues to gobble up and replace legacy devices with ever smaller hardware and ever more capable software, why are we still stuck with a DTMF keypad? As the task of communicating continues to move on to the web and into apps, what will happen to the PSTN.
Today big carriers like AT&T are making plans to finally shut down the copper networks entirely. Let’s talk about the role of FreeSWITCH in this future world, and how can it enable the next generation of communications applications.
In the film “Her” the protagonist falls in love with his computer, an artificial intelligence operating system. While most of us already love Asterisk, things really get interesting when we give Asterisk a voice, and the ability to listen to our instructions.
Fortunately for us, Asterisk has impressive capabilities for adding speech recognition and text-to-speech to our calls. This talk will cover many facets of speech applications with Asterisk. We will look at the various commercial and open source speech engines available, as well as how to integrate them into Asterisk. We will look at ways prompts and grammars can be designed to give the caller the best possible experience. We will hear samples of the right and hilariously wrong ways speech can be used. We will cover the various types of speech recognition that exist today (grammar-driven, transcription, hotword and voice biometrics) and how each should be applied.
Finally, we’ll show how these pieces come together to make it possible to build something that (for a brief moment) passes as intelligent. Maybe.
Tipping the Scales: Measuring and Scaling AsteriskMojo Lingo
In this presentation delivered at AstriCon 2014, we look at answering the question: "Does Asterisk scale?!" The answer is nuanced. The presentation includes terminology and tools, as well as some notes on methodology. In the final few slides, we look at several ways Asterisk is employed (B2BUA, transcoding, conferencing, recording) and the impact each feature has on scaling Asterisk. Using the tools and methodologies presented here, I encourage everyone to test their own voice applications and answer the question for themselves: Does It Scale?!
Hear how to develop and implement WebRTC using the new IETF and W3C standards. This session will overview the concepts and structure of WebRTC and how it is defined in the emerging standards. The session will bring everyone up to a clear understanding of WebRTC for the technical discussions in the next session.
This workshop will include specific examples of how to code and create real-time interactions. The session will be interactive, allowing for open and clear discussion.
Opening presentation given at AdhearsionConf 2013. This talks about a vision for the future of the Adhearsion project as well as the future of real-time communications applications.
An overview of the technology options for adding speech to web applications. It covers the HTML5 Speech Input API for speech recognition, using the Audio tag with 3rd party APIs for text-to-speech, and an overview of WebRTC application possibilities.
Presented at the Atlanta Ruby Users Group meeting on November 13, 2013.
An overview of the current state of WebRTC - what it is and how it works. Also included are several example applications showing why WebRTC matters and how it may be deployed in the future.
Transcript: Selling digital books in 2024: Insights from industry leaders - T...BookNet Canada
The publishing industry has been selling digital audiobooks and ebooks for over a decade and has found its groove. What’s changed? What has stayed the same? Where do we go from here? Join a group of leading sales peers from across the industry for a conversation about the lessons learned since the popularization of digital books, best practices, digital book supply chain management, and more.
Link to video recording: https://bnctechforum.ca/sessions/selling-digital-books-in-2024-insights-from-industry-leaders/
Presented by BookNet Canada on May 28, 2024, with support from the Department of Canadian Heritage.
State of ICS and IoT Cyber Threat Landscape Report 2024 previewPrayukth K V
The IoT and OT threat landscape report has been prepared by the Threat Research Team at Sectrio using data from Sectrio, cyber threat intelligence farming facilities spread across over 85 cities around the world. In addition, Sectrio also runs AI-based advanced threat and payload engagement facilities that serve as sinks to attract and engage sophisticated threat actors, and newer malware including new variants and latent threats that are at an earlier stage of development.
The latest edition of the OT/ICS and IoT security Threat Landscape Report 2024 also covers:
State of global ICS asset and network exposure
Sectoral targets and attacks as well as the cost of ransom
Global APT activity, AI usage, actor and tactic profiles, and implications
Rise in volumes of AI-powered cyberattacks
Major cyber events in 2024
Malware and malicious payload trends
Cyberattack types and targets
Vulnerability exploit attempts on CVEs
Attacks on counties – USA
Expansion of bot farms – how, where, and why
In-depth analysis of the cyber threat landscape across North America, South America, Europe, APAC, and the Middle East
Why are attacks on smart factories rising?
Cyber risk predictions
Axis of attacks – Europe
Systemic attacks in the Middle East
Download the full report from here:
https://sectrio.com/resources/ot-threat-landscape-reports/sectrio-releases-ot-ics-and-iot-security-threat-landscape-report-2024/
UiPath Test Automation using UiPath Test Suite series, part 4DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 4. In this session, we will cover Test Manager overview along with SAP heatmap.
The UiPath Test Manager overview with SAP heatmap webinar offers a concise yet comprehensive exploration of the role of a Test Manager within SAP environments, coupled with the utilization of heatmaps for effective testing strategies.
Participants will gain insights into the responsibilities, challenges, and best practices associated with test management in SAP projects. Additionally, the webinar delves into the significance of heatmaps as a visual aid for identifying testing priorities, areas of risk, and resource allocation within SAP landscapes. Through this session, attendees can expect to enhance their understanding of test management principles while learning practical approaches to optimize testing processes in SAP environments using heatmap visualization techniques
What will you get from this session?
1. Insights into SAP testing best practices
2. Heatmap utilization for testing
3. Optimization of testing processes
4. Demo
Topics covered:
Execution from the test manager
Orchestrator execution result
Defect reporting
SAP heatmap example with demo
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
Essentials of Automations: Optimizing FME Workflows with ParametersSafe Software
Are you looking to streamline your workflows and boost your projects’ efficiency? Do you find yourself searching for ways to add flexibility and control over your FME workflows? If so, you’re in the right place.
Join us for an insightful dive into the world of FME parameters, a critical element in optimizing workflow efficiency. This webinar marks the beginning of our three-part “Essentials of Automation” series. This first webinar is designed to equip you with the knowledge and skills to utilize parameters effectively: enhancing the flexibility, maintainability, and user control of your FME projects.
Here’s what you’ll gain:
- Essentials of FME Parameters: Understand the pivotal role of parameters, including Reader/Writer, Transformer, User, and FME Flow categories. Discover how they are the key to unlocking automation and optimization within your workflows.
- Practical Applications in FME Form: Delve into key user parameter types including choice, connections, and file URLs. Allow users to control how a workflow runs, making your workflows more reusable. Learn to import values and deliver the best user experience for your workflows while enhancing accuracy.
- Optimization Strategies in FME Flow: Explore the creation and strategic deployment of parameters in FME Flow, including the use of deployment and geometry parameters, to maximize workflow efficiency.
- Pro Tips for Success: Gain insights on parameterizing connections and leveraging new features like Conditional Visibility for clarity and simplicity.
We’ll wrap up with a glimpse into future webinars, followed by a Q&A session to address your specific questions surrounding this topic.
Don’t miss this opportunity to elevate your FME expertise and drive your projects to new heights of efficiency.
Securing your Kubernetes cluster_ a step-by-step guide to success !KatiaHIMEUR1
Today, after several years of existence, an extremely active community and an ultra-dynamic ecosystem, Kubernetes has established itself as the de facto standard in container orchestration. Thanks to a wide range of managed services, it has never been so easy to set up a ready-to-use Kubernetes cluster.
However, this ease of use means that the subject of security in Kubernetes is often left for later, or even neglected. This exposes companies to significant risks.
In this talk, I'll show you step-by-step how to secure your Kubernetes cluster for greater peace of mind and reliability.
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
Generating a custom Ruby SDK for your web service or Rails API using Smithyg2nightmarescribd
Have you ever wanted a Ruby client API to communicate with your web service? Smithy is a protocol-agnostic language for defining services and SDKs. Smithy Ruby is an implementation of Smithy that generates a Ruby SDK using a Smithy model. In this talk, we will explore Smithy and Smithy Ruby to learn how to generate custom feature-rich SDKs that can communicate with any web service, such as a Rails JSON API.
Key Trends Shaping the Future of Infrastructure.pdfCheryl Hung
Keynote at DIGIT West Expo, Glasgow on 29 May 2024.
Cheryl Hung, ochery.com
Sr Director, Infrastructure Ecosystem, Arm.
The key trends across hardware, cloud and open-source; exploring how these areas are likely to mature and develop over the short and long-term, and then considering how organisations can position themselves to adapt and thrive.
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Albert Hoitingh
In this session I delve into the encryption technology used in Microsoft 365 and Microsoft Purview. Including the concepts of Customer Key and Double Key Encryption.
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Tobias Schneck
As AI technology is pushing into IT I was wondering myself, as an “infrastructure container kubernetes guy”, how get this fancy AI technology get managed from an infrastructure operational view? Is it possible to apply our lovely cloud native principals as well? What benefit’s both technologies could bring to each other?
Let me take this questions and provide you a short journey through existing deployment models and use cases for AI software. On practical examples, we discuss what cloud/on-premise strategy we may need for applying it to our own infrastructure to get it to work from an enterprise perspective. I want to give an overview about infrastructure requirements and technologies, what could be beneficial or limiting your AI use cases in an enterprise environment. An interactive Demo will give you some insides, what approaches I got already working for real.
4. How Telephony Testing Is Different
• Apps are long-running code
• Inputs may be more constrained (DTMF)
5. How Telephony Testing Is Different
• Apps are long-running code
• Inputs may be more constrained (DTMF)
• Or they may be less constrained (IM, Voice)
6. How Telephony Testing Is Different
• Apps are long-running code
• Inputs may be more constrained (DTMF)
• Or they may be less constrained (IM, Voice)
• Lots of things are happening concurrently
7. How Telephony Testing Is Different
• Apps are long-running code
• Inputs may be more constrained (DTMF)
• Or they may be less constrained (IM, Voice)
• Lots of things are happening concurrently
• External call interactions (conf, barge)
8. How Telephony Testing Is Different
• Apps are long-running code
• Inputs may be more constrained (DTMF)
• Or they may be less constrained (IM, Voice)
• Lots of things are happening concurrently
• External call interactions (conf, barge)
• XMPP Events
10. How Telephony Testing Is Familiar
• Same Tooling: rspec, mocha, cucumber,
factory_girl, guard, rcov, rake
11. How Telephony Testing Is Familiar
• Same Tooling: rspec, mocha, cucumber,
factory_girl, guard, rcov, rake
• Still draw lines between M, V and C
12. How Telephony Testing Is Familiar
• Same Tooling: rspec, mocha, cucumber,
factory_girl, guard, rcov, rake
• Still draw lines between M, V and C
• Good class design is important
13. How Telephony Testing Is Familiar
• Same Tooling: rspec, mocha, cucumber,
factory_girl, guard, rcov, rake
• Still draw lines between M, V and C
• Good class design is important
14. How Telephony Testing Is Familiar
• Same Tooling: rspec, mocha, cucumber,
factory_girl, guard, rcov, rake
• Still draw lines between M, V and C
• Good class design is important
• It’s Just Ruby
17. Philosophy: SRP
• Single Responsibility Principle
• If you need to use “and” to describe the
purpose of a class, you are probably
breaking this rule
18. Philosophy: SRP
• Single Responsibility Principle
• If you need to use “and” to describe the
purpose of a class, you are probably
breaking this rule
• SRP is key to making classes testable
20. SRP Example
• Class purpose: “To
schedule calls and to
place them”
21. SRP Example
• Class purpose: “To
schedule calls and to
place them”
• Testing requires mocking
methods within the same
class
22. SRP Example
• Class purpose: “To
schedule calls and to
place them”
• Testing requires mocking
methods within the same
class
• Non-trivial work to swap
calling mechanism
32. Philosophy: Prefer/Share Immutable
• Methods should only use passed-in data
• Avoid instance vars or other shared state
• Especially helpful with concurrent code
33. Philosophy: Prefer/Share Immutable
• Methods should only use passed-in data
• Avoid instance vars or other shared state
• Especially helpful with concurrent code
• ... but makes testing in general easier
55. Functional Testing
• Test just one unit in isolation
• Typical unit is a single class
• Test function of class
but do not make
assertions about
internal state
58. Unit Testing
• Most common form of testing
• Test that a given unit (typically: method)
behaves the way you expect
59. Unit Testing
• Most common form of testing
• Test that a given unit (typically: method)
behaves the way you expect
• Make sure to test:
60. Unit Testing
• Most common form of testing
• Test that a given unit (typically: method)
behaves the way you expect
• Make sure to test:
• Valid inputs
61. Unit Testing
• Most common form of testing
• Test that a given unit (typically: method)
behaves the way you expect
• Make sure to test:
• Valid inputs
• Invalid inputs
62. Unit Testing
• Most common form of testing
• Test that a given unit (typically: method)
behaves the way you expect
• Make sure to test:
• Valid inputs
• Invalid inputs
• Error Conditions
68. Testing Concurrency
• Design with a concurrency model or library
• Celluloid, EventMachine
• Use State Machines to guarantee sequence
69. Testing Concurrency
• Design with a concurrency model or library
• Celluloid, EventMachine
• Use State Machines to guarantee sequence
• Mock non-blocking dependent operations
with blocking mocks
70. Testing Concurrency
• Design with a concurrency model or library
• Celluloid, EventMachine
• Use State Machines to guarantee sequence
• Mock non-blocking dependent operations
with blocking mocks
• Always provide a timeout
74. Can You Hear Me Now?
Tackling Testing Telephony Ben Klang
bklang@mojolingo.com
spkr8.com/t/12971 @bklang Github/Twitter
Thanks to Ben Langfeld for his
assistance with this presentation
@benlangfeld