This document discusses best practices for writing unit tests. It emphasizes that unit tests should be easy to understand, trustworthy, and robust. A good unit test only fails if a bug is introduced or requirements change. The document provides examples of well-written unit tests and discusses how to avoid common problems like fragile tests. It stresses the importance of testing only specified functionality, using isolation frameworks to mock dependencies, and not putting test logic in the test. Overall, the document promotes writing "clean tests" to avoid brittle tests and minimize maintenance overhead.
Unit testing patterns for concurrent codeDror Helper
Getting started with unit testing is not hard, the only problem is that most programs are more than a simple calculator with two parameters and a returns value that is easy to verify.
Writing unit tests for multi-threaded code is harder still.
Over the years I discovered useful patterns that helped me to test multi-threaded and asynchronous code and enabled the creation of deterministic, simple and robust unit tests.
Come learn how to test code that uses concurrency and parallelism – so that the excuses of not writing unit tests for such code would become as obsolete as a single core processors.
Introduction to web programming for java and c# programmers by @drpicoxDavid Rodenas
(better presented by @drpicox)
Slides of an introductory course for web programming focusing in basic Javascript and CSS concepts. It assumes knowledge of programming, Java or C#.
Unit testing patterns for concurrent codeDror Helper
Getting started with unit testing is not hard, the only problem is that most programs are more than a simple calculator with two parameters and a returns value that is easy to verify.
Writing unit tests for multi-threaded code is harder still.
Over the years I discovered useful patterns that helped me to test multi-threaded and asynchronous code and enabled the creation of deterministic, simple and robust unit tests.
Come learn how to test code that uses concurrency and parallelism – so that the excuses of not writing unit tests for such code would become as obsolete as a single core processors.
Introduction to web programming for java and c# programmers by @drpicoxDavid Rodenas
(better presented by @drpicox)
Slides of an introductory course for web programming focusing in basic Javascript and CSS concepts. It assumes knowledge of programming, Java or C#.
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.
Breaking Dependencies to Allow Unit TestingSteven Smith
Unit testing software can be difficult, especially when the software wasn't designed to be testable. Dependencies on infrastructure concerns and software we don't control are one of the biggest contributors to testing difficulty. In this session, you'll learn the difference between unit tests and other kinds of tests, how to recognize and invert dependencies, and how to unit test your code's interactions with these dependencies without testing the infrastructure itself.
Presented at FalafelCON 2014, San Francisco, September 2014
Salesforce provides an interface for testing callouts named HttpCalloutMock used to cover remote callouts. While adequate for simple callouts, in the real world you often need something more flexible, as in the case of multiple and varying responses from the same or varying endpoints. More precise testing and coverage can be obtained by extending the standard interface. Join us as we demonstrate a solution to use to enable the flexibility required for complex integration and synchronization apps.
Sample Chapter of Practical Unit Testing with TestNG and MockitoTomek Kaczanowski
This is Chapter 10 of "Practical Unit Testing with TestNG and Mockito" book.
This is one of the last chapters which explains how to make your unit tests manageable, so they do not become a burden as the project develops and changes are introduced.
You can learn more about the book on http://practicalunittesting.com.
This is the support of a course to teach React programming for Java and C# programmers. It covers from its origins in Facebook til separation of presentational and container components. What is JSX, rules, state, props, refactoring, conditionals, repeats, forms, synchronizing values, composition, and so on.
TDD, BDD, ATDD are all methodologies that enable incremental design that is suitable for Agile environments. It seems that every day a new xDD methodology is born with the promise to be better than what came before. Should you use behaviour-driven tests or plain old unit tests? Which methodology is better? And how exactly would it benefit the development life cycle?
In this session, Dror will help to sort out the various methodologies – explaining where they came from, the tools they use, and discussing how and when to use each one. Here we will once and for all answer the question as to whether or not there’s one “DD” to rule them all.
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.
Breaking Dependencies to Allow Unit TestingSteven Smith
Unit testing software can be difficult, especially when the software wasn't designed to be testable. Dependencies on infrastructure concerns and software we don't control are one of the biggest contributors to testing difficulty. In this session, you'll learn the difference between unit tests and other kinds of tests, how to recognize and invert dependencies, and how to unit test your code's interactions with these dependencies without testing the infrastructure itself.
Presented at FalafelCON 2014, San Francisco, September 2014
Salesforce provides an interface for testing callouts named HttpCalloutMock used to cover remote callouts. While adequate for simple callouts, in the real world you often need something more flexible, as in the case of multiple and varying responses from the same or varying endpoints. More precise testing and coverage can be obtained by extending the standard interface. Join us as we demonstrate a solution to use to enable the flexibility required for complex integration and synchronization apps.
Sample Chapter of Practical Unit Testing with TestNG and MockitoTomek Kaczanowski
This is Chapter 10 of "Practical Unit Testing with TestNG and Mockito" book.
This is one of the last chapters which explains how to make your unit tests manageable, so they do not become a burden as the project develops and changes are introduced.
You can learn more about the book on http://practicalunittesting.com.
This is the support of a course to teach React programming for Java and C# programmers. It covers from its origins in Facebook til separation of presentational and container components. What is JSX, rules, state, props, refactoring, conditionals, repeats, forms, synchronizing values, composition, and so on.
TDD, BDD, ATDD are all methodologies that enable incremental design that is suitable for Agile environments. It seems that every day a new xDD methodology is born with the promise to be better than what came before. Should you use behaviour-driven tests or plain old unit tests? Which methodology is better? And how exactly would it benefit the development life cycle?
In this session, Dror will help to sort out the various methodologies – explaining where they came from, the tools they use, and discussing how and when to use each one. Here we will once and for all answer the question as to whether or not there’s one “DD” to rule them all.
Behaviour Driven Development is no longer the "new kid on the block", but it's still widely misunderstood. In this session we'll examine where it came from and what it's good for. We'll also dispel some myths that have grown up over the years.
Visual Studio tricks every dot net developer should knowDror Helper
Debugging is hard - this is a fact of life. Unfortunately, it’s never planned nor expected. It takes too much time, time we could have spent doing cool stuff - like developing new features for our customers.
But while there are many articles and productivity tools aimed at writing better code – faster, it seems as though it’s impossible to find resources that teach you how to effectively debug your code.
In this talk we’ll explore Visual Studio’s more powerful but lesser known debugging capabilities. We’ll also showcase OzCode and explain how it helps finding and fixing bugs faster.
Introduction to testing with MSTest, Visual Studio, and Team Foundation Serve...Thomas Weller
Intro to the MSTest framework (aka. Visual Studio Unit Testing), some additional tools (e.g. Moq, Moles, White), how this is supported in Visual Studio, and how it integrates into the broader context of the TFS environment.
Java Craftsmanship: Lessons Learned on How to Produce Truly Beautiful Java CodeEdson Yanaga
Programming is a journey. To achieve effective, clean, easy-to-read, and beautiful Java code, you have to practice programming every day. This session shares some lessons collected along 15 years of Java programming. It includes live code examples of how to write truly object-oriented code; when to make a type (and how to use it on JPA providers); how to properly use encapsulation and polymorphism in "ifless" programming; how to properly take advantage of the enum power; and how to use some very useful open source libraries such as Google Guava and Joda-Time to achieve clean Java code.
Session presented at JavaOne Latin America 2012.
Building unit tests correctly with visual studio 2013Dror Helper
Unit testing is now considered a mainstream practice, but that does not mean it is as common, pervasive or as well understood as it could or should be. Many programmers struggle with the quality of their tests and with the focus of their code. In this session we’ll learn how to write good unit testing code.
This workshop is about testing the right way. Get a clear view on how to test your code in an efficient and useful way!
This first testing-related workshop is about all aspects of unit testing. Integration testing and TDD will have their own dedicated workshops.
Mastering PowerShell Testing with PesterMark Wragg
Presentation delivered at the PSDay.UK conference in London, October 2018 on Mastering PowerShell Testing with the testing framework Pester for unit testing your PowerShell code.
Breaking Dependencies To Allow Unit Testing - Steve Smith | FalafelCON 2014FalafelSoftware
Unit testing software can be difficult, especially when the software wasn't designed to be testable. Dependencies on infrastructure concerns and software we don't control are one of the biggest contributors to testing difficulty. In this session, you'll learn the difference between unit tests and other kinds of tests, how to recognize and invert dependencies, and how to unit test your code's interactions with these dependencies without testing the infrastructure itself.
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.
Mock what? What Mock?Learn What is Mocking, and how to use Mocking with ColdFusion testing, development, and continuous integration. Look at Mocking and Stubbing with a touch of Theory and a lot of Examples, including what you could test, and what you should test… and what you shouldn't test (but might be fun).
Breaking Dependencies to Allow Unit TestingSteven Smith
Unit testing software can be difficult, especially when the software wasn't designed to be testable. Dependencies on infrastructure concerns and software we don't control are one of the biggest contributors to testing difficulty. In this session, you'll learn the difference between unit tests and other kinds of tests, how to recognize and invert dependencies, and how to unit test your code's interactions with these dependencies without testing the infrastructure itself.
La scrittura di test automatici nello sviluppo software è ormai di fondamentale importanza, in quanto permette di:
1. Individuare e correggere molto prima, già in fase di sviluppo, i bug.
2. Sviluppare e testare più velocemente il codice, riducendo di molto le volte in cui bisogna ricorrere al debugger.
3. Essere molto più confidenti che una modifica fatta ad un "vecchio" pezzo di codice non "rompa" tutto il resto e non funzioni più niente (ovviamente scoprendolo quando ormai si è rilasciato in produzione!).
Questi sono "solo" 3 di una quindicina di benefici che sono riuscito ad elencare, ottenibili utilizzando una pratica durante lo sviluppo del codice: la scrittura di test automatici.
Con questo workshop vogliamo introdurre gli sviluppatori ai test automatici, una pratica purtroppo non ancora conosciuta e utilizzata quanto meriterebbe, che può cambiare radicalmente il modo con cui scriviamo il codice, portandolo verso un approccio più "ingegneristico".
Faremo una panoramica sulle varie tipologie di test e sui benefici che possono portare, approfondendo in particolare i test unitari (unit test) e d'integrazione (integration test).
I test automatici sono un argomento trasversale ai linguaggi di programmazione, perciò potrete seguire il workshop a prescindere da quale linguaggio utilizziate.
Unit testing patterns for concurrent codeDror Helper
Getting started with unit testing is not hard, the only problem is that most programs are more than a simple calculator with two parameters and a returns value that is easy to verify. Writing unit tests for multi-threaded code is harder still. Over the years I discovered useful patterns that helped me to test multi-threaded and asynchronous code and enabled the creation of deterministic, simple and robust unit tests. Come learn how to test code that uses concurrency and parallelism – so that the excuses of not writing unit tests for such code would become as obsolete as a single core processors.
The secret unit testing tools no one ever told you aboutDror Helper
There are more to unit testing than using a unit testing framework - in order to succeed you want to use the right tools for the job. There are a few tools that almost no one talks about - some enabling creating of top-notch, robust unit tests. Some will help you run your tests better and faster. In this session I'll explain about the inevitable maintainability problems developers face when writing and maintaining huge unit testing suits and how unit level BDD, AutoMocking, and Continuous Execution can help take control over your tests.
Debugging with visual studio beyond 'F5'Dror Helper
Debugging is part of any development process, but unfortunately it’s never planned or expected. On top of that, it’s rarely approached in a structured way, and while many modern IDEs have powerful debugging tools – most developers are not aware of how they can be used to reduce the time and pain of debugging. The whole act of debugging is done as an ad-hoc, time consuming activity, which is considered less interesting then developing new features or investigating the latest and greatest technology. But while there are many articles and productivity tools aimed at writing better code – faster, it seems as though it’s impossible to find resources that teach you how to effectively debug your code. In this lecture, we will discuss how to approach a debugging session, and show the latest power debugging capabilities Visual Studio has to offer. These will help you save time and pain by first understanding the problem and then fixing the bug that caused it.
Every software developer enjoys finding new and clever ways to solve problems. Writing code using his/her wits, intelligent and creativity. However, sometimes being too clever can lead to hard to track bugs, maintainability issues and impossible to understand code. Is all cleverly written code good code, or is it a problem just waiting to happen? In this session, I will show you real world examples of cleverly written code. And show you how we can use clean code principles, refactoring and design patterns, to transform that code from clever code to good code – one that your peers and future self would thank you for writing.
Part of the software developer job is to find new and better ways to solve problems. Writing code using his/her wits, intelligent and creativity.
However, sometimes being too clever can lead to hard to track bugs, maintainability issues and impossible to understand code. Is all cleverly written code good code, or is it a problem just waiting to happen?
In this session, I will show you real world examples of cleverly written code. And show you how we can use clean code principles, refactoring and design patterns, to transform that code from clever code to good code, code one that your peers - and future self - would thank you for writing.
A software developer guide to working with awsDror Helper
Cloud computing is the future! Cloud computing helps reduce development times, grow your infrastructure with your business and perform tasks you could only dream of from the comfort of your own keyboard.
But it’s not all fun and games, one could get lost in the endless list of available services and on top of that there are architecture, design and security considerations that change the way you write your code.
In this session Dror is going to teach everything you need to know when starting with Amazon web services from creating a new account, securing it and using the services you need to get the job done.
The secret unit testing tools no one has ever told you aboutDror Helper
There are more to unit testing than using a unit testing framework - in order to succeed you want to use the right tools for the job. There are a few tools that almost no one talks about - some enabling creating of top-notch, robust unit tests. Some will help you run your tests better and faster.
In this session I'll explain about the inevitable maintainability problems developers face when writing and maintaining huge unit testing suits and how unit level BDD, AutoMocking, and Continuous Execution can help take control over your tests.
Harnessing the power of aws using dot net coreDror Helper
In the past AWS and C# seemed to belong to two different eco-systems. One was a leading cloud platform while the other a widely used, powerful programming platform.
Does it mean that a developer that needs to provide a solution in the cloud must choose between the two? Not anymore.
In this talk, I will show how to write C# code that runs in a dockerized container in the cloud or as an AWS Lambda and harness, the popular AWS services.
Developing multi-platform microservices using .NET coreDror Helper
In the past, C# developers’ could only look in envy as the world moved to container based micro services and cloud deployment – until now.
With the new ASP.NET Core a C# developer can write REST based microservices using the latest and greatest Visual Studio and deploy them in a different OS - or the cloud using Docker, quickly and effortlessly.
Harnessing the power of aws using dot netDror Helper
In the past AWS and C# seemed to belong to two different eco-systems. One was a leading cloud platform while the other a widely used, powerful programming platform.
Does it mean that a developer that needs to provide a solution in the cloud must choose between the two? Not anymore.
In this talk, I will show how to write C# code that runs in a dockerized container in the cloud or as an AWS Lambda and harness, the popular AWS services.
Secret unit testing tools no one ever told you aboutDror Helper
There are more to unit testing than using a unit testing framework – in order to succeed you want to use the right tools for the job. There are a few tools that almost no one talks about – some enabling creating of top-notch, robust unit tests. Some will help you run your tests better and faster.
In this session I’ll explain about the inevitable maintainability problems developers face when writing and maintaining huge unit testing suits and how unit level BDD, AutoMocking, and Continuous Execution can help take control over your tests.
C++ Unit testing - the good, the bad & the uglyDror Helper
C++ is a powerful language when used by a seasoned developer. It is being used everywhere from operating systems and compilers to cross platform mobile apps development.
But this power comes with a cost - C++ programming is not simple nor easy – with memory leaks, stack overflows and strange exceptions, a software developer needs all of the power he can use.
By harnessing the power of unit tests a software developer can find defects quickly, avoid regression and speed up development time.
In this talk I’ll show how to use the right unit testing tools and practices available that will help you get your C++ code under control and even test legacy code which no one ever want to touch.
Legacy code is the bane of most developers. Even so in C++ where you can find code that was created more than a decade ago.
When a developer needs to add a feature or fix a bug in such codebase he's faced with a problem - how to add code to a mess without creating a bigger mess as well as additional bugs on the way?
In this talk I show what worked for me when working with large, undocumented piles of C++ code, the practices and patterns that I use and how to transform unmaintainable code into code that can be extended and improved.
There is more to unit testing than using a unit testing framework. In order to succeed you want to use the right tools for the job. There are a few tools that almost no one talks about – some enabling the creation of top-notch, robust unit tests; some will help you run your tests better and faster.
In this session, Dror will explain about the inevitable maintainability problems developers face when writing and maintaining huge unit testing suits, and how unit level BDD, AutoMocking and Continuous Execution can help take control over your tests.
Electronics 101 for software developersDror Helper
These days it seems as if everybody talks about the internet of things (IoT). With a cheap Arduino, Raspberry PI (or another microcontroller) every developer has the power to control the real world.
Suddenly confronted with resistors, digital inputs, analog interfaces and a weird bread board full of holes – a developer is reminded that the world of hardware can be confusing and sometimes downright frustrating.
Visual studio is the one shop stop for most .NET developers; it’s a shame since there are other powerful tools out there.
WinDbg is such a tool – it can help analyze and solve bugs, memory issues, deadlocks and is crucial to solving bugs that are found on the client machines.
The problem is that WinDbg is not as friendly as Visual Studio (to say the least) – or is it?
In this talk I’ll show how a .NET developer can use WinDbg to crash bugs.
Unit tests are great, they help a developer gain control over his code and catch bugs and regression issues.
Test Driven Development is a methodology that uses unit tests but it's not about writing unit tests - in fact the tests are only a design tool.
TDD is a methodology that solves problems in an iterative way, it's about emergent design that creates a maintainable solution.
In this session I'll talk about common mistakes and misconceptions, how to benefit from TDD and show how to design your code using unit tests.
The code for this talk can be found on GitHub: https://github.com/dhelper/DesignWIthTests
Maintaining the product is one (if not the most) expensive area of the overall product costs. Writing clean code can significantly lower these costs, making it more efficient during the initial development and results in more stable code. In this session participants will learn how to apply C# techniques in order to improve the efficiency, readability, testability and extensibility of code.
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Mind IT Systems
Healthcare providers often struggle with the complexities of chronic conditions and remote patient monitoring, as each patient requires personalized care and ongoing monitoring. Off-the-shelf solutions may not meet these diverse needs, leading to inefficiencies and gaps in care. It’s here, custom healthcare software offers a tailored solution, ensuring improved care and effectiveness.
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus
As part of the DOE Integrated Research Infrastructure (IRI) program, NERSC at Lawrence Berkeley National Lab and ALCF at Argonne National Lab are working closely with General Atomics on accelerating the computing requirements of the DIII-D experiment. As part of the work the team is investigating ways to speedup the time to solution for many different parts of the DIII-D workflow including how they run jobs on HPC systems. One of these routes is looking at Globus Compute as a way to replace the current method for managing tasks and we describe a brief proof of concept showing how Globus Compute could help to schedule jobs and be a tool to connect compute at different facilities.
A Comprehensive Look at Generative AI in Retail App Testing.pdfkalichargn70th171
Traditional software testing methods are being challenged in retail, where customer expectations and technological advancements continually shape the landscape. Enter generative AI—a transformative subset of artificial intelligence technologies poised to revolutionize software testing.
May Marketo Masterclass, London MUG May 22 2024.pdfAdele Miller
Can't make Adobe Summit in Vegas? No sweat because the EMEA Marketo Engage Champions are coming to London to share their Summit sessions, insights and more!
This is a MUG with a twist you don't want to miss.
Quarkus Hidden and Forbidden ExtensionsMax Andersen
Quarkus has a vast extension ecosystem and is known for its subsonic and subatomic feature set. Some of these features are not as well known, and some extensions are less talked about, but that does not make them less interesting - quite the opposite.
Come join this talk to see some tips and tricks for using Quarkus and some of the lesser known features, extensions and development techniques.
Understanding Globus Data Transfers with NetSageGlobus
NetSage is an open privacy-aware network measurement, analysis, and visualization service designed to help end-users visualize and reason about large data transfers. NetSage traditionally has used a combination of passive measurements, including SNMP and flow data, as well as active measurements, mainly perfSONAR, to provide longitudinal network performance data visualization. It has been deployed by dozens of networks world wide, and is supported domestically by the Engagement and Performance Operations Center (EPOC), NSF #2328479. We have recently expanded the NetSage data sources to include logs for Globus data transfers, following the same privacy-preserving approach as for Flow data. Using the logs for the Texas Advanced Computing Center (TACC) as an example, this talk will walk through several different example use cases that NetSage can answer, including: Who is using Globus to share data with my institution, and what kind of performance are they able to achieve? How many transfers has Globus supported for us? Which sites are we sharing the most data with, and how is that changing over time? How is my site using Globus to move data internally, and what kind of performance do we see for those transfers? What percentage of data transfers at my institution used Globus, and how did the overall data transfer performance compare to the Globus users?
How to Position Your Globus Data Portal for Success Ten Good PracticesGlobus
Science gateways allow science and engineering communities to access shared data, software, computing services, and instruments. Science gateways have gained a lot of traction in the last twenty years, as evidenced by projects such as the Science Gateways Community Institute (SGCI) and the Center of Excellence on Science Gateways (SGX3) in the US, The Australian Research Data Commons (ARDC) and its platforms in Australia, and the projects around Virtual Research Environments in Europe. A few mature frameworks have evolved with their different strengths and foci and have been taken up by a larger community such as the Globus Data Portal, Hubzero, Tapis, and Galaxy. However, even when gateways are built on successful frameworks, they continue to face the challenges of ongoing maintenance costs and how to meet the ever-expanding needs of the community they serve with enhanced features. It is not uncommon that gateways with compelling use cases are nonetheless unable to get past the prototype phase and become a full production service, or if they do, they don't survive more than a couple of years. While there is no guaranteed pathway to success, it seems likely that for any gateway there is a need for a strong community and/or solid funding streams to create and sustain its success. With over twenty years of examples to draw from, this presentation goes into detail for ten factors common to successful and enduring gateways that effectively serve as best practices for any new or developing gateway.
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar
The European Union Agency for Law Enforcement Cooperation (Europol) has suffered an alleged data breach after a notorious threat actor claimed to have exfiltrated data from its systems. Infamous data leaker IntelBroker posted on the even more infamous BreachForums hacking forum, saying that Europol suffered a data breach this month.
The alleged breach affected Europol agencies CCSE, EC3, Europol Platform for Experts, Law Enforcement Forum, and SIRIUS. Infiltration of these entities can disrupt ongoing investigations and compromise sensitive intelligence shared among international law enforcement agencies.
However, this is neither the first nor the last activity of IntekBroker. We have compiled for you what happened in the last few days. To track such hacker activities on dark web sources like hacker forums, private Telegram channels, and other hidden platforms where cyber threats often originate, you can check SOCRadar’s Dark Web News.
Stay Informed on Threat Actors’ Activity on the Dark Web with SOCRadar!
Check out the webinar slides to learn more about how XfilesPro transforms Salesforce document management by leveraging its world-class applications. For more details, please connect with sales@xfilespro.com
If you want to watch the on-demand webinar, please click here: https://www.xfilespro.com/webinars/salesforce-document-management-2-0-smarter-faster-better/
Navigating the Metaverse: A Journey into Virtual Evolution"Donna Lenk
Join us for an exploration of the Metaverse's evolution, where innovation meets imagination. Discover new dimensions of virtual events, engage with thought-provoking discussions, and witness the transformative power of digital realms."
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Globus
The Earth System Grid Federation (ESGF) is a global network of data servers that archives and distributes the planet’s largest collection of Earth system model output for thousands of climate and environmental scientists worldwide. Many of these petabyte-scale data archives are located in proximity to large high-performance computing (HPC) or cloud computing resources, but the primary workflow for data users consists of transferring data, and applying computations on a different system. As a part of the ESGF 2.0 US project (funded by the United States Department of Energy Office of Science), we developed pre-defined data workflows, which can be run on-demand, capable of applying many data reduction and data analysis to the large ESGF data archives, transferring only the resultant analysis (ex. visualizations, smaller data files). In this talk, we will showcase a few of these workflows, highlighting how Globus Flows can be used for petabyte-scale climate analysis.
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Globus
The U.S. Geological Survey (USGS) has made substantial investments in meeting evolving scientific, technical, and policy driven demands on storing, managing, and delivering data. As these demands continue to grow in complexity and scale, the USGS must continue to explore innovative solutions to improve its management, curation, sharing, delivering, and preservation approaches for large-scale research data. Supporting these needs, the USGS has partnered with the University of Chicago-Globus to research and develop advanced repository components and workflows leveraging its current investment in Globus. The primary outcome of this partnership includes the development of a prototype enterprise repository, driven by USGS Data Release requirements, through exploration and implementation of the entire suite of the Globus platform offerings, including Globus Flow, Globus Auth, Globus Transfer, and Globus Search. This presentation will provide insights into this research partnership, introduce the unique requirements and challenges being addressed and provide relevant project progress.
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Anthony Dahanne
Les Buildpacks existent depuis plus de 10 ans ! D’abord, ils étaient utilisés pour détecter et construire une application avant de la déployer sur certains PaaS. Ensuite, nous avons pu créer des images Docker (OCI) avec leur dernière génération, les Cloud Native Buildpacks (CNCF en incubation). Sont-ils une bonne alternative au Dockerfile ? Que sont les buildpacks Paketo ? Quelles communautés les soutiennent et comment ?
Venez le découvrir lors de cette session ignite
Unleash Unlimited Potential with One-Time Purchase
BoxLang is more than just a language; it's a community. By choosing a Visionary License, you're not just investing in your success, you're actively contributing to the ongoing development and support of BoxLang.
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdfJay Das
With the advent of artificial intelligence or AI tools, project management processes are undergoing a transformative shift. By using tools like ChatGPT, and Bard organizations can empower their leaders and managers to plan, execute, and monitor projects more effectively.
Software Engineering, Software Consulting, Tech Lead.
Spring Boot, Spring Cloud, Spring Core, Spring JDBC, Spring Security,
Spring Transaction, Spring MVC,
Log4j, REST/SOAP WEB-SERVICES.
Listen to the keynote address and hear about the latest developments from Rachana Ananthakrishnan and Ian Foster who review the updates to the Globus Platform and Service, and the relevance of Globus to the scientific community as an automation platform to accelerate scientific discovery.
3. /*
* You may think you know what the following code does.
* But you dont. Trust me.
* Fiddle with it, and youll spend many a sleepless
* night cursing the moment you thought youd be clever
* enough to "optimize" the code below.
* Now close this file and go play with something else.
*/
//
// Dear maintainer:
//
// Once you are done trying to 'optimize' this routine,
// and have realized what a terrible mistake that was,
// please increment the following counter as a warning
// to the next guy:
//
// total_hours_wasted_here = 42
//
4. //This code sucks, you know it and I know it.
//Move on and call me an idiot later.
http://stackoverflow.com/questions/184618/what-is-the-best-comment-in-source-code-you-have-ever-encountered
We fear our code!
//Abandon all hope ye who enter beyond this point
//When I wrote this, only God and I understood what I was doing
//Now, God only knows
// I dedicate all this code, all my work, to my wife, Darlene, who will
// have to support me and our three children and the dog once it gets
// released into the public.
//The following 1056 lines of code in this next method
//is a line by line port from VB.NET to C#.
//I ported this code but did not write the original code.
//It remains to me a mystery as to what
//the business logic is trying to accomplish here other than to serve as
//some sort of a compensation shell game invented by a den of thieves.
//Oh well, everyone wants this stuff to work the same as before.
//I guess the devil you know is better than the devil you don't.
6. “Code without tests is bad code...
With tests, we can change the
behavior of our code quickly and
verifiably...”
Michael Feathers - “Working effectively with legacy code”
7. This is a unit test
[Test]
public void CheckPassword_ValidUser_ReturnTrue()
{
bool result = CheckPassword(“user”, “pass”);
Assert.That(result, Is.True);
}
D
8. This is also a unit test
[@Test]
public void CheckPassword_ValidUser_ReturnTrue()
{
boolean result = CheckPassword(“user”, “pass”);
Assert.IsTrue(result);
}
D
9. A unit test is…
A method (Code)
that
tests specific functionality,
Has
clear pass/fail criteria
and
runs in isolation
10. Unit testing is an iterative effort
Unit testing is an iterative effort
12. The Team
• The team commitment is important
• Learn from test reviews
• Track results
13. Server
Dev Machine
Source ControlBuild Server
Test Runner
Code
Coverage
Build Script
Unit Testing
Framework
Isolation
Framework
Tools of the trade
Build Failed!
14. Unit tests without a CI server are a
waste of time - if you're running all
of the tests all of the time locally
you're a better man then me
15. Development environment
• Make it easy to write and run tests
– Unit test framework
– Test Runner
– Isolation framework
• Know where you stand
– Code coverage
16. Unit testing frameworks
• Test fixtures
• Assertions
• Runners
• More…
http://en.wikipedia.org/wiki/List_of_unit_testing_frameworks
17. [Test]
public void AddTest()
{
var cut = new Calculator();
var result = cut.Add(2, 3);
Assert.AreEqual(5, result);
}
This is not a real unit test
18. Real code has dependencies
Unit test
Code under test
Dependency Dependency
19. The solution - Mocking
Fake object(s)
Unit test
Code under test
Dependency
20. Isolation
• Replace production logic with custom logic
• We do this in order to
– Focus the test on one class only
– Test Interaction
– Simplify Unit test writing
21. What Mocking framework can do for you?
• Create Fake objects
• Set behavior on fake objects
• Verify method was called
• And more...
22. [Test]
public void IsLoginOK_LoggerThrowsException_CallsWebService()
{
var fakeLogger = Isolate.Fake.Instance<ILogger>();
Isolate
.WhenCalled(() => fakeLogger.Write(""))
.WillThrow(new LoggerException());
var fakeWebService = Isolate.Fake.Instance<IWebService>();
var lm = new LoginManagerWithMockAndStub(fakeLogger,fakeWebService);
lm.IsLoginOK("", "");
Isolate.Verify.WasCalledWithAnyArguments(() => fakeWebService.Write(""));
}
23. @Test
public void testBookAddtion(){
string isbn = "1234";
TitleCatalog fakeCatalog = mock(TitleCatalog.class);
Book book = new Book("Moby dick", isbn);
when(fakeCatalog.getTitleByISBN(anystring())).thenReturn(book);
BookInventory inventory = new BookInventory();
inventory.registerCopy(isbn, "1");
verify(fakeCatalog, times(1)).getTitleByISBN(isbn);
}
25. How I failed unit testing my code
Unit testing is great!
Everything should be tested
I can test “almost” everything
Tests break all the time
Unit testing is a waste of time
26. A good unit test should be:
• Easy to understand
• Trustworthy
• Robust
Trust Your Tests!
28. Be explicit and deterministic
Problem
• I cannot re-run the exact same test if a test fails
Solution
• Don’t use Random elements in tests
– If you care about the values set them
– If you don’t care about the values put defaults
– Do not use Sleep & time related logic – fake it
• Use fake objects to “force” determinism into the test
• When possible avoid threading in tests.
30. Test naming
Test names should be descriptive and explicit.
Test names should express a specific requirement
I like to use:
Method_Scenario_Expected
a.k.a
UnitOfWork_StateUnderTest_ExpectedBehavior
Public void Sum_NegativeNumberAs1stParam_ExceptionThrown()
Public void Sum_simpleValues_Calculated ()
Public void Parse_SingleToken_ReturnsEqualTokenValue ()
http://osherove.com/blog/2005/4/3/naming-standards-for-unit-tests.html
31. Writing a good unit test
[Test]
public void
Multiply_PassTwoPositiveNumbers_ReturnCorrectResult()
{
var calculator = CreateMultiplyCalculator();
var result = calculator.Multiply(1, 3);
Assert.AreEqual(result, 3);
}
32. It’s an over-specification that creates fragile tests
Test the “what”, not the “How”
• So that refactoring won’t break your tests
• Testing private methods is a smell!
Avoid testing private methods
33. How to avoid fragile tests
• Don’t test private/internal (most of the time)
• Fake as little as necessary
• Test only one thing (most of the time)
35. So what about code reuse
Readability is more important than code reuse
• Create objects using factories
• Put common and operations in helper
methods
• Use inheritance – sparsely
36. Avoid logic in the test (if, switch etc.)
• Test is not readable
• Has several possible paths
• High maintain cost
@Test
public void Test1(){
// Here be code
switch(i){
case(a):
...
break;
case(b):
...
break;
default:
Assert.Fail();
}
}
try
{
Assert.IsNull(…);
Assert.AreEqual(…);
}
catch (Exception e)
{
thrownException = e;
}
37. Learn to write “clean tests”
[Test]
public void CalculatorSimpleTest()
{
calc.ValidOperation = Calculator.Operation.Multiply;
calc.ValidType = typeof (int);
result = calc.Multiply(1, 3);
Assert.IsTrue(result == 3);
if (calc.ValidOperation == Calculator.Operation.Invalid)
{
throw new Exception("Operation should be valid");
}
}
38. Or suffer the consequences!
[Test]
public void CalculatorSimpleTest()
{
var calc = new Calculator();
calc.ValidOperation = Calculator.Operation.Multiply;
calc.ValidType = typeof (int);
var result = calc.Multiply(-1, 3);
Assert.AreEqual(result, -3);
calc.ValidOperation = Calculator.Operation.Multiply;
calc.ValidType = typeof (int);
result = calc.Multiply(1, 3);
Assert.IsTrue(result == 3);
if (calc.ValidOperation == Calculator.Operation.Invalid)
{
throw new Exception("Operation should be valid");
}
calc.ValidOperation = Calculator.Operation.Multiply;
calc.ValidType = typeof (int);
result = calc.Multiply(10, 3);
Assert.AreEqual(result, 30);
}
39. How to start with unit tests
1. Test what you’re working on – right now!
2. Write tests to reproduce reported bug
3. When refactoring existing code – use unit tests
to make sure it still works.
1. All tests must run as part of CI build