You can edit almost every page by Creating an account and confirming your email.

Deterministic simulation testing

From EverybodyWiki Bios & Wiki

Deterministic simulation testing (DST) is a type of software testing for testing distributed systems.

It is used to test the FoundationDB and Turso databases.

A global seed for randomness is used.

In Python the random number generator can be seeded using the seed function in the random module.[1]

random.seed(42)

On the .NET platform an instance of the Random class can be seeded by providing a seed to the constructor.[2]

var random = new Random(42);

On the .NET platform the FakeTimeProvider[3] class can be used, which derives from the TimeProvider abstract class.[4]

var datetime = new DateTime(1969, 07, 20);
var time = new FakeTimeProvider(datetime);

internal class Foo(TimeProvider timeProvider)
{
    // ...
}

In other programming languages a mock object can be used.

References

  1. "random — Generate pseudo-random numbers". Python documentation. Retrieved 3 December 2024.
  2. "Random Class (System)". learn.microsoft.com. Retrieved 3 December 2024.
  3. "FakeTimeProvider Class (Microsoft.Extensions.Time.Testing)". learn.microsoft.com. Retrieved 3 December 2024.
  4. "TimeProvider Class (System)". learn.microsoft.com.

External links

Template:Software testing


This article "Deterministic simulation testing" is from Wikipedia. The list of its authors can be seen in its historical and/or the page Edithistory:Deterministic simulation testing. Articles copied from Draft Namespace on Wikipedia could be seen on the Draft Namespace of Wikipedia and not main one.