Elias Nogueira
Senior Principal Software Engineer at Backbase
Utrecht, The Netherlands
Actions
Elias is a Java Champion, Oracle ACE Pro, Java Magazine NL and Senior Principal Software Engineer at Backbase.
He shares content related to Java, OSS and Quality Engineering at conferences, meetups, articles and open-source conferences.
Links
Area of Expertise
Topics
Modern Testing Tools for Java Developers
New versions of the API framework appear, adding the last trending and here we go again: changing our code to adopt these new things. How awesome it is! We are improving!
How about one of the most important and, sometimes, missed things: quality! How the quality evolves within the adoption of new versions of development frameworks and libraries?
This talk will show you 5 libraries you can use, as a Java Developer, to improve the application quality with real-world examples.
AssertJ will give you infinity assertion possibilities compared to JUnit internals and Hamcrest matches, enabling you to easily use any kind of assertion, even creating your own.
You will learn how to use these tools with real-world examples!
PiTest will increase, even more, the coverage of your tests by applying the mutation testing technique and creating bullet-proof unit tests.
RestAssured will take your API tests to the next level where, using it as a "hard user", can ease the test creation based on an OpenAPI specification.
Awaitability will solve one of the biggest problems in the API tests: asynchronous calls/messages (mainly in a messaging system). We will be able to wait for the request to be completed to assert any result.
Wiremock will give you the ability not only restricted as a mock solution for your unit and integration test but as a service virtualization tool solving common problems in an integrated environment.
Parallel frontend test execution using Selenium and Docker
Nowadays, the main problem regarding frontend test execution is the time spent to cover the necessary scenarios to get the proper quality feedback. It's no wonder that we are focusing more on the earlier test stages like unit and integration. But frontend tests are also important, so how to make them faster?
I could reduce 2 days of manual tests to 35min of sequential tests to 6min parallel tests for the same test suite! So you also can!
We can achieve it by mixing a parallel test execution strategy together with a container approach, auto-scaling its usage of it per request. Do you think it's complicated? Believe me, it's not!
The trick is done by combining three different things:
1. a good code design, preparing it for a test parallelization using the Factory Pattern to create different driver instances based on the test requests
2. the usage of the built-in parallel strategy from your preferred test library
3. the usage of the Selenium 4 Grid containers, creating an orchestration to be able to auto-scale the different containers with web browsers
We will combine it all together, learning how to create the necessary code with the infrastructure to speed up the front-end test execution.
How to fast generate your API Test with OpenAPI Tools and Rest-Assured
The creation of API Test Automation using Java and Rest-Assured might be boring because it always follows the same repeated pattern: creating the code to make the HTTP requests, the model classes used in the responses, the object mapping, and the tests.
With the usage of the OpenAPI Tools, we can quickly generate the client code and the test stubs, speeding up the development process.
You will also learn the possible problems during its adoption that can add more maintenance effort and how to solve it with abstractions.
You will learn how to use an OpenAPI specification to automatically generate the client code to use in your test, as we will call it basic usage. As the first improvement, you will learn how to use templates and automatically create custom client and test code. And as the ultimate improvement, you will learn how to decrease the maintenance and focus on a more business-driven development by creating abstractions on top of the client code. Everything will be hands-on.
Build robust API tests with RestAssured
This workshop will show you how to use a different approach from SpringTest or any other tool to build robust API tests in the integration later or intra-services.
Rest-Assured is a well-known Java DSL for testing REST services, giving software engineers a lot of freedom during the test automation process creation.
The workshop will start with the RestAssured basics and how we can use any REST API methods in a test, followed by some features such as authentication, request and response specification, and authentication.
After all the basic approaches you will learn how to apply some design and testing patterns such as Base Test Class and Test Data Factory to remove all code duplication. To enable a more robust architecture you will learn how to create abstraction on top of the auto-generated client code, creating a service abstraction to deal with different requests. This will allow you to extend the API test coverage and think about integration tests without mocks!
Steps
This will be what you will learn during the workshop:
- Basic Rest-Assured concepts
- Request and Response specifications
- Filters
- How to automate any test given the REST API methods
- How to build a robust framework for intra-service testing using:
- Open API library to generate the client code
- Abstractions for REST configuration, client definition, and service definition
Modern Testing Tools for Java Developers
We are, constantly, evolving the codebase by applying the best development practices, approaches, and design patterns. There's a lot of support from frameworks and libraries to do this during the SDLC.
New versions of the API framework appear, adding the last trending and here we go again: changing our code to adopt these new things. How awesome it is! We are improving!
How about one of the most important and, sometimes, missed things: quality! How the quality evolves within the adoption of new versions of development frameworks and libraries?
This talk will show you 5 libraries you can use, as a Java Developer, to improve the application quality with real-world examples.
AssertJ will give you infinity assertion possibilities compared to JUnit internals and Hamcrest matches, enabling you to easily use any kind of assertion, even creating your own.
You will learn how to use these tools with real-world examples!
PiTest will increase, even more, the coverage of your tests by applying the mutation testing technique and creating bullet-proof unit tests.
TestContainers will add the flexibility to remove hard dependencies like databases, messaging, vault, frontend containers, and more.
RestAssured will take your API tests to the next level where, using it as a "hard user", can ease the test creation based on an OpenAPI specification.
Awaitability will solve one of the biggest problems in the API tests: asynchronous calls/messages (mainly in a messaging system). We will be able to wait for the request to be completed to assert any result.
Wiremock will give you the ability not only restricted as a mock solution for your unit and integration test but as a service virtualization tool solving common problems in an integrated environment.
Managing Testing Data
Have you ever tried to troubleshoot an issue taking a looking at the log files? I bet you did! And it turns out the issue is related to data usage because, you know, users will use real data! Developers won't! A good thing about your recent troubleshooting is that you can understand the data. It's not a bunch of numbers or UUIDs in the name field. How about your development environment? Probably you use either hard-coded data or random strings. We must fix that!
This presentation will show you how to manage testing data in two different ways.
The first way is the creation of a Test Data Factory approach, where we will use the Factory Pattern to easily create any objects we want with understandable and reliable data. This approach will make you in control of your own data, so you can find any bug in the early stages of the SDLC and the DataFaker library will help us to generate good random data in every execution.
In a second way, we will learn and apply the Data-Driven Testing approach, where the same requirement can be applied to different sets of data, generating different results. This approach can reduce the amount of code and the execution time. With the support of JUnit 5 you will learn how to do it in 5 different ways: value source, internal method source, external method source, argument provider, and CVS source.
Good testing practices in an open-source project
Nowadays the contribution guide in every open-source project is not sufficient to describe the approaches, techniques, and how people solve break changes.
We all know: they are the most democratic projects we can work on, but sometimes not follow basic practices to elevate the project quality.
This talk will show you how to help the projects and the contributors to better understand the documentation, how they can contribute, and the process for it. You will learn about:
Changelog: how it’s important to maintain to tell others about the important changes made in the project, also maintaining it following the SemVer approach.
Breaking changes: it will show the breaking changes made in the project and how to solve them, hardly connected to both Changelog and SemVer.
Testing guide: approaches, ways of test creation, patterns, and tools in use will be placed on this guide to help the contributors to write better tests, extending the coverage and keeping the project’s quality level.
Enhancing Project Integrity: A Modernization for Bug-Free Code
Embarking on a Java project involves employing the best strategies, patterns, and architectural decisions, all geared towards a customer-centric.
Yet, there exists an often overlooked facet: quality assurance. While not entirely disregarded, we, as developers, sometimes limit ourselves to performing the basic unity and integration tests, which may leave room for bugs.
Fortunately, there are several straightforward approaches and tools that can be implemented to deliver a bug-free project with minimal effort.
During this presentation, you'll gain practical knowledge of the application of the following tools and approaches:
- ArchUnit: Ensuring consistent adherence to architectural patterns, even when multiple developers making changes to the project
- FindBugs: Employing static analysis to proactively identify potential bugs in your code, effortlessly.
- SonarQube: Offering a suite of diverse metrics and enabling the establishment of quality gates to maintain a predetermined standard of quality
- PiTest: Enabling the power of mutation testing to uncover bugs that may otherwise remain concealed.
- TestContainers: Streamlining the process of running various components such as databases, services, and extensions, thereby minimizing the need for manual intervention
Throughout the session, we'll delve into concrete examples, ensuring a hands-on experience
Datafaker: the most powerful fake data generator library
Data generators in software testing play a critical role in creating realistic and diverse datasets for testing scenarios. However, they present challenges, such as ensuring data diversity, maintaining quality, facilitating validation, and ensuring long-term maintainability.
While many engineers are familiar with these challenges, they often resort to non-specialized tools like the RandomStringUtils class from Apache Commons or the Random class, concatenating fixed data with it. This approach lacks scalability and may not yield a valid dataset.
Thankfully we have DataFaker, a library for Java and Kotlin to generate fake data, based on generators, that can be very helpful when generating test data to fill a database, to generate data for a stress test, or to anonymize data from production services.
With practical examples, you will learn how to generate data based on:
- different or multiple locales
- random enum values
- different generators like address, code (books), currency, date and time, finance, internet, measurement, money, name, time, and others
- custom (data) providers
- sequences (collections and stream)
- date formats
- expressions
- transformations
- unique values
In the end, patterns for generating better data like the Test Data Factory will also take place to add more control to the data generation.
Elias Nogueira
Senior Principal Software Engineer at Backbase
Utrecht, The Netherlands
Links
Actions
Please note that Sessionize is not responsible for the accuracy or validity of the data provided by speakers. If you suspect this profile to be fake or spam, please let us know.
Jump to top