Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eliasnogueira/6d760f136642a3e09c99c4cdd8f83509 to your computer and use it in GitHub Desktop.
Save eliasnogueira/6d760f136642a3e09c99c4cdd8f83509 to your computer and use it in GitHub Desktop.
3 Design Patterns and Architecture Decisions you must use in your project

Title

3 Design Patterns and Architecture Decisions you must use in your project  

Description

Have you ever found yourself in a situation where your code was highly maintained, requiring a high investment of time to find out what doesn't work? One of the starting points to solve this problem is to adopt design patterns and architectural decisions that will allow us to create better and more reliable tests.

The process to create any type of test at any level is not an easy activity. It's even harder when we cross the unit testing line to test other levels like integration, API, Web, and Mobile. We can benefit and solve many problems by adopting simple solutions with known design patterns, good architecture decisions, and the right libraries. In this presentation you will learn, through a living code, how to use the following design/testing patterns:

  • Base Test Class: not only the basics but why you can be benefited from multiples bases tests classes
  • Fluent builder: we can use it to create fluent interfaces, data objects and bring fluency in the usage of the methods
  • Factory: does not matter if you are going to create a browser instance or open a new mobile device… it must be used in all targeting environments to test A good test architecture does not survive without the right Architecture Decisions and there are three that can help you to succeed:
  • Data Generation: we can apply different strategies like the Test Data Factory, Data-Driven, or even consuming data from dynamic data sources
  • Configuration management: because we don't have much time to change the code all the time we can use a proper configuration approach to avoid changes in the codebase
  • Logs and reports: logs will help us to better understand what happened in that failed test, where reports will generate information that everyone can understand

The presentation will be a mix of slides and live code. The purpose here is to give the audience basic knowledge about the topics and show them how to implement them through the live code.

The presentation will be a mix of slides and live code. The purpose here is to give the audience the basic knowledge about the topics and show them how to implement it through the live code.

Technologies in use

I will use Java as the programming language. Examples for Web using Selenium WebDriver and API using RestAssured, all test creating supported by JUnit 5. Libraries are an important ally, so I will use Owner to manage the properties files, Log4J2 to manage the log and Allure Reports to manage the reports.

Target audience

The target audience is professional software engineers at any seniority level that wants to improve their test architecture projects.

Takeaways

After this presentation the audience will:

  • Learn how they can apply 3 different design/testing patterns
  • Learn how to implement 3 architectural decisions in their test projects
  • Have a concrete coding example that can be replicated in a professional environment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment