Deterministic simulation testing
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
- ↑ "random — Generate pseudo-random numbers". Python documentation. Retrieved 3 December 2024.
- ↑ "Random Class (System)". learn.microsoft.com. Retrieved 3 December 2024.
- ↑ "FakeTimeProvider Class (Microsoft.Extensions.Time.Testing)". learn.microsoft.com. Retrieved 3 December 2024.
- ↑ "TimeProvider Class (System)". learn.microsoft.com.
External links
- https://notes.eatonphil.com/2024-08-20-deterministic-simulation-testing.html
- Jepsen - A framework for distributed systems verification, with fault injection
| This software article is a stub. You can help EverybodyWiki by expanding it. |
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.
