This document provides an overview of integration testing. It discusses what integration testing is, the challenges of integration testing, and some solutions and best practices for integration testing. Specifically, it covers:
- The differences between unit testing and integration testing
- Examples of testing components together (like testing each part of a car separately vs doing a test drive)
- Techniques for reducing brittle and slow integration tests, like separating tests from infrastructure dependencies
- Tools for faking dependencies like databases, web services, and containers in integration tests
- Best practices for integration testing with build tools like Maven and for continuous integration
Vous avez atteint le Graal de 100% de Code Coverage ? Bravo ! Pourtant, vous rencontrez encore des bugs lors du lancement de l'application. Vous pratiquez déjà les Tests d'Intégration ? Bravo également ! Pourtant, vous devez les corriger sans cesse car ils sont instables.
Dans cette présentation, je tenterai de démontrer la raison d'être des Tests d'Intégration et leur complémentarité avec les Tests Unitaires. Je montrerai également comment améliorer la fiabilité des TI et quels sont les outils pour cela. Le reste de la présentation sera consacré aux TI in-container, Spring et Java EE.
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.
Have you ever wondered what the best way would be to test emails? Or how you would go about testing a messaging queue?
Making sure your components are correctly interacting with each other is both a tester and developer’s concern. Join us to get a better understanding of what you should test and how, both manually and automated.
This session is the first ever in which we will have two units working together to give you a nuanced insight on all aspects of integration testing. We’ll start off exploring the world of integration testing, defining the terminology, and creating a general understanding of what phases and kinds of testing exist. Later on we’ll delve into integration test automation, ranging from database integration testing to selenium UI testing and even as far as LDAP integration testing.
We have a wide variety of demos prepared where we will show you how easy it is to test various components of your infrastructure. Some examples:
- Database testing (JPA)
- Arquillian, exploring container testing, EJB testing and more
- Email testing
- SOAP testing using SoapUI
- LDAP testing
- JMS testing
A presentation that guides you through the stages of testing your Java enterprise application. Finally it shows you that Arquillian is the best tool for that
Vous avez atteint le Graal de 100% de Code Coverage ? Bravo ! Pourtant, vous rencontrez encore des bugs lors du lancement de l'application. Vous pratiquez déjà les Tests d'Intégration ? Bravo également ! Pourtant, vous devez les corriger sans cesse car ils sont instables.
Dans cette présentation, je tenterai de démontrer la raison d'être des Tests d'Intégration et leur complémentarité avec les Tests Unitaires. Je montrerai également comment améliorer la fiabilité des TI et quels sont les outils pour cela. Le reste de la présentation sera consacré aux TI in-container, Spring et Java EE.
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.
Have you ever wondered what the best way would be to test emails? Or how you would go about testing a messaging queue?
Making sure your components are correctly interacting with each other is both a tester and developer’s concern. Join us to get a better understanding of what you should test and how, both manually and automated.
This session is the first ever in which we will have two units working together to give you a nuanced insight on all aspects of integration testing. We’ll start off exploring the world of integration testing, defining the terminology, and creating a general understanding of what phases and kinds of testing exist. Later on we’ll delve into integration test automation, ranging from database integration testing to selenium UI testing and even as far as LDAP integration testing.
We have a wide variety of demos prepared where we will show you how easy it is to test various components of your infrastructure. Some examples:
- Database testing (JPA)
- Arquillian, exploring container testing, EJB testing and more
- Email testing
- SOAP testing using SoapUI
- LDAP testing
- JMS testing
A presentation that guides you through the stages of testing your Java enterprise application. Finally it shows you that Arquillian is the best tool for that
JNation - Integration Testing from the Trenches RebootedNicolas Fränkel
Years after Kent Beck provided JUnit, unit testing is part of most developer teams tooling. However, there's a trend that tends to threaten unit testing, claiming only integration testing can truly detects defects in software.
In this talk, we will first define what unit testing and integration testing are, and their respective pros, cons and uses. Then, we will have a look at the unique challenges posed by integration testing. Finally, tools and techniques will be presented to somewhat remedy to that so that integration testing becomes a true asset in each software developer bag of tricks.
Many developers are on board with writing unit tests for their code. However a lot of developers don’t test as much as they should because deciding how and what to unit test is harder than deciding to test. Laravel 5 is built with great support for unit testing with PHPUnit but testing applications built using the Model View Controller pattern can prove challenging. This talk will cover ways to design your code to make testing easier and also help you decide what should be unit tested and what should be left to other testing methods.
Continuous Integration Testing in DjangoKevin Harvey
Continuous Integration is like having a robot that cleans up after you: it installs your dependencies, builds your project, run your tests, and reports back to you. This presentation outlines two methods for CI: Travis and Jenkins.
Testcontainers - Geekout EE 2017 presentationRichard North
Unit testing our code on the JVM is well catered for with a lot of great tools that are mature and reliable – things tend to just work. Integrated testing, however, is another matter. Any time we face a situation where we need to involve non-JVM elements in our tests, we’re faced with painful environment setup and repeatability issues. Testcontainers aims to make integrated tests a little less unpleasant, through the power of Docker. Databases, Web browsers – in fact anything available as a Docker image – can be made available as a component to use in our tests.
In this talk, we’ll go through the motivations for building Testcontainers, its features, as well as some examples of using it in practice for testing various types of components.
В ходе доклада мы обсудим такие виды тестирования как:
- юнит тестирование,
- тестирование верстки,
- e2e-тестирование,
- тестирование производительности для FE
Также мы коснемся таких фундаментальных вещей, как:
- Что такое F.I.R.S.T
- Где заканчивается ответственность разработчика и начинает - ответственность QA инженера
- Как договариваться с бэкенд разработчиками
- И конечно, почему тесты нужны.
how to write functional tests with Selenium. how to set up Selenium Testing On Grails Apps In Continuous
Integration Using two approaches: The long way – using Maven and/or Ant The fast way, using the grails-
selenium-rc plug-in - ( see
http://buildchimp.com/wordpress/?p=241 )
If you build web applications you now have a huge responsibility: everything must be tested and secured. But how do you test and secure legacy applications or how do you get started with a new project using test-driven techniques to maximise quality and security without investing too much time in it.
In this workshop we will start with a clean project and build a simple catalogue application using test-driven and security-hardened techniques to achieve our goal. Once we have achieved our goal, we're going to apply the same on a legacy application.
San Francisco Java User Group presents Chris Bedford who talks about:
- How to write functional tests with Selenium (including explaining its IDE, architecture, RC, and alternatives like Canoo WebTest)
- How to set up Selenium testing for web apps in continuous integration using Maven, Ant, Cargo, etc.
- How to use Hudson for build server (brief overview)
January 12, 2010 in San Francisco, CA
http://www.sfjava.org/calendar/11982857/
Hosted by SUPINFO International University
Sponsored by TEKsystems, Guidewire Software, Sun, O'Reilly, JetBrains, and Marakana.
Video by Max Walker
Organized by Marakana
Slides from the Selenium Clinic Tutorial from Eurostar 2012 hosted by Simon Stewart and Alan Richardson. The tutorial was awarded "Best Tutorial" at the conference.
The reference slides were excerpted from Alan Richardson's online WebDriver course hosted at Udemy.
http://www.udemy.com/selenium-2-webdriver-basics-with-java/
Take Control of your Integration Testing with TestContainersNaresha K
Slides from my demonstration titled "Take Control of your Integration Testing with TestContainers". Demonstrates using TestContainers for RDBMS and test driving S3 API with localstack.
Arquillian (http://jboss.org/arquillian) is a test harness that simplifies integration testing using container managed resources.
ShrinkWrap (http://jboss.org/shrinkwrap) is a fluent Java API for dynamically generating deployable archives.
Stateless authentication for microservices applications - JavaLand 2015Alvaro Sanchez-Mariscal
This talk is about how to secure your front-end + backend applications using a RESTful approach. As opposed to traditional and monolithic server-side applications (where the HTTP session is used), when your front-end application is running on a browser and not securely from the server, there are few things you need to consider.
In this session Alvaro will explore standards like OAuth or JWT to achieve a stateless, token-based authentication using frameworks like Angular JS on the front-end and Spring Security on the backend.
JNation - Integration Testing from the Trenches RebootedNicolas Fränkel
Years after Kent Beck provided JUnit, unit testing is part of most developer teams tooling. However, there's a trend that tends to threaten unit testing, claiming only integration testing can truly detects defects in software.
In this talk, we will first define what unit testing and integration testing are, and their respective pros, cons and uses. Then, we will have a look at the unique challenges posed by integration testing. Finally, tools and techniques will be presented to somewhat remedy to that so that integration testing becomes a true asset in each software developer bag of tricks.
Many developers are on board with writing unit tests for their code. However a lot of developers don’t test as much as they should because deciding how and what to unit test is harder than deciding to test. Laravel 5 is built with great support for unit testing with PHPUnit but testing applications built using the Model View Controller pattern can prove challenging. This talk will cover ways to design your code to make testing easier and also help you decide what should be unit tested and what should be left to other testing methods.
Continuous Integration Testing in DjangoKevin Harvey
Continuous Integration is like having a robot that cleans up after you: it installs your dependencies, builds your project, run your tests, and reports back to you. This presentation outlines two methods for CI: Travis and Jenkins.
Testcontainers - Geekout EE 2017 presentationRichard North
Unit testing our code on the JVM is well catered for with a lot of great tools that are mature and reliable – things tend to just work. Integrated testing, however, is another matter. Any time we face a situation where we need to involve non-JVM elements in our tests, we’re faced with painful environment setup and repeatability issues. Testcontainers aims to make integrated tests a little less unpleasant, through the power of Docker. Databases, Web browsers – in fact anything available as a Docker image – can be made available as a component to use in our tests.
In this talk, we’ll go through the motivations for building Testcontainers, its features, as well as some examples of using it in practice for testing various types of components.
В ходе доклада мы обсудим такие виды тестирования как:
- юнит тестирование,
- тестирование верстки,
- e2e-тестирование,
- тестирование производительности для FE
Также мы коснемся таких фундаментальных вещей, как:
- Что такое F.I.R.S.T
- Где заканчивается ответственность разработчика и начинает - ответственность QA инженера
- Как договариваться с бэкенд разработчиками
- И конечно, почему тесты нужны.
how to write functional tests with Selenium. how to set up Selenium Testing On Grails Apps In Continuous
Integration Using two approaches: The long way – using Maven and/or Ant The fast way, using the grails-
selenium-rc plug-in - ( see
http://buildchimp.com/wordpress/?p=241 )
If you build web applications you now have a huge responsibility: everything must be tested and secured. But how do you test and secure legacy applications or how do you get started with a new project using test-driven techniques to maximise quality and security without investing too much time in it.
In this workshop we will start with a clean project and build a simple catalogue application using test-driven and security-hardened techniques to achieve our goal. Once we have achieved our goal, we're going to apply the same on a legacy application.
San Francisco Java User Group presents Chris Bedford who talks about:
- How to write functional tests with Selenium (including explaining its IDE, architecture, RC, and alternatives like Canoo WebTest)
- How to set up Selenium testing for web apps in continuous integration using Maven, Ant, Cargo, etc.
- How to use Hudson for build server (brief overview)
January 12, 2010 in San Francisco, CA
http://www.sfjava.org/calendar/11982857/
Hosted by SUPINFO International University
Sponsored by TEKsystems, Guidewire Software, Sun, O'Reilly, JetBrains, and Marakana.
Video by Max Walker
Organized by Marakana
Slides from the Selenium Clinic Tutorial from Eurostar 2012 hosted by Simon Stewart and Alan Richardson. The tutorial was awarded "Best Tutorial" at the conference.
The reference slides were excerpted from Alan Richardson's online WebDriver course hosted at Udemy.
http://www.udemy.com/selenium-2-webdriver-basics-with-java/
Take Control of your Integration Testing with TestContainersNaresha K
Slides from my demonstration titled "Take Control of your Integration Testing with TestContainers". Demonstrates using TestContainers for RDBMS and test driving S3 API with localstack.
Arquillian (http://jboss.org/arquillian) is a test harness that simplifies integration testing using container managed resources.
ShrinkWrap (http://jboss.org/shrinkwrap) is a fluent Java API for dynamically generating deployable archives.
Stateless authentication for microservices applications - JavaLand 2015Alvaro Sanchez-Mariscal
This talk is about how to secure your front-end + backend applications using a RESTful approach. As opposed to traditional and monolithic server-side applications (where the HTTP session is used), when your front-end application is running on a browser and not securely from the server, there are few things you need to consider.
In this session Alvaro will explore standards like OAuth or JWT to achieve a stateless, token-based authentication using frameworks like Angular JS on the front-end and Spring Security on the backend.
NoSQL Riak MongoDB Elasticsearch - All The Same?Eberhard Wolff
Gives a general introduction to NoSQL and modeling data with JSON. Goes on to compare MongoDB, Riak and Elasticsearch - that seem to be the same at first sight but are in fact pretty different. Presented at JavaLand.
Keynote that I gave at JavaLand 2015, in Brühl, Germany. Talks about 20 years of Java and JVM technology from my subjective perspective. "What have I been doing with my life for the last 20 years".
Cassandra Troubleshooting (for 2.0 and earlier)J.B. Langston
I’ll give a general lay of the land for troubleshooting Cassandra. Then I’ll take you on a deep dive through nodetool and system.log and give you a guided tour of the useful information they provide for troubleshooting. I’ll devote special attention to monitoring the various processes that Cassandra uses to do its work and how to effectively search for information about specific error messages online.
This is the old version of this presentation for Cassandra 2.0 and earlier. Check out the updated slide deck for Cassandra 2.1.
After migrating a three year old C# project to Java we ending up with a significant portion of legacy code using lambdas in Java. What was some of the good use cases, code which could be written better and the problems we had migrating from C#. At the end we look at the performance implications of using Lambdas.
This summer, coming to a server near you, Cassandra 3.0! Contributors and committers have been working hard on what is the most ambitious release to date. It’s almost too much to talk about, but we will dig into some of the most important, ground breaking features that you’ll want to use. Indexing changes that will make your applications faster and spark jobs more efficient. Storage engine changes to get even more density and efficiency from your nodes. Developer focused features like full JSON support and User Defined Functions. And finally, one of the most requested features, Windows support, has made it’s arrival. There is more, but you’ll just have to some see for yourself. Get your front row seat and don’t miss it!
Monitoring Highly Dynamic and Distributed Systems with NGINX AmplifyNGINX, Inc.
On-demand webinar: nginx.com/resources/webinars/monitoring-highly-dynamic-distributed-services-nginx-amplify
In this webinar, we describe the challenges of monitoring highly dynamic and distributed systems, and show how NGINX Amplify can help.
Cloud services, containers, and microservices provide flexibility of deployment, but conventional monitoring tools can't always keep up with rapidly changing systems. NGINX Amplify helps you overcome challenges in collecting logs and metrics and acting on the results.
Join us in this webinar to discover:
- The specific characteristics of distributed systems, immutable infrastructure, and systems that use a microservices architecture.
- Why NGINX and NGINX Plus are the go-to application delivery solutions with popular with users of container technologies such as Docker and cloud technologies such as AWS.
- What special challenges you may find in monitoring and managing containerized, distributed, and microservices-based systems.
- How NGINX Amplify overcomes monitoring and management challenges.
On-demand recording: http://bit.ly/2mRhTRB
If you’re a Java developer, you probably know that containers have begun to revolutionize application development and deployment. Developers across the world have adopted modern application stacks to more quickly develop and deploy their applications, and deliver the performance users expect. When the power of NGINX Plus and Docker is combined developers, system administrators, and application owners achieve something we all desire: flawless application delivery.
In this webinar you will hear from Arun Gupta, a key visionary behind the development and success of Java, about why choosing technologies like Docker and NGINX can provide significant benefit to your applications. Arun Gupta will share key points which he discusses in his newly released book, Docker for Java Developers, from O’Reilly.
Join us in this webinar to learn:
* How Docker can improve your Java development lifecycle.
* How to build and run Docker containers for Java applications
* Tips for managing Docker containers in Java development environments
* How to load balance Java applications running in Docker containers
Fact: Full acceptance test suites that run in the browser are slow, flakey, awkward to write, and hard to maintain. This is the lore that has been handed down to JavaScript developers for generations. But what if that fact was fiction? What if your UI tests were fast, robust and a breeze to maintain? Introducing BigTest. The framework that believes you don't need to make compromises in order to make tests that faithfully replicate your production environment. We’ll explore how BigTest upends the boring and often painful subject of UI testing and makes it fast, robust, and a pleasure to work with.
Easy integration of Bluemix services with your applicationsJack-Junjie Cai
This presentation talks about how your Java EE and node.js applications can easily consume various cloud services available in the IBM Bluemix cloud platform. IBM Bluemix is based CloudFoundry.
Learn how to use AWS services to automate manual tasks, help teams manage complex environments at scale, and keep engineers in control of the high velocity that is enabled by DevOps. In this session, we will provide an overview of the various AWS development and deployment services and when best to use them. We will show how to build a fully automated infrastructure and software delivery pipeline with AWS CodePipeline, AWS CodeBuild, AWS CloudFormation and AWS CodeDeploy. At the end of the session, a GitHub repository of AWS CloudFormation templates will be provided so you can quickly deploy the same pipeline to your AWS account(s).
Stopping the Rot - Putting Legacy C++ Under TestSeb Rose
Presentation given at the ACCU 2011 Conference in Oxford, UK.
Case study of applying unit test to the DOORS codebase. Includes a quick overview of unit test & the Google Test and Mock libraries. Also 3 specific refactoring examples shown.
DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...Amazon Web Services
Organizations around the globe are leveraging the cloud to accomplish world-changing missions. This session will address how AWS can help organizations put more money toward their mission and scale outreach and operations to achieve more with less. Hear some of AWS’s most advanced customers on how their organizations handle DevOps, continuous integration and deployment. Learn how these practices allow them to rapidly develop, iterate, test and deploy highly-scalable web applications and core operational systems on AWS. The discussion will focus on best practices, lessons learned, and the specific technologies and services they use.
How to set up an ASP.NET 5 Continuous Delivery Pipeline using IBM Bluemix Dev...Richard Johansson
In this presentation we explain how to set up a complete IBM native tool chain for Continuous Delivery by using the IBM DevOps Services' Build & Deploy feature, also known as the Delivery Pipeline. We develop, build, (by automation) unit test, integration test, load test and deploy an ASP.NET 5 application with a Cloudant NoSQL database to Bluemix.
More Enhancements to Grails:
Topics covered:
Grails Plugins
Resources
Restful API
Integration Tests
What’s new in grails 2.0
What’s new in grails 2.1
What’s new in grails 2.2
How to upgrade plugins
IBM Rational Host Access Transformation Services (HATS) can dynamically transform your terminal-based applications into rich web pages. It is highly customizable and built on Java EE technology. We'll discuss some lessons learned from a very (very) complex HATS engagement. We'll discuss proper development strategies, and how to distribute workload across team members. We'll introduce a novel approach to unit testing advanced customizations using JUnit, and will also talk about how to address functional testing.
We continue checking Microsoft projects: analysis of PowerShellPVS-Studio
It has become a "good tradition" for Microsoft to make their products open-source: CoreFX, .Net Compiler Platform (Roslyn), Code Contracts, MSBuild, and other projects. For us, the developers of PVS-Studio analyzer, it's an opportunity to check well-known projects, tell people (including the project authors themselves) about the bugs we find, and additionally test our analyzer. Today we are going to talk about the errors found in another project by Microsoft, PowerShell.
The Quest for Continuous Delivery at PluralsightMike Clement
Continuous integration, continuous delivery, continuous deployment. These may seem like unreachable goals in your current situation. Maybe you’re doing weekly or even monthly coordinated releases. At Pluralsight we deploy multiple times a week, sometimes multiple times a day. We’re not perfect and we’re constantly working to improve our system, but I’ll share an experience report of where we currently are and where we’re going.
Similar to JavaLand - Integration Testing How-to (20)
SnowCamp - Adding search to a legacy applicationNicolas Fränkel
Most applications evolve to a point where they need to provide search capabilities. But updating an application is always a risk. Plus, sometimes, you don’t have access to the source code. The easiest way to access the data is by getting them directly from the database.
The initial load is the easiest step. However, how do you keep the search index in sync with the database? How do you keep the latency between the search store and the source of truth, so your users don’t have to wait for the next run of the batch to access the newest changes?
In this live coding session, we will show you how you can solve this issue by connecting Elasticsearch to the database with a touch of Hazelcast.
On dit que GitHub est le CV d'un développeur. Un rapide coup d'œil à votre historique de commit et les recruteurs savent tout de vous. Cette approche comporte quelques problèmes. La plupart des entreprises ne publient même pas leur code sous une licence Open Source. Si vous travaillez pour l'une d'entre elles, et si vous n'êtes pas un développeur Open Source les soirs et les week-ends, alors vous n'avez aucune chance.
Récemment, GitHub a permis un certain degré de personnalisation de son profil. Ainsi, même si votre historique de commit a plus de blanc que de vert, vous pouvez fournir un bon point d'entrée pour les employeurs potentiels. Mais ça ne vaut que l'effort que vous y mettez et les données perdent leur valeur rapidement. Pourtant, avec un peu de travail et l'aide d'outils d'automatisation (tels que GitHub Actions), vous pouvez présenter un profil toujours à jour.
Zero-downtime deployment on Kubernetes with HazelcastNicolas Fränkel
Kubernetes allows a lot. After discovering its features, it’s easy to think it can magically transform your application deployment process into a painless no-event. For Hello World applications, that is the case. Unfortunately, not many of us do deploy such applications day-to-day because we need to handle state. Though it would be much easier to have stateless apps, and despite our best efforts in this direction, state is found in (at least) two places: sessions and databases.
You need to think keeping the state while stopping and starting application nodes. In this talk, I’ll demo how to update a Spring Boot app deployed on a Kubernetes cluster with a non-trivial database schema change with the help of Hazelcast, while keeping the service up during the entire update process.
jLove - A Change-Data-Capture use-case: designing an evergreen cacheNicolas Fränkel
When one’s app is challenged with poor performances, it’s easy to set up a cache in front of one’s SQL database. It doesn’t fix the root cause (e.g. bad schema design, bad SQL query, etc.) but it gets the job done. If the app is the only component that writes to the underlying database, it’s a no-brainer to update the cache accordingly, so the cache is always up-to-date with the data in the database.
Things start to go sour when the app is not the only component writing to the DB. Among other sources of writes, there are batches, other apps (shared databases exist unfortunately), etc. One might think about a couple of ways to keep data in sync i.e. polling the DB every now and then, DB triggers, etc. Unfortunately, they all have issues that make them unreliable and/or fragile.
You might have read about Change-Data-Capture before. It’s been described by Martin Kleppmann as turning the database inside out: it means the DB can send change events (SELECT, DELETE and UPDATE) that one can register to. Just opposite to Event Sourcing that aggregates events to produce state, CDC is about getting events out of states. Once CDC is implemented, one can subscribe to its events and update the cache accordingly. However, CDC is quite in its early stage, and implementations are quite specific.
In this talk, I’ll describe an easy-to-setup architecture that leverages CDC to have an evergreen cache.
BigData conference - Introduction to stream processingNicolas Fränkel
While “software is eating the world”, those who are able to best manage the huge mass of data will emerge out on the top.
The batch processing model has been faithfully serving us for decades. However, it might have reached the end of its usefulness for all but some very specific use-cases. As the pace of businesses increases, most of the time, decision makers prefer slightly wrong data sooner, than 100% accurate data later. Stream processing – or data streaming – exactly matches this usage: instead of managing the entire bulk of data, manage pieces of them as soon as they become available.
In this talk, Nicolas will define the context in which the old batch processing model was born, the reasons that are behind the new stream processing one, how they compare, what are their pros and cons, and a list of existing technologies implementing the latter with their most prominent characteristics. He’ll conclude by describing in detail one possible use-case of data streaming that is not possible with batches: display in (near) real-time all trains in Switzerland and their position on a map. He’ll go through the all the requirements and the design. Finally, using an OpenData endpoint and the Hazelcast platform, he’ll try to impress attendees with a working demo implementation of it.
ADDO - Your own Kubernetes controller, not only in GoNicolas Fränkel
In Kubernetes, operators allow the API to be extended to your heart content. If one task requires too much YAML, it’s easy to create an operator to take care of the repetitive cruft, and only require a minimum amount of YAML.
On the other hand, since its beginnings, the Go language has been advertised as closer to the hardware, and is now ubiquitous in low-level programming. Kubernetes has been rewritten from Java to Go, and its whole ecosystem revolves around Go. For that reason, It’s only natural that Kubernetes provides a Go-based framework to create your own operator. While it makes sense, it requires organizations willing to go down this road to have Go developers, and/or train their teams in Go. While perfectly acceptable, this is not the only option. In fact, since Kubernetes is based on REST, why settle for Go and not use your own favorite language?
In this talk, I’ll describe what is an operator, how they work, how to design one, and finally demo a Java-based operator that is as good as a Go one.
TestCon Europe - Mutation Testing to the Rescue of Your TestsNicolas Fränkel
Unit testing ensures your production code is relevant. But what does ensure your testing code is relevant? Come discover mutation testing and make sure your never forget another assert again.
In the realm of testing, the code coverage metrics is the most often talked about. However, it doesn’t mean that the test has been useful or even that an assert has been coded. Mutation testing is a strategy to make sure that the test code is relevant.
In this talk, Nicolas will explain how Code Coverage is computed and what its inherent flaw is. Afterwards, he will describe how Mutation Testing work and how it helps pointing out code that is tested but leave out corner cases. He will also demo PIT, a Java production-grade framework that enables Mutation Testing.
OSCONF Jaipur - A Hitchhiker's Tour to Containerizing a Java applicationNicolas Fränkel
As “the Cloud” becomes more and more widespread, now is a good time to assess how you can containerize your Java application. I assume you’re able to write a a Dockerfile around the generated JAR. However, each time the application’s code will change, the whole image will need to be rebuilt. If you’re deploying to a local Kubernetes cluster environment, this increases that much the length of the feedback loop.
In this demo-based talk, I’ll present different ways to get your Java app in a container: Dockerfile, Jib, and Cloud Native Buildpacks. We will also have a look at what kind of Docker image they generate, how they layer the images, whether those images are compatible with skaffold, etc.
GeekcampSG 2020 - A Change-Data-Capture use-case: designing an evergreen cacheNicolas Fränkel
CDC is a brand new approach that "turns the database inside out": it allows to get events out of the database state. This can be leveraged to get a cache that is never stale.
JavaDay Istanbul - 3 improvements in your microservices architectureNicolas Fränkel
While a microservices architecture is more scalable than a monolith, it has a direct hit on performance.
To cope with that, one performance improvement is to set up a cache. It can be configured for database access, for REST calls or just to store session state across a cluster of server nodes. In this demo-based talk, I’ll show how Hazelcast In-Memory Data Grid can help you in each one of those areas and how to configure it. Hint: it’s much easier than one would expect.
At a point in the past, it was forecast that Java would die, but the JVM platform would be its legacy. And in fact, for a long time, the JVM has been tremendously successful. Wikipedia itself lists a bunch of languages that run on it, some of them close to Java e.g. Kotlin, some of them very remote e.g. Clojure.
But nowadays, the Cloud is becoming ubiquitous. Containerization is the way to go to alleviate some of the vendor lock-in issues. Kubernetes is a de facto platform. If a container needs to be killed for whatever reason (resource consumption, unhealthy, etc.), a new one needs to replace it as fast as possible. In that context, the JVM seems to be a dead-end: its startup time is huge in comparison to a native process. Likewise, it consumes a lot of memory that just increase the monthly bill.
What does that mean for us developers? Has all the time spent in learning the JVM ecosystem been invested with no hope of return over investment? Shall we need to invest even more time in new languages, frameworks, libraries, etc.? That is one possibility for sure. But we can also leverage our existing knowledge, and embrace the Cloud and containers ways with the help of some tools.
In this talk, I’ll create a simple URL shortener with a “standard” stack: Kotlin, JAX-RS and Hazelcast. Then, with the help of Quarkus and GraalVM, I’ll turn this application into a native executable with all Cloud/Container related work has been moved to the build process.
Devclub.lv - Introduction to stream processingNicolas Fränkel
While “software is eating the world”, those who are able to best manage the huge mass of data will emerge out on the top.
The batch processing model has been faithfully serving us for decades. However, it might have reached the end of its usefulness for all but some very specific use-cases. As the pace of businesses increases, most of the time, decision-makers prefer slightly wrong data sooner, than 100% accurate data later. Stream processing – or data streaming – exactly matches this usage: instead of managing the entire bulk of data, manage pieces of them as soon as they become available.
OSCONF Koshi - Zero downtime deployment with Kubernetes, Flyway and Spring BootNicolas Fränkel
Kubernetes allows a lot. After discovering its features, it’s easy to think it can magically transform your application deployment process into a painless no-event. For Hello World applications, that is the case. Unfortunately, not many of us do deploy such applications day-to-day. You need to think about application backward compatibility, possible rollback, database schema migration, etc. I believe the later is one of the biggest pain point. In this talk, I’ll demo how to update a Spring Boot app deployed on a Kubernetes cluster with a non-trivial database schema migration with the help of Flyway, while keeping the service up during the entire update process.
JOnConf - A CDC use-case: designing an Evergreen CacheNicolas Fränkel
When one’s app is challenged with poor performances, it’s easy to set up a cache in front of one’s SQL database. It doesn’t fix the root cause (e.g. bad schema design, bad SQL query, etc.) but it gets the job done. If the app is the only component that writes to the underlying database, it’s a no-brainer to update the cache accordingly, so the cache is always up-to-date with the data in the database.
Things start to go sour when the app is not the only component writing to the DB. Among other sources of writes, there are batches, other apps (shared databases exist unfortunately), etc. One might think about a couple of ways to keep data in sync i.e. polling the DB every now and then, DB triggers, etc. Unfortunately, they all have issues that make them unreliable and/or fragile.
You might have read about Change-Data-Capture before. It’s been described by Martin Kleppmann as turning the database inside out: it means the DB can send change events (SELECT, DELETE and UPDATE) that one can register to. Just opposite to Event Sourcing that aggregates events to produce state, CDC is about getting events out of states. Once CDC is implemented, one can subscribe to its events and update the cache accordingly. However, CDC is quite in its early stage, and implementations are quite specific.
In this talk, I’ll describe an easy-to-setup architecture that leverages CDC to have an evergreen cache.
London In-Memory Computing Meetup - A Change-Data-Capture use-case: designing...Nicolas Fränkel
When one’s app is challenged with poor performances, it’s easy to set up a cache in front of one’s SQL database. It doesn’t fix the root cause (e.g. bad schema design, bad SQL query, etc.) but it gets the job done. If the app is the only component that writes to the underlying database, it’s a no-brainer to update the cache accordingly, so the cache is always up-to-date with the data in the database.
Things start to go sour when the app is not the only component writing to the DB. Among other sources of writes, there are batches, other apps (shared databases exist, unfortunately), etc. One might think about a couple of ways to keep data in sync i.e. polling the DB every now and then, DB triggers, etc. Unfortunately, they all have issues that make them unreliable and/or fragile.
In this talk, I will describe an easy-to-setup architecture that leverages CDC to have an evergreen cache.
This talk will be about the reasons behind the new stream processing model, how it compare to the old batch model, what are their pros and cons, and a list of existing technologies implementing stream processing with their most prominent characteristics. It will contain details of one possible use-case of data streaming that is not possible with batches: display in (near) real-time all trains in Switzerland and their position on a map, beginning with an overview of all the requirements and the design. Finally, using an OpenData endpoint and the Hazelcast platform,showing a working demo implementation of it.
Java.IL - Your own Kubernetes controller, not only in Go!Nicolas Fränkel
In Kubernetes, operators allow the API to be extended to your heart content. If one task requires too much YAML, it’s easy to create an operator to take care of the repetitive cruft, and only require a minimum amount of YAML.
On the other hand, since its beginnings, the Go language has been advertised as closer to the hardware, and is now ubiquitous in low-level programming. Kubernetes has been rewritten from Java to Go, and its whole ecosystem revolves around Go. For that reason, It’s only natural that Kubernetes provides a Go-based framework to create your own operator. While it makes sense, it requires organizations willing to go down this road to have Go developers, and/or train their teams in Go. While perfectly acceptable, this is not the only option. In fact, since Kubernetes is based on REST, why settle for Go and not use your own favorite language?
In this talk, I’ll describe what is an operator, how they work, how to design one, and finally demo a Java-based operator that is as good as a Go one.
While “software is eating the world”, those who are able to best manage the huge mass of data will emerge out on the top.
The batch processing model has been faithfully serving us for decades. However, it might have reached the end of its usefulness for all but some very specific use-cases. As the pace of businesses increases, most of the time, decision makers prefer slightly wrong data sooner, than 100% accurate data later. Stream processing - or data streaming - exactly matches this usage: instead of managing the entire bulk of data, manage pieces of them as soon as they become available.
In this talk, I’ll define the context in which the old batch processing model was born, the reasons that are behind the new stream processing one, how they compare, what are their pros and cons, and a list of existing technologies implementing the latter with their most prominent characteristics. I’ll conclude by describing in detail one possible use-case of data streaming that is not possible with batches: display in (near) real-time all trains in Switzerland and their position on a map. I’ll go through the all the requirements and the design. Finally, using an OpenData endpoint and the Hazelcast platform, I’ll try to impress attendees with a working demo implementation of it.
London Java Community - An Experiment in Continuous Deployment of JVM applica...Nicolas Fränkel
A couple of years ago, continuous integration in the JVM ecosystem meant Jenkins. Since that time, a lot of other tools have been made available. But new tools don’t mean new features, just new ways. Besides that, what about continuous deployment? There’s no tool that allows deploying new versions of a JVM-based application without downtime. The only way to achieve zero downtime is to have multiple nodes deployed on a platform, and let that platform achieve that e.g. Kubernetes.
And yet, achieving true continuous deployment of bytecode on one single JVM instance is possible if one changes one’s way of looking at things. What if the compilation could be seen as changes? What if those changes could be stored in a data store, and a listener on this data store could stream those changes to the running production JVM via the Attach API?
In this talk, we'll demo exactly that using Hazelcast and Hazelcast Jet - but it’s possible to re-use the principles that will be shown using other streaming technologies.
OSCONF - Your own Kubernetes controller: not only in GoNicolas Fränkel
In Kubernetes, operators allow the API to be extended to your heart content. If one task requires too much YAML, it’s easy to create an operator to take care of the repetitive cruft, and only require a minimum amount of YAML.
On the other hand, since its beginnings, the Go language has been advertised as closer to the hardware, and is now ubiquitous in low-level programming. Kubernetes has been rewritten from Java to Go, and its whole ecosystem revolves around Go. For that reason, It’s only natural that Kubernetes provides a Go-based framework to create your own operator. While it makes sense, it requires organizations willing to go down this road to have Go developers, and/or train their teams in Go. While perfectly acceptable, this is not the only option. In fact, since Kubernetes is based on REST, why settle for Go and not use your own favourite language?
In this talk, I will describe what an operator is, how they work, how to design one, and finally demo a Java-based operator that is as good as a Go one.
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTier1 app
Even though at surface level ‘java.lang.OutOfMemoryError’ appears as one single error; underlyingly there are 9 types of OutOfMemoryError. Each type of OutOfMemoryError has different causes, diagnosis approaches and solutions. This session equips you with the knowledge, tools, and techniques needed to troubleshoot and conquer OutOfMemoryError in all its forms, ensuring smoother, more efficient Java applications.
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?
Accelerate Enterprise Software Engineering with PlatformlessWSO2
Key takeaways:
Challenges of building platforms and the benefits of platformless.
Key principles of platformless, including API-first, cloud-native middleware, platform engineering, and developer experience.
How Choreo enables the platformless experience.
How key concepts like application architecture, domain-driven design, zero trust, and cell-based architecture are inherently a part of Choreo.
Demo of an end-to-end app built and deployed on Choreo.
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.
We describe the deployment and use of Globus Compute for remote computation. This content is aimed at researchers who wish to compute on remote resources using a unified programming interface, as well as system administrators who will deploy and operate Globus Compute services on their research computing infrastructure.
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns
Unlocking Business Potential: Tailored Technology Solutions by Prosigns
Discover how Prosigns, a leading technology solutions provider, partners with businesses to drive innovation and success. Our presentation showcases our comprehensive range of services, including custom software development, web and mobile app development, AI & ML solutions, blockchain integration, DevOps services, and Microsoft Dynamics 365 support.
Custom Software Development: Prosigns specializes in creating bespoke software solutions that cater to your unique business needs. Our team of experts works closely with you to understand your requirements and deliver tailor-made software that enhances efficiency and drives growth.
Web and Mobile App Development: From responsive websites to intuitive mobile applications, Prosigns develops cutting-edge solutions that engage users and deliver seamless experiences across devices.
AI & ML Solutions: Harnessing the power of Artificial Intelligence and Machine Learning, Prosigns provides smart solutions that automate processes, provide valuable insights, and drive informed decision-making.
Blockchain Integration: Prosigns offers comprehensive blockchain solutions, including development, integration, and consulting services, enabling businesses to leverage blockchain technology for enhanced security, transparency, and efficiency.
DevOps Services: Prosigns' DevOps services streamline development and operations processes, ensuring faster and more reliable software delivery through automation and continuous integration.
Microsoft Dynamics 365 Support: Prosigns provides comprehensive support and maintenance services for Microsoft Dynamics 365, ensuring your system is always up-to-date, secure, and running smoothly.
Learn how our collaborative approach and dedication to excellence help businesses achieve their goals and stay ahead in today's digital landscape. From concept to deployment, Prosigns is your trusted partner for transforming ideas into reality and unlocking the full potential of your business.
Join us on a journey of innovation and growth. Let's partner for success with Prosigns.
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.
Developing Distributed High-performance Computing Capabilities of an Open Sci...Globus
COVID-19 had an unprecedented impact on scientific collaboration. The pandemic and its broad response from the scientific community has forged new relationships among public health practitioners, mathematical modelers, and scientific computing specialists, while revealing critical gaps in exploiting advanced computing systems to support urgent decision making. Informed by our team’s work in applying high-performance computing in support of public health decision makers during the COVID-19 pandemic, we present how Globus technologies are enabling the development of an open science platform for robust epidemic analysis, with the goal of collaborative, secure, distributed, on-demand, and fast time-to-solution analyses to support public health.
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
In software engineering, the right architecture is essential for robust, scalable platforms. Wix has undergone a pivotal shift from event sourcing to a CRUD-based model for its microservices. This talk will chart the course of this pivotal journey.
Event sourcing, which records state changes as immutable events, provided robust auditing and "time travel" debugging for Wix Stores' microservices. Despite its benefits, the complexity it introduced in state management slowed development. Wix responded by adopting a simpler, unified CRUD model. This talk will explore the challenges of event sourcing and the advantages of Wix's new "CRUD on steroids" approach, which streamlines API integration and domain event management while preserving data integrity and system resilience.
Participants will gain valuable insights into Wix's strategies for ensuring atomicity in database updates and event production, as well as caching, materialization, and performance optimization techniques within a distributed system.
Join us to discover how Wix has mastered the art of balancing simplicity and extensibility, and learn how the re-adoption of the modest CRUD has turbocharged their development velocity, resilience, and scalability in a high-growth environment.
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...informapgpstrackings
Keep tabs on your field staff effortlessly with Informap Technology Centre LLC. Real-time tracking, task assignment, and smart features for efficient management. Request a live demo today!
For more details, visit us : https://informapuae.com/field-staff-tracking/
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteGoogle
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
👉👉 Click Here To Get More Info 👇👇
https://sumonreview.com/ai-pilot-review/
AI Pilot Review: Key Features
✅Deploy AI expert bots in Any Niche With Just A Click
✅With one keyword, generate complete funnels, websites, landing pages, and more.
✅More than 85 AI features are included in the AI pilot.
✅No setup or configuration; use your voice (like Siri) to do whatever you want.
✅You Can Use AI Pilot To Create your version of AI Pilot And Charge People For It…
✅ZERO Manual Work With AI Pilot. Never write, Design, Or Code Again.
✅ZERO Limits On Features Or Usages
✅Use Our AI-powered Traffic To Get Hundreds Of Customers
✅No Complicated Setup: Get Up And Running In 2 Minutes
✅99.99% Up-Time Guaranteed
✅30 Days Money-Back Guarantee
✅ZERO Upfront Cost
See My Other Reviews Article:
(1) TubeTrivia AI Review: https://sumonreview.com/tubetrivia-ai-review
(2) SocioWave Review: https://sumonreview.com/sociowave-review
(3) AI Partner & Profit Review: https://sumonreview.com/ai-partner-profit-review
(4) AI Ebook Suite Review: https://sumonreview.com/ai-ebook-suite-review
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.
First Steps with Globus Compute Multi-User EndpointsGlobus
In this presentation we will share our experiences around getting started with the Globus Compute multi-user endpoint. Working with the Pharmacology group at the University of Auckland, we have previously written an application using Globus Compute that can offload computationally expensive steps in the researcher's workflows, which they wish to manage from their familiar Windows environments, onto the NeSI (New Zealand eScience Infrastructure) cluster. Some of the challenges we have encountered were that each researcher had to set up and manage their own single-user globus compute endpoint and that the workloads had varying resource requirements (CPUs, memory and wall time) between different runs. We hope that the multi-user endpoint will help to address these challenges and share an update on our progress here.
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/
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!
2. 2https://leanpub.com/integrationtest
Me, myself and I
Developer & Architect as consultant
Wide range of businesses & customers
Teacher & Trainer
Speaker
Blogger
http://blog.frankel.ch/
http://morevaadin.com/
7. 7https://leanpub.com/integrationtest
There are many different kinds of testing
Unit Testing
Mutation Testing
GUI Testing
Performance Testing
Load Testing
Stress Testing
Endurance Testing
Security Testing
etc.
8. 8https://leanpub.com/integrationtest
Unit Testing vs. Integration Testing
Unit Testing
Testing a unit in isolation
Integration Testing
Testing the collaboration of
multiple units
"Savatefouettéfigure1"byDaniel-PhotoDaniel.
12. 12https://leanpub.com/integrationtest
Unit Testing + Integration Testing
Approaches are not
exclusive but
complementary
Would you take a prototype
car on test drive without
having tested only nuts and
bolts?
Would you manufacture a car
from a prototype having only
tested nuts and bolts but
without having tested it on
numerous test drives?
14. 14https://leanpub.com/integrationtest
Testing is about ROI
The larger the SUT
The more fragile the test
The less maintainable the test
The less the ROI
Thus, tests have to be
organized in a pyramidal
way
The bigger the SUT
The less the number of tests
Integration Testing
Test standard cases
Generally not error cases
http://martinfowler.com/bliki/TestPyramid.html
17. 17https://leanpub.com/integrationtest
But IT are still slow?!
Separating UT & IT
doesn’t make IT run
faster
But you can uncover
errors from UT faster
Fail Fast
It will speed testing
"Gepardjagt2(Acinonyxjubatus)"byMaleneThyssen-Ownwork.
30. 30https://leanpub.com/integrationtest
Faking RESTful WS
Require an HTTP server
Requirements
Easy setup
Standalone
Embeddable in tests
Spring MVC?
Requires a servlet container
(Not with Spring Boot)
Some code to write
Author:DwightSiplerfromStow,MA,USA
36. 36https://leanpub.com/integrationtest
Challenges to the previous scenario
Craft the adequate response?
More likely get one from the real WS
And tweak it
Running in an automated way
Save the project
Get the SOAPUI jar
Read the project and launch
38. 38https://leanpub.com/integrationtest
Faking Web Service in real-life
Use the same rules as for UT
Keep validation simple
Test one thing
One Assert
Or a set of related ones
Keep setup simple
Don’t put complex logic
Don’t put too much logic
Don’t put logic at all
Duplicate setup in each test
Up to a point
Author:I,rolfB
42. 42https://leanpub.com/integrationtest
Spring
So far, we can test:
Beans which dependencies can be mocked (or not)
Service
Beans that depend on fake resources
Repository
What about the configuration?
In Unit Tests, we set dependencies
The real configuration is not used
Ergo, not tested!
47. 47https://leanpub.com/integrationtest
Tips
Prevent coupling
No fragments reference in fragments
Use top-level assembly instead
Tests
Application Context
Webapps
Pool exhaustion check
Set the maximum number of connections in the
pool to 1
Compile-time safety
Use JavaConfig
Not related to testing
48. 48https://leanpub.com/integrationtest
And now, how to test?
Get access to both
The entry point
The “end” point
Spring Test to the rescue
Integration with common
Testing frameworks
JUnit
TestNG
StLouisGatewayArch1916"byDirkBeyer-Ownwork.
51. 51https://leanpub.com/integrationtest
Sample TestNG test with Spring
@ContextConfiguration(
classes = { MainCfg.class, AnotherCfg.class })
public class OrderIT extends
AbstractTestNGSpringContextTests {
@Autowired
private OrderService orderService;
@Test
public void should_do_this_and_that() {
orderService.order();
Assert.assertThat(...)
}
}
52. 52https://leanpub.com/integrationtest
Testing with the DB (or other transactional resources)
Transactions
Bound to business
functionality
Implemented on Service layer
With DAO
Use explicit transaction
management
@Transactional
53. 53https://leanpub.com/integrationtest
Transaction management tip
Tests fail… sometimes
How to audit state?
By default, Spring rollbacks
transactions
General configuration
@TransactionConfiguration(
defaultRollback = false
)
Can be overridden on a per-
method basis
@Rollback(true)
60. 60https://leanpub.com/integrationtest
Spring Test to the rescue
Spring Test has a large
chunk dedicated to MVC
Since 3.2
Can test with URL as
entry-points
Fluent API with static
imports
CoastguardHelicopter(8016050677)"byPaulLucasfromLeicestershire,UK-CoastguardHelicopter
66. 66https://leanpub.com/integrationtest
Some other matchers
Request class
Handler class
Controller
Content class
Cookie class
Status class
HTTP code
Flash class
(Attributes, not the techno)
View class
Model class
"OvejasenPatagonia-Argentina"bywrittecarlosantonio
67. 67https://leanpub.com/integrationtest
The JavaEE world
JavaEE has unique
challenges
CDI has no explicit wiring
You can @Veto you own
classes
But no compiled ones
Different application servers
Same specifications
Different implementations
skinparam dpi 150
class A
class B
package SUT {
class C
class D
}
class E
class F
A .right.> B
B .down.> C
C .right.> D
D ..> E
E .right.> F
hide empty members
skinparam dpi 150
package "Test Config" <<Rect>> {
class "<bean\nclass='o.a.t.j.p.DataSource'>" as testdb
}
package "Prod Config" <<Rect>> {
class "<jee:jndi-lookup\njndi-name='jdbc/MyDS' />" as jndidb
}
package "Main Config" <<Rect>> {
class Service
class Repository
class "id=datasource" as dbbean
}
Service --> "1" Repository
Repository --> "1" dbbean
testdb -up-|> dbbean
jndidb -up-|> dbbean
hide circle
hide empty members