- Upgraded the
System.Text.Json
package tov8.0.4
for thenetstandard2.0
target framework, due to a vulnerability. - Dropped support for the
netcoreapp3.1
target framework, which reached end of life.
- Added support for the
net8.0
target framework. - Added support to optionally explore a race condition when using the
AutoResetEvent.Reset
method.
- Fixed an issue with
Actor
not halting as expected in certain scenarios after explicitly raising aHaltEvent
event.
- Added the
Microsoft.Coyote.Rewriting.SkipRewriting
attribute that allows skipping the rewriting of a user-specified type. - The
coyote
command line tool can now invoke non-static xUnit tests that have no parameters and their declaring type has a constructor without parameters or only has theXunit.Abstractions.ITestOutputHelper
as parameter. - Fixed a bug with not reporting correctly actor coverage.
- Added rewriting support for fine-grained race-checking at memory-access and
control-flow branching locations. Race-checking at memory-access locations can
be enabled during testing by setting the
Configuration.WithMemoryAccessRaceCheckingEnabled
option, whereas race-checking at control-flow branching locations can be enabled during testing by setting theConfiguration.WithControlFlowRaceCheckingEnabled
option. Rewriting is enabled by default to support both features, which adds extra instructions in the rewritten DLLs, but this can be disabled by setting theIsRewritingMemoryLocations
rewriting option tofalse
.
- Added rewriting support for
System.Threading.SpinWait
methods.
- Exposed the
ConsoleLogger
as public so that users can conveniently use it to write runtime logs to the console. - Implemented more fake methods in the
ActorTestKit
class. - Added a method for setting a custom logger when using the
ActorTestKit
class. - Added rewriting support for
System.Threading.Volatile
methods. - Fixed a bug where merging coverage info could result in a rare race condition.
- Added support for controlling user-created
Thread
instances during testing. - Added support for controlling
WaitHandle
and related APIs during testing. - Added the
ActorTestKit
class for unit-testing actors and state machines in isolation. - Disabled the automated fallback to randomized fuzzing during testing, if systematic testing fails.
- Fixed a bug in bug trace reporting.
- Added support for visualizing traces from testing task-based programs in DGML format.
- Implemented various runtime optimizations for more efficient coverage during testing.
- Optimized the modeling of various lock APIs during testing.
- Fixed a rewriting bug occurring when methods return task arrays.
- Added support for the
net7.0
target framework.
- Added support for fully controlling the
SemaphoreSlim
type during testing. - Added support for detecting the
System.Guid
andSystem.DateTime
APIs as sources of uncontrolled data non-determinism during testing. - Added the
Configuration.WithPartiallyControlledDataNondeterminismAllowed
API (and--partial-control <MODE>
CLI option) for configuring how uncontrolled data non-determinism should be handled during testing. - Added the
Configuration.WithScheduleCoverageReported
API (and--schedule-coverage
CLI option) for dumping coverage statistics and stack traces for scheduling decisions. - Added the
Specification.RegisterStateHashingFunction
API for registering custom program state hashing functions, which can be used to compute an approximation of the program state during testing, as well as reporting it in the test statistics. - Improved replay traces by registering the scheduling point type alongside each scheduling decision.
- Fixed missing
net462
dependency in theMicrosoft.Coyote.Tool
NuGet package.
- Added support for operation grouping for
Task
continuations. - Added support for the delay-bounding exploration strategy.
- Added support for rewriting the
Thread.Yield
andInterlocked
APIs. - Updated the runtime to not fail with a potential deadlock when the debugger is attached, and instead add a breakpoint, to avoid spurious failures when debugging.
- Hardened the
SchedulingPoint.Suppress
andSchedulingPoint.Resume
methods so that they do not resume scheduling earlier than expected when they are used in a nested manner. - Fixed a runtime memory leak when test iterations terminated early.
- Fixed a rare stack-overflow exception when popping states during a
StateMachine
execution. - Fixed a few cases of internally spawned tasks considered to be uncontrolled by the runtime.
- Updated the default
random
exploration strategy with aportfolio
testing mode that uses a tuned set of different exploration strategies to increase coverage for different bug patterns. The portfolio will be transparently enhanced over time as new exploration strategies become available inside Coyote. The Portfolio can be set to fair or unfair usingConfiguration.WithPortfolioMode
or the--portfolio-mode
command-line option. The portfolio mode can be disabled and explicitly set to one of the available exploration strategies by setting a strategy-related option such asConfiguration.WithRandomStrategy
or-s <STRATEGY>
. - Refactored the NuGet packages, by moving
Microsoft.Coyote.Actors
to its own dedicated package, introducing a newMicrosoft.Coyote.Tool
package that contains the self-containedcoyote
command-line tool (for users that do not want to managecoyote
via theMicrosoft.Coyote.CLI
.NET tool), introducing a newMicrosoft.Coyote.Core
package that only contains the core runtime library of Coyote, and converting theMicrosoft.Coyote
NuGet package into a meta-package that pulls all non-tool packages. - Moved the actor
Event
type under theMicrosoft.Coyote.Actors
namespace. - Introduced a
Monitor.Event
type (nested in theMicrosoft.Coyote.Specifications.Monitor
class), which must now be used for declaring specification monitor events, instead of the originalEvent
type above. - Enhanced and streamlined the logging API and built-in loggers, which are now
available in the
Microsoft.Coyote.Logging
namespace, instead ofMicrosoft.Coyote.IO
. - Removed support for the end-of-life
net5.0
target framework.
- Exposed new
IActorRuntime.GetCurrentActorIds()
API that returns theActorId
for each active actor managed by the runtime, as well as anIActorRuntime.GetCurrentActorTypes()
API that returns theType
of each active actor managed by the runtime. These APIs are not thread-safe and should only be used for gathering statistics and debugging purposes.
- Exposed new
IActorRuntime.GetActorExecutionStatus(id)
API that enables querying the actor runtime for the current execution status of the actor with the specified id, as well as anIActorRuntime.GetCurrentActorCount()
API that returns the number of active actors managed by the runtime. These APIs are not thread-safe and should only be used for gathering statistics and debugging purposes. - Exposed new
IActorRuntime.OnActorHalted
callback which is triggered when an actor has halted and the runtime has stopped managing it.
- Exposed new
Operation
API that enables instrumenting, controlling and scheduling custom concurrent operations. - Exposed new
SchedulingPoint.SetCheckpoint
API that allows to capture all non-deterministic decisions in the currently explored execution path and try replay them in subsequent test iterations to optimize coverage of a subset of the state space. - Added support for intercepting and controlling asynchronous locks.
- Added support for rewriting the
SemaphoreSlim
type. - The
Configuration.WithReplayStrategy
method was renamed toConfiguration.WithReproducibleTrace
to make it more explicit that setting this option allows reproducing the specified trace. - Various runtime improvements and bug fixes.
- Improved the runtime to try enforce atomicity when invoking a specification
Monitor
.
- Fixed a bug in
coyote rewrite
related to rewriting nested types.
- Fixed a bug where a thrown exception was not propagating properly when
invoking
Task.WaitAll
during systematic testing. - Fixed a bug in
coyote rewrite
related to return types with nested generics.
- Fixed a bug in
coyote rewrite
when checking uncontrolled tasks from methods with a nested generic return type.
- Added support in
coyote rewrite
for rewriting types with a required modifier (modreq
).
- Significantly improved runtime performance during partially-controlled concurrency testing.
- Improved the assembly loading logic when using the
coyote
tool. - Fixed rare deadlock in test execution paths that exhibit partially-controlled concurrency.
- Various other runtime improvements.
- Introduced new command-line interface for the
coyote
tool that builds on top of theSystem.CommandLine
library. This brings an improved and more robust user experience (e.g. better CLI error messages), as well as other enhancements such as CLI option grouping. - The
--coverage code
CLI option is not supported anymore as it was only supported on Windows and has been superseded by the official .NET cross-platform code coverage infrastructure. See here and here. The--coverage
(or-c
) CLI option is now used to enable activity coverage (replacing--coverage activity
), as discussed here. - The
--parallel N
CLI option is not supported anymore to bring thecoyote
tool experience in line with the programmatic way of running Coyote tests (via theTestingEngine
API), which did not support built-in parallel testing. If needed, running parallel tests can still be achieved by invoking multiple Coyote testing processes in parallel (e.g. via a script).
- Simplified the
coyote
tool ASP.NET dependency. - Partially controlled concurrency is now allowed by default during systematic
testing. Disable via the
--no-partial-control
command line option (orConfiguration.WithPartiallyControlledConcurrencyAllowed(false)
). - Added support for schedule space reduction based on read and write operations.
Enable via the
--reduce-shared-state
command line option (orConfiguration.WithSharedStateReductionEnabled
). - Improved support for detecting potential deadlocks during partially controlled concurrency.
- Binary rewriting improvements and fixes.
- Added runtime and rewriting support for testing ASP.NET controllers in the presence of partially-controlled concurrency.
- Added support for rewriting the
HttpClient
type targeting ASP.NET controllers. - Improved runtime support for partially-controlled concurrency during testing.
- New option for skipping potential deadlocks in the presence of partially-controlled concurrency.
- The actor logging method
LogExceptionThrown
is now only called if the exception was not handled. TheLogExceptionHandled
method can be used instead for handled exceptions. - Various other runtime improvements and fixes.
- Added support for the
netstandard2.0
target framework. - Added support for rewriting the non-generic
TaskCompletionSource
type. - Added support for rewriting the
ValueTask
type (butIValueTaskSource
is not supported). - Improvements to systematic fuzzing, especially for actor-based programs.
- Improvements to how thread interrupts are handled at the end of each test iteration.
- Tests now report the degree of concurrency and number of controlled operations.
- Added support for the
net6.0
target framework. - The
TestingEngine
is now giving a warning if the DLL being tested has not been rewritten. - The number of controlled operations are now reported as part of test statistics.
- Improvements, optimizations and bug-fixes in binary rewriting.
- Added support for dumping the rewritten IL diff to a file through
--dump-il-diff
.
- Enabled automated fallback to systematic fuzzing upon detecting uncontrolled
concurrency during testing to increase usability. This feature is enabled by
default and can be disabled via the
no-fuzzing-fallback
command line option (orConfiguration.WithSystematicFuzzingFallbackEnabled
). - Added a new JSON test report that lists any detected invocations of uncontrolled methods.
- The
TestingEngine.TryEmitTraces
method was renamed toTestingEngine.TryEmitReports
to reflect that the reports do not include only traces. - The
IActorRuntimeLog.OnStrategyDescription
method was removed.
- Redesigned the systematic testing runtime to significantly improve its performance and simplicity.
- An
ActorId
of a halted actor can now be reused. - The
coyote
tool can now resolveaspnet
.
- Added rewriting support for testing race conditions with several
System.Collections.Concurrent
data structures. - Added rewriting support for testing
System.Collections.Generic.HashSet<T>
data races. - Added the
SchedulingPoint.Suppress
andSchedulingPoint.Resume
methods for suppressing and resuming interleavings of enabled operations, accordingly. - Fixed a memory leak in the testing engine.
- Improved the binary rewriting engine and fixed various rewriting bugs.
- Removed the deprecated
Microsoft.Coyote.Tasks
namespace. Testing task-based code should now only be done via binary rewriting, instead of using a custom task type. - Removed the
net48
target framework, can instead just use thenet462
target framework for legacy .NET Framework projects.
- Improved the strategies used for systematic fuzzing.
- Fixed a rewriting bug related to the
TaskAwaiter
type.
- Added the
--no-repro
command line option (enabled also viaConfiguration.WithNoBugTraceRepro
), which disables the ability to reproduce buggy traces to allow skipping errors due to uncontrolled concurrency, for example when the program is only partially rewritten, or there is external concurrency that is not mocked, or when the program uses an API that is not yet supported. - The uncontrolled concurrency errors have been updated to be more informative and point to the documentation for further reading.
- Added an experimental rewriting pass that adds assertion checks to find data
races in uses of the
System.Collections.Generic.List<T>
andSystem.Collections.Generic.Dictionary<TKey, TValue>
collections. - Added support for the
net462
target framework.
- Added the
SchedulingPoint
static class that exposes methods for adding manual scheduling points during systematic testing. - Added an experimental systematic testing strategy that uses reinforcement
learning. This is enabled using the
--sch-rl
command line option or theConfiguration.WithRLStrategy
method. - Added an experimental systematic fuzzing testing mode that uses delay
injection instead of systematic testing to find bugs. This can be enabled
using the
--systematic-fuzzing
command line option or theConfiguration.WithSystematicFuzzingEnabled
method. - Added the
IActorRuntimeLog.OnEventHandlerTerminated
actor log callback that is called when an event handler terminates. - Fixed a bug where the
IActorRuntimeLog.OnHandleRaisedEvent
actor log callback was not invoked in production.
- Improved how
coyote test
resolves ambiguous test method names. - Fixed a bug where awaiting a task from a previous test iteration that was
canceled due to
ExecutionCanceledException
would hang the tester.
- Exposed the
TextWriterLogger
type. - Fixed a configuration bug where the
fairpct
strategy would be picked instead ofprobabilistic
.
- Added the
Specification.IsEventuallyCompletedSuccessfully
API for checking if a task eventually completes successfully. - Added the
Configuration.WithTestingTimeout
API for specifying a systematic testing timeout instead of iterations. - Optimized state space exploration in programs using
Task.Delay
. - Added support for the
net5.0
target framework. - Removed the
net47
target framework.
- Added the
OnEventIgnored
andOnEventDeferred
callbacks in theActor
type.
- Added support for systematically testing actors and tasks together using rewriting.
- Hardened the systematic testing runtime.
- Improved detection of uncontrolled tasks during systematic testing.
- Added detection of invoking unsupported APIs during systematic testing.
- Added missing
coyote rewrite
dependencies in theMicrosoft.Coyote.Test
package.
- Optimizations and fixes in binary rewriting.
- Added basic support for the
System.Threading.Tasks.Parallel
type during rewriting. - Fixed a bug in
coyote rewrite
that was incorrectly copying dependencies after rewriting.
- Renamed
TestingEngine.ReproducibleTrace
to fix typo in the API name. - Fixed some bugs in
coyote rewrite
.
- Added experimental support for testing unmodified task-based programs using binary rewriting.
- Added support for log severity in the logger and converted to an
ILogger
interface. - Optimized various internals of the task testing runtime.
- Fixed a bug in the
Actor
logic related to event handlers. - Fixed a bug in
Microsoft.Coyote.Task.WhenAny
.
- Added support for cancellations in
Task.Run
APIs. - Optimized various internals of the task testing runtime.
- Fixed the
Task.WhenAny
andTask.WhenAll
APIs so that they execute asynchronously during systematic testing. - Fixed the
Task.WhenAny
andTask.WhenAll
APIs so that they throw the proper argument exceptions during systematic testing.
- Added missing
Task<TResult>.UncontrolledTask
API. - Fixed a bug in the testing runtime for controlled tasks.
- Fixed a bug in the testing runtime for controlled tasks that could lead to a stack overflow.
- Optimized various internals of the testing runtime.
- Introduced a new
EventGroup
API for actors, which replaces operation groups, that allows improved tracing and awaiting of long running actor operations. - The
Task.Yield
API can now be used to de-prioritize the executing operation during testing. - Added missing APIs in the
Microsoft.Coyote.Tasks.Semaphore
type. - Fixed two bugs in the systematic testing scheduler.
- Fixed an issue that did not allow systematic and non-systematic unit tests to run on the same process.
- Fixed a bug in the
TestingEngine
logger.
- Fixed the NuGet symbol packages.
- Introduced a new
Microsoft.Coyote.Test
package that contains theTest
attribute and theTestingEngine
type for writing unit tests. - The core
Microsoft.Coyote
does not contain anymoreTest
andTestingEngine
, which were moved to theMicrosoft.Coyote.Test
package. - Added support for optional anonymized telemetry in the
TestingEngine
. - Optimized various internals of the systematic testing scheduler.
- Fixed some issues in the scripts.
- The core
Microsoft.Coyote
project is now targeting only .NET Standard, allowing it to be consumed by any project that supportsnetstandard2.0
and above. - Removed the
net46
target. - Fixed bug in using the global dotnet tool.
- Added support for building Coyote on Linux and macOS.
- Building Coyote locally now ignores .NET targets that are not installed.
- Added optional anonymized telemetry in the
coyote
tool. - Fixed a bug in the
SynchronizedBlock
type.
- Added a
SynchronizedBlock
type to model the semantics of the C#lock
statement. - Simplified the
Configuration
APIs for setting max-steps and liveness related heuristics. - Fixed code coverage and added support for code coverage on
netcoreapp3.1
.
- Added a --version argument to the
coyote
command line tool. - Added a dotnet tool package called
Microsoft.Coyote.CLI
to install thecoyote
command line tool and running it without an explicit path. - Exposed the
ReadableTrace
andReproducibleTrace
members ofMicrosoft.Coyote.SystematicTesting.TestingEngine
as public. - Fixed a bug in activity coverage reporting for
netcoreapp3.1
. - Fixed some bugs in parallel testing.
- Added new
Microsoft.Coyote.Configuration.WithReplayStrategy
method for programmatically assigning a trace to replay. - Added support for the
netstandard2.1
,netcoreapp3.1
andnet48
targets. - Removed support for the
netcoreapp2.2
target, which reached end of life. - Fixed various bugs in the documentation.
- Fixed an issue when invoking
Microsoft.Coyote.Tasks.Task.ExploreContextSwitch
during a production run.
- Made ActorRuntimeLogGraphBuilder public.
- Added CreateStateMachine to IActorRuntimeLog.
- Fixed an issue in the runtime (there should always be a default task runtime instance).
- The initial release of the Coyote set of libraries and test tools.