完 Cleaning up after your integration test?

by Jun 21, 2023

完 Cleaning up after your integration test?

Stop doing that!

When you do an integration test, you often need to create a record in the database.

These tests are often wrapped in a try..finally statement, where the just created record is being cleaned up in the finally section.

Don’t clean-up after te test.

Do clean-up before you do the test!

Benefits:

儭 Really start with a clean state, even when you are debugging your test and stop half-way.

儭 Get rid of the try…finally statement around your test.

儭 When the test fails, you can still review the created record for problems. It’s still there!

#

Subscribe to
The Daily Friction

A daily newsletter on automation and eliminating friction

Related Content

Small, Daily Steps to Success!

Small, Daily Steps to Success! Success isn't birthed from grand, one-time events. It's the result of consistent, everyday actions. For instance, reading 10 pages daily trumps consuming a book in one go. This principle applies to fitness, relationships and business...

read more

Is Campaign still being used in Dynamics 365 Sales (CRM)?

Is Campaign still being used in Dynamics 365 Sales (CRM)? Campaign management has already been a long time in Dynamics 365 Sales, but is it still being used out in the wild? You can create a Campaign as a container for actions. You can add a Marketing List as a target...

read more

Think you need approval? Think again.

Think you need approval? Think again. In the fast-paced world of business, time is not just money; its everything. Yet, many processes are still handcuffed by the need for approvals. It's a common misconception that every decision needs a green light from someone...

read more
Share This