Tutorial - 1 | Record and Replay | Automate Regression Testing with Unlogged.io

Опубликовано: 01 Сентябрь 2023
на канале: Unlogged
1,089
13

Welcome, Java folks! In this video series, we will guide you through the process of automating your regression testing, with just one dependency.

In this series, you'll learn how to:

1. Get Started: We'll walk you through the initial setup process.
2. Record and Replay Java Methods: Discover how to record and replay Java methods effortlessly.
3. Add Assertions: Learn how to add assertions to your replays for robust testing.
4. Track Code Coverage: Understand how to track code coverage effectively.
5. Mock Dependencies: Explore the process of mocking dependencies for smoother testing.

Unlogged.io automatically records method input and return values, providing a safety net for your code changes. If you make any alterations, you can hot reload these changes and replay the saved values. Plus, you'll receive instant alerts if your code changes introduce regressions.

We've prepared a demo project available on our GitHub repository for you to experiment with. (https://github.com/unloggedio/unlogge...)

Ready to dive in? You can easily install the Unlogged.io plugin from JetBrains' marketplace.

Getting Started:

1. Add Unlogged's SDK to your project.
2. Identify methods marked with red icons and add the necessary dependencies to your pom.xml (or Gradle if you're using Gradle).
3. Add the @Unlogged annotation above your main method.
4. Perform a Maven clean or Gradle clean to ensure Unlogged works seamlessly.
5. Now, launch your project in Debug mode, and watch as the red icons turn cyan, signifying Unlogged is ready to record method inputs and return values.

Need to test a specific method? Click on the gutter icon next to it, invoke the method with relevant arguments, and examine the response in Direct Invoke. Keep an eye out for icons turning pink, indicating available replays.

As you make code changes, look for the bolt icon, which signals that the method needs to be replayed. A simple click hot reloads the changes and replays all candidates, showing their execution results.

In our upcoming video, we'll delve into defining custom assertions, an essential skill for your regression testing toolkit.

Stay tuned for more valuable insights, and happy coding!

Don't forget to like, share, and subscribe to stay updated with our latest tutorials. If you have questions or need assistance, feel free to leave a comment below. We're here to help you master regression testing with Unlogged.io.

#UnloggedIO #JavaDevelopment #RegressionTesting #Automation #JavaDevelopers #CodingTutorials