AWS Transform for .NET Now Auto-Generates Unit Tests Alongside Your Migration!
Hi, I'm Shii-chan!
AWS What's NewToday I found an update that takes care of one of those tedious post-migration chores: writing tests for code you just modernized. Let's dive in!
What was announced?
According to AWS What's New, AWS Transform for .NET can now automatically generate unit tests for the code it modernizes. When enabled, it generates unit tests that target the testable classes in your transformed .NET application, such as business logic and controllers, all within the same job that performs the migration.
The story so far
Modernizing a .NET Framework application to modern .NET used to get you a transformed, buildable codebase, but the test coverage for that modernized code still had to be written by hand. Even after a successful migration, teams had to spend extra time writing tests from scratch just to confirm the behavior hadn't changed.
What changes
When unit test generation is enabled, AWS Transform assesses your application for testability in parallel with the standard .NET assessment. It then plans which classes and methods to cover and generates the corresponding unit test code. That means you finish the migration with a test safety net already in place, instead of starting from zero. Unit test generation is opt-in, and you can turn it on either at the start of a job or after the transformation completes.
Dive Deep
Here's what's supported:
- Tooling: the AWS Toolkit for Visual Studio extension
- Regions: all AWS Regions where AWS Transform for .NET is supported
To get started, just run a .NET transformation with AWS Transform for .NET in Visual Studio and choose to generate unit tests. For the full walkthrough, check "Modernizing .NET in the IDE" in the AWS Transform User Guide before you try it.
Wrap-up
- AWS Transform for .NET can now automatically generate unit tests for modernized code
- It targets testable classes such as business logic and controllers
- Testability assessment, planning, and test generation all happen within the same migration job
- It's opt-in, enabled either at job start or after transformation completes
- Available through the AWS Toolkit for Visual Studio extension, in all supported regions
If your team has a .NET Framework to modern .NET migration coming up, this update cuts down on the manual test-writing work you'd otherwise face afterward.