Tag Archives: software-development

How Redgate’s Test Data Manager Can Enhance Automated Testing

A brief overview of the benefits and challenges of automated testing and how Redgate’s Test Data Manager can help.


Automated testing uses software tools to execute predefined tests on a software application, system, or platform. Automated testing can help developers and testers verify their products’ functionality, performance, security, and usability and identify and fix bugs faster and more efficiently. Automated testing can reduce manual testing costs and time, improve software quality and reliability, and enable continuous integration and delivery.

However, automated testing is not a silver bullet that can solve all software development problems. Automated testing also has some limitations and challenges, such as:

  • It requires a significant upfront investment in developing, maintaining, and updating the test scripts and tools.
  • It cannot replace human judgment and creativity in finding and exploring complex or unexpected scenarios.
  • It may not cover all the possible test and edge cases, especially for dynamic and interactive applications.
  • It may generate false positives or negatives, depending on the quality and accuracy of the test scripts and tools.

One of the critical challenges of automated testing is to ensure that the test data used for the test scripts are realistic, relevant, and reliable. Test data are the inputs and outputs of the test scripts, and they can significantly impact the outcome and validity of the test results. Test data can be sourced from various sources, such as production, synthetic, or test data generators. However, each source has advantages and disadvantages, and none can guarantee the optimal quality and quantity of test data for every test scenario.

That’s why Redgate Test Data Manager from Redgate is a valuable tool for automated testing. Test Data Manager is a software solution that helps developers and testers create, manage, and provision test data for automated testing. Test Data Manager can help to:

  • Create realistic and relevant test data based on the application’s data model and business rules.
  • Manage and update test data across different environments and platforms.
  • Provision test data on demand, in the proper format and size, for the test scripts.
  • Protect sensitive and confidential data by masking or anonymizing them.
  • Optimize test data usage and storage by deleting or archiving obsolete or redundant data.

By using TDM, developers and testers can enhance the quality and efficiency of automated testing, as well as the security and compliance of test data. TDM can help reduce the risk of test failures, errors, and delays and increase confidence and trust in the test results. TDM can also help save time and money by reducing the dependency on manual processes and interventions and maximizing the reuse and value of test data.

Automated testing is an essential and beneficial practice for software development, but it has some challenges and limitations. Test data management is one of the critical factors that can influence the success and effectiveness of automated testing. Using a tool like TDM from Redgate, developers and testers can create, manage, and provision test data for automated testing more efficiently, reliably, and securely.

Removing Read Only Attribute From Files Using SSIS

Recently, I had built an SSIS package that searches my TFS structure after getting the latest version. I had many files I needed to bring over to one location; so to do this I built out a simple SSIS package. I failed to realize that when I bring my files down from TFS to my local environment they are protected as read only. This causes me a problem as I am not able to clear out my repository directory ~ you will inevitably get a “permission denied” error.

To prohibit manual intervention every time I perform this action I tacked on a Script Task property to my package. The basic flow of the package is as follows:

  • Check if my landing zone (repository) is available. If it is then use the existing directory if it is not than create it.
  • If there are any files in the directory prior to bringing over my new files than obliterate them from the directory.
  • Grab 16 various files from different locations and drop them into the landing zone.
  • Turn off the read only attribute of the files brought over.
  • Rinse and repeat as needed.

It is in step 5 where I turn off the read only attribute. As you can see the file system task in my package is below:

Read Only Attribute (Script Task)

By double clicking the Script Task you will be taken to a Script Task Editor screen. Simply click on “Edit Script”:

Edit Script Task

After clicking on the “Edit Script” button you will be taken to an SSIS Script editor. The below code provides a simple way of removing the read only attribute; in my beta version I have left the value hard-coded but eventually I would like to pass this is as a parameter so that I won’t have to come inside the code to change it. Also note that you can swap out the false with true and turn the read only attribute back on.

public void Main()
{
{
System.IO.DirectoryInfo directory = new System.IO.DirectoryInfo(@”C:\INRepository”);

foreach (System.IO.FileInfo fi in directory.GetFiles())
{
fi.IsReadOnly = false; // or true
}
}
}