projectkudu/kudu — pull request #961 by suwatch (2014-01-13 01:48:44+00:00)
Title: add test harness xunit attribute to support retry and others

the motivation is to allow auto retry when test failed (this is often what we do when investigate error). there are 3 test settings below (commented in codes).

// Number of retries. When test failed, it will be re-tried
// based on this value. Default 0 means never retry.
public const int DefaultRetries = 0;

// If retry successful, suppress any error and report as success result.
// Default is false means always report as error.
public const bool DefaultSuppressError = false;

// Number of iterations. this is used when you want to stress
// the test and running it in a loop. Default is 1 means run only once.
// Regardless of this settings, it will always stop on first failures.
public const int DefaultRuns = 1;

// Override via Test assembly's appSettings
public const string RunsSettingKey = "TestHarness.Runs";
public const string RetriesSettingKey = "TestHarness.Retries";
public const string SuppressErrorSettingKey = "TestHarness.SuppressError";