A workshop to demonstrate how we can write unit tests in python, and how we can refactor jupyter notebooks to be modular and tested.
Code: https://github.com/davified/unit-testing-workshop
Automatisiertes Testen von Software in C++ (mit dem Test Framework Google Test)Florian Wolters
German slides that give a overview about developer tests in the C++ programming language. It tries to underline the dependencies between software design, clean code, software quality and the software testing activity itself.
Machen Tests der graphischen Oberfläche (GUI) überhaupt Sinn für mich? Wie wähle ich das richtige Tool aus? Welche Art von GUI-Tests möchte ich automatisieren? Diese und sieben weitere Fragen werden in dieser Präsentation beantwortet.
Automatisiertes Testen von Software in C++ (mit dem Test Framework Google Test)Florian Wolters
German slides that give a overview about developer tests in the C++ programming language. It tries to underline the dependencies between software design, clean code, software quality and the software testing activity itself.
Machen Tests der graphischen Oberfläche (GUI) überhaupt Sinn für mich? Wie wähle ich das richtige Tool aus? Welche Art von GUI-Tests möchte ich automatisieren? Diese und sieben weitere Fragen werden in dieser Präsentation beantwortet.
This presentation walks the reader through implementing a simple web application and its tests using Python, Flask, and the Pytest testing framework. Emphasis is placed on following the process of test-driven development (TDD) in creating the application.
This presentation walks the reader through implementing a simple web application and its tests using Python, Flask, and the Pytest testing framework. Emphasis is placed on following the process of test-driven development (TDD) in creating the application.
Property-based testing an open-source compiler, pflua (FOSDEM 2015)Igalia
By Katerina Barone-Adesi.
Discover property-based testing, and see how it works on a real project, the pflua compiler.
How do you find a lot of non-obvious bugs in an afternoon? Write a property that should always be true (like "this code should have the same result before and after it's optimized"), generate random valid expressions, and study the counter-examples!
Property-based testing is a powerful technique for finding bugs quickly. It can partly replace unit tests, leading to a more flexible test suite that generates more cases and finds more bugs in less time.
It's really quick and easy to get started with property-based testing. You can use existing tools like QuickCheck, or write your own: Andy Windo and I wrote pflua-quickcheck and found a half-dozen bugs with it in one afternoon, using pure Lua and no external libraries.
In this talk, I will introduce property-based testing, demonstrate a tool for using it in Lua - and how to write your own property-based testing tool from scratch, and explain how simple properties found bugs in pflua.
(c) 2015 FOSDEM VZW
CC BY 2.0 BE
https://archive.fosdem.org/2015/
● What is Unit Testing?
● Benefits
● What is Test Driven Development?
● What is Behavior Driven Development?
● Categories of (Unit) Tests / Software Testing
Pyramid, Frameworks
● C++, Java, .NET, Perl, PHP frameworks
● Unit-testing Zend Framework application
One of the main hindrances to teams being able to respond rapidly to new features are technical problems resulting from bad coding practices, also known as technical debt. Melissa and Brett will cover Agile tools and practices that help development teams write better code and increase maintainability. Topics that will be covered include:
Pair programming
Automated Unit Testing
Refactoring
Test-Driven Development
Agile Architecture
Tired of doing upfront test script creation in your testing efforts? Feeling bad for demotivating your testers? Want something to replace this sickening approach to software testing? This presentation outlines why test scripts are not useful, and how test ideas are the new way forward to better testing. Coverage, traceability, reporting, automation and skills are all covered. Take a quick look and see if you can see there is another way to do software testing that is actually pure common sense.
Developer Tests - Things to Know (Vilnius JUG)vilniusjug
There are many great talks that discuss challenges developers face when writing software tests. In this talk let's look at test design problems that may seem to be simple but yet fundamentally important and often misunderstood even by experienced programmers.
Test Driven Development en Go con Ginkgo y GomegaSoftware Guru
Esta sesión está constituida por dos partes: en la primera explicaré en qué consiste el test driven development y cómo funciona a grandes rasgos; posteriormente mostraré ejemplos de cómo se puede implementar en el lenguaje de programación Go utilizando el framework Ginkgo y la biblioteca de afirmaciones Gomega.
Presentation from RTP AEM / CQ5 Meetup by Sagar Sane. This presentation provides some of the challenges and benefits of applying Test Driven Development principles to Adobe Experience Manager (AEM)/CQ5 based projects and overview of some of the tools and technologies, including Spock & Geb, which can be used for automating test cases & execution.
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.
Essentials of Automations: The Art of Triggers and Actions in FMESafe Software
In this second installment of our Essentials of Automations webinar series, we’ll explore the landscape of triggers and actions, guiding you through the nuances of authoring and adapting workspaces for seamless automations. Gain an understanding of the full spectrum of triggers and actions available in FME, empowering you to enhance your workspaces for efficient automation.
We’ll kick things off by showcasing the most commonly used event-based triggers, introducing you to various automation workflows like manual triggers, schedules, directory watchers, and more. Plus, see how these elements play out in real scenarios.
Whether you’re tweaking your current setup or building from the ground up, this session will arm you with the tools and insights needed to transform your FME usage into a powerhouse of productivity. Join us to discover effective strategies that simplify complex processes, enhancing your productivity and transforming your data management practices with FME. Let’s turn complexity into clarity and make your workspaces work wonders!
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...SOFTTECHHUB
The choice of an operating system plays a pivotal role in shaping our computing experience. For decades, Microsoft's Windows has dominated the market, offering a familiar and widely adopted platform for personal and professional use. However, as technological advancements continue to push the boundaries of innovation, alternative operating systems have emerged, challenging the status quo and offering users a fresh perspective on computing.
One such alternative that has garnered significant attention and acclaim is Nitrux Linux 3.5.0, a sleek, powerful, and user-friendly Linux distribution that promises to redefine the way we interact with our devices. With its focus on performance, security, and customization, Nitrux Linux presents a compelling case for those seeking to break free from the constraints of proprietary software and embrace the freedom and flexibility of open-source computing.
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfPeter Spielvogel
Building better applications for business users with SAP Fiori.
• What is SAP Fiori and why it matters to you
• How a better user experience drives measurable business benefits
• How to get started with SAP Fiori today
• How SAP Fiori elements accelerates application development
• How SAP Build Code includes SAP Fiori tools and other generative artificial intelligence capabilities
• How SAP Fiori paves the way for using AI in SAP apps
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.
Elevating Tactical DDD Patterns Through Object CalisthenicsDorra BARTAGUIZ
After immersing yourself in the blue book and its red counterpart, attending DDD-focused conferences, and applying tactical patterns, you're left with a crucial question: How do I ensure my design is effective? Tactical patterns within Domain-Driven Design (DDD) serve as guiding principles for creating clear and manageable domain models. However, achieving success with these patterns requires additional guidance. Interestingly, we've observed that a set of constraints initially designed for training purposes remarkably aligns with effective pattern implementation, offering a more ‘mechanical’ approach. Let's explore together how Object Calisthenics can elevate the design of your tactical DDD patterns, offering concrete help for those venturing into DDD for the first time!
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...DanBrown980551
Do you want to learn how to model and simulate an electrical network from scratch in under an hour?
Then welcome to this PowSyBl workshop, hosted by Rte, the French Transmission System Operator (TSO)!
During the webinar, you will discover the PowSyBl ecosystem as well as handle and study an electrical network through an interactive Python notebook.
PowSyBl is an open source project hosted by LF Energy, which offers a comprehensive set of features for electrical grid modelling and simulation. Among other advanced features, PowSyBl provides:
- A fully editable and extendable library for grid component modelling;
- Visualization tools to display your network;
- Grid simulation tools, such as power flows, security analyses (with or without remedial actions) and sensitivity analyses;
The framework is mostly written in Java, with a Python binding so that Python developers can access PowSyBl functionalities as well.
What you will learn during the webinar:
- For beginners: discover PowSyBl's functionalities through a quick general presentation and the notebook, without needing any expert coding skills;
- For advanced developers: master the skills to efficiently apply PowSyBl functionalities to your real-world scenarios.
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.
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf91mobiles
91mobiles recently conducted a Smart TV Buyer Insights Survey in which we asked over 3,000 respondents about the TV they own, aspects they look at on a new TV, and their TV buying preferences.
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024Neo4j
Neha Bajwa, Vice President of Product Marketing, Neo4j
Join us as we explore breakthrough innovations enabled by interconnected data and AI. Discover firsthand how organizations use relationships in data to uncover contextual insights and solve our most pressing challenges – from optimizing supply chains, detecting fraud, and improving customer experiences to accelerating drug discoveries.
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfPaige Cruz
Monitoring and observability aren’t traditionally found in software curriculums and many of us cobble this knowledge together from whatever vendor or ecosystem we were first introduced to and whatever is a part of your current company’s observability stack.
While the dev and ops silo continues to crumble….many organizations still relegate monitoring & observability as the purview of ops, infra and SRE teams. This is a mistake - achieving a highly observable system requires collaboration up and down the stack.
I, a former op, would like to extend an invitation to all application developers to join the observability party will share these foundational concepts to build on:
In his public lecture, Christian Timmerer provides insights into the fascinating history of video streaming, starting from its humble beginnings before YouTube to the groundbreaking technologies that now dominate platforms like Netflix and ORF ON. Timmerer also presents provocative contributions of his own that have significantly influenced the industry. He concludes by looking at future challenges and invites the audience to join in a discussion.
GraphRAG is All You need? LLM & Knowledge GraphGuy Korland
Guy Korland, CEO and Co-founder of FalkorDB, will review two articles on the integration of language models with knowledge graphs.
1. Unifying Large Language Models and Knowledge Graphs: A Roadmap.
https://arxiv.org/abs/2306.08302
2. Microsoft Research's GraphRAG paper and a review paper on various uses of knowledge graphs:
https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/
Unlocking Productivity: Leveraging the Potential of Copilot in Microsoft 365, a presentation by Christoforos Vlachos, Senior Solutions Manager – Modern Workplace, Uni Systems
2. 2
BEFORE THE WORKSHOP
● Download a code editor if you don’t have one
○ https://code.visualstudio.com/, or
○ https://www.jetbrains.com/pycharm/download/
● git clone https://github.com/davified/unit-testing-workshop
Windows users:
● docker run -it -v C:pathtounit-testing-workshop:/code -p 8888:8888 unit-testing-workshop
● Run all commands in the README up until:
○ nosetests --with-watch
● Configure your IDE (we’ll do this together)
7. 7
ANATOMY OF A UNIT TEST
assert_that(do_something(input) => expected_output)
8. 8
ANATOMY OF A UNIT TEST
assert_that(do_something(input) => expected_output)
1. Think about what your function is doing
2. Write the simplest possible test case to assert that
9. 9
ANATOMY OF A UNIT TEST
def add(n1, n2):
return n1 + n2
self.assertEqual(2, add(1,1))
10. 10
EXERCISE 1: UNIT TESTING A CALCULATOR
1. Code walkthrough: src/test_calculator.py and src/calculator.py
11. 11
EXERCISE 1: UNIT TESTING A CALCULATOR
● unittest module (built-in python module)
● How to write a unit test
○ File name must start with Test____
○ Define a class that extends unittest.TestCase
○ Method name must start with test____(self)
● Assertions
○ self.assertEqual(expected, actual())
● How to run tests
○ nosetests --with-watch
12. 12
EXERCISE 1: UNIT TESTING A CALCULATOR - YOUR TURN!
● Implement
○ subtract(a, b)
○ multiply(a, b)
○ divide(a, b)
● Challenge: write the tests first!
13. 13
GOOD TESTING PRACTICES
● Do the simplest thing possible
● Red green refactor
● Descriptive test names
● Pair program (+ ping pong)
14. 14
ANTI-PATTERNS / BAD TESTING HABITS
● Redundant tests
● Bad test names
● Empty tests (no assertions)
● Unspecific tests (e.g. Asserting that add(2, 3) isNotNone)
● Non-deterministic tests (causes flaky tests)
● Tautological tests (i.e. repeating implementation details in test cases)
15. 15
EXERCISE 2: UNIT TESTING + REFACTORING A JUPYTER NOTEBOOK
notebooks/sklearn-nlp-pipeline-before-refactoring.ipynb
16. 16
EXERCISE 2: UNIT TESTING + REFACTORING A JUPYTER NOTEBOOK
Instructions
● Read the notebook to get a sense of what it’s doing (it’s training a simple
NLP model for sentiment classification)
● Sit back and relax
17. 17
● Readable notebooks
● Automated tests -- no more visual eyeballing of long notebooks
● Smaller units → Separation of concerns
● Unit tests == living documentation
● Unit tests == safety harness
● Partition complexity (esp. if you TDD)
● Lesser bugs in production
● Possibility of refactoring → Ability to evolve to adapt to changing needs
BENEFITS
18. 18
NEXT STEPS
● Learn by doing
○ http://codewars.com
○ Start with 1 unit test in your project codebase
○ Explore unittest docs: https://docs.python.org/3/library/unittest.html
(they’re good)
● Resources
○ Unit Testing for Data Scientists - Hanna Torrence
○ Lots of tutorials on the internet
Editor's Notes
Add caveat on TDD
Enemy number 1 of software: complexity
What adds to complexity?
Long methods
Cyclomatic complexity
Etc. etc.
Change
We can’t refactor without unit tests
Living documentation about our code
Partition complexity
Discover bugs early
Jupyter notebooks hit a roadblock at some point
Unit tests can scale linearly
Let me share ThoughtWorks’ approach to machine learning
What to test: our functions
What not to test: methods from a library
What to test: our functions
What not to test: methods from a library
The goal of this exercise is to get you to familiarize yourself with the syntax; and see that it’s really not that scary
Demo for them. Delete add and go through this slide