microsoft.coyote
Coyote is a library and tool for testing concurrent C# code and deterministically reproducing bugs.
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (12.1%) to scientific vocabulary
Keywords
Keywords from Contributors
Repository
Coyote is a library and tool for testing concurrent C# code and deterministically reproducing bugs.
Basic Info
- Host: GitHub
- Owner: microsoft
- License: other
- Language: C#
- Default Branch: main
- Homepage: https://microsoft.github.io/coyote/
- Size: 20 MB
Statistics
- Stars: 1,565
- Watchers: 36
- Forks: 81
- Open Issues: 45
- Releases: 0
Topics
Metadata Files
README.md
Coyote
Coyote is a cross-platform library and tool for testing concurrent C# code and deterministically reproducing bugs.
Using Coyote, you can easily test the concurrency and other nondeterminism in your C# code, by writing what we call a concurrency unit test. These look like your regular unit tests, but can reliably test concurrent workloads (such as actors, tasks, or concurrent requests to ASP.NET controllers). In regular unit tests, you would typically avoid concurrency due to flakiness, but with Coyote you are encouraged to embrace concurrency in your tests to find bugs.
Coyote is used by many teams in Azure to test their distributed systems and services, and has found hundreds of concurrency-related bugs before deploying code in production and affecting users. In the words of an Azure service architect:
Coyote found several issues early in the dev process, this sort of issues that would usually bleed through into production and become very expensive to fix later.
Coyote is made with :heart: by Microsoft Research.
How it works
Consider the following simple test: ```csharp [Fact] public async Task TestTask() { int value = 0; Task task = Task.Run(() => { value = 1; });
Assert.Equal(0, value); await task; } ```
This test will pass most of the time because the assertion will typically execute before the task
starts, but there is one schedule where the task starts fast enough to set value to 1 causing
the assertion to fail. Of course, this is a very naive example and the bug is obvious, but you could
imagine much more complicated race conditions that are hidden in complex execution paths.
The way Coyote works, is that you first convert the above test to a concurrency unit test using the
Coyote TestingEngine API:
```csharp
using Microsoft.Coyote.SystematicTesting;
[Fact] public async Task CoyoteTestTask() { var configuration = Configuration.Create().WithTestingIterations(10); var engine = TestingEngine.Create(configuration, TestTask); engine.Run(); } ```
Next, you run the coyote rewrite command from the CLI (typically as a post-build task) to
automatically rewrite the IL of your test and production binaries. This allows Coyote to inject
hooks that take control of the concurrent execution during testing.
You can then run the concurrent unit test from your favorite unit testing framework (such as
xUnit). Coyote will take over and repeatedly execute the test from
beginning to the end for N iterations (in the above example N was configured to 10). Under the
hood, Coyote uses intelligent search strategies to explore all kinds of execution paths that might
hide a bug in each iteration.
The awesome thing is that once a bug is found, Coyote gives you a trace through the engine.TestReport
API that you can use to reliably reproduce the bug as many times as you want, making debugging and
fixing the issue significantly easier.
Get started
Getting started with Coyote is easy! First, follow this
guide to install the coyote
command-line tool from NuGet. You are now ready
to check out the Coyote website for tutorials, documentation,
how-tos, samples and more information about the project. Enjoy!
Upgrading your coyote dependencies? Check the changelog here.
Support
Note that Coyote is an open-source project that is provided "as-is". We are not able to provide any formal support. For Microsoft employees we have the Friends of Coyote Teams channel, which is an internal community that can help answer questions and learn from each other.
Contributing
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.
When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repositories using our CLA.
Code of Conduct
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
Owner
- Name: Microsoft
- Login: microsoft
- Kind: organization
- Email: opensource@microsoft.com
- Location: Redmond, WA
- Website: https://opensource.microsoft.com
- Twitter: OpenAtMicrosoft
- Repositories: 7,257
- Profile: https://github.com/microsoft
Open source projects and samples from Microsoft
Citation (CITATION.cff)
cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Deligiannis"
given-names: "Pantazis"
orcid: "https://orcid.org/0000-0001-7582-4520"
- family-names: "Lovett"
given-names: "Chris"
- family-names: "Lal"
given-names: "Akash"
title: "Coyote"
version: 1.7.11
date-released: 2020-02-28
url: "https://github.com/microsoft/coyote"
preferred-citation:
type: article
authors:
- family-names: "Deligiannis"
given-names: "Pantazis"
orcid: "https://orcid.org/0000-0001-7582-4520"
- family-names: "Senthilnathan"
given-names: "Aditya"
- family-names: "Nayyar"
given-names: "Fahad"
- family-names: "Lovett"
given-names: "Chris"
- family-names: "Lal"
given-names: "Akash"
doi: "10.1007/978-3-031-30820-8_26"
journal: "International Conference on Tools and Algorithms for the Construction and Analysis of Systems"
start: 433
end: 452
title: "Industrial-Strength Controlled Concurrency Testing for Programs With Coyote"
year: 2023
GitHub Events
Total
- Issues event: 5
- Watch event: 83
- Delete event: 3
- Push event: 6
- Pull request review event: 1
- Pull request event: 5
- Fork event: 4
- Create event: 2
Last Year
- Issues event: 5
- Watch event: 83
- Delete event: 3
- Push event: 6
- Pull request review event: 1
- Pull request event: 5
- Fork event: 4
- Create event: 2
Committers
Last synced: 9 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Pantazis Deligiannis | p****a@m****m | 440 |
| Chris Lovett | c****t@m****m | 181 |
| Shrey Tiwari | s****t@g****m | 6 |
| Akash Lal | a****1@g****m | 6 |
| Damon Kiley | v****e@m****m | 4 |
| Dimitre Novatchev | v****o@m****m | 4 |
| dependabot[bot] | 4****] | 4 |
| Christopher Watford | c****d@g****m | 2 |
| Immad | i****r@g****m | 2 |
| Udit kumar agarwal | 1****7 | 2 |
| Aditya Senthilnathan | a****9@g****m | 1 |
| Ao Li | 5****l | 1 |
| Brian Chavez | b****z@b****m | 1 |
| GitWizard123 | 1****3 | 1 |
| Laurent Kempé | l****e@t****m | 1 |
| Martin | m****t@t****o | 1 |
| Salman Muin Kayser Chishti | 1****i@g****m | 1 |
| The Gitter Badger | b****r@g****m | 1 |
| dan2468 | 1****8 | 1 |
| timbo | t****w | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 32
- Total pull requests: 75
- Average time to close issues: about 1 month
- Average time to close pull requests: 1 day
- Total issue authors: 22
- Total pull request authors: 11
- Average comments per issue: 3.84
- Average comments per pull request: 0.52
- Merged pull requests: 66
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 5
- Pull requests: 2
- Average time to close issues: about 23 hours
- Average time to close pull requests: 8 minutes
- Issue authors: 5
- Pull request authors: 2
- Average comments per issue: 0.0
- Average comments per pull request: 0.0
- Merged pull requests: 1
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- ankushdesai (5)
- fleed (3)
- arunt1204 (2)
- tbertenshaw (2)
- muwaqar (2)
- yunpengxiao (2)
- msftph (1)
- mikocot (1)
- jamescarter-le (1)
- wanton7 (1)
- Kielek (1)
- aoli-al (1)
- yahorsi (1)
- gabthau (1)
- dharmaturtle (1)
Pull Request Authors
- pdeligia (58)
- lovettchris (13)
- salmanmkc (4)
- akashlal (4)
- kzdev-net (2)
- JamieMagee (1)
- bchavez (1)
- gitter-badger (1)
- Youssef1313 (1)
- WeihanLi (1)
- tbertenshaw (1)
- dependabot[bot] (1)
- uditagarwal97 (1)
- dan2468 (1)
- aoli-al (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 6
-
Total downloads:
- nuget 1,997,410 total
-
Total dependent packages: 8
(may contain duplicates) -
Total dependent repositories: 0
(may contain duplicates) - Total versions: 232
- Total maintainers: 2
nuget.org: microsoft.coyote
Coyote is a library and tool for testing concurrent C# code and deterministically reproducing bugs.
- Homepage: https://microsoft.github.io/coyote/
- License: other
-
Latest release: 1.7.11
published almost 2 years ago
Rankings
nuget.org: microsoft.coyote.test
The Coyote systematic testing engine.
- Homepage: https://microsoft.github.io/coyote/
- License: other
-
Latest release: 1.7.11
published almost 2 years ago
Rankings
nuget.org: microsoft.coyote.cli
The Coyote .NET command-line tool.
- Homepage: https://microsoft.github.io/coyote/
- License: other
-
Latest release: 1.7.11
published almost 2 years ago
Rankings
nuget.org: microsoft.coyote.core
The Coyote core libraries and runtime.
- Homepage: https://microsoft.github.io/coyote/
- License: other
-
Latest release: 1.7.11
published almost 2 years ago
Rankings
nuget.org: microsoft.coyote.actors
The Coyote actor runtime and library.
- Homepage: https://microsoft.github.io/coyote/
- License: other
-
Latest release: 1.7.11
published almost 2 years ago
Rankings
nuget.org: microsoft.coyote.tool
The self-contained Coyote command-line tool.
- Homepage: https://microsoft.github.io/coyote/
- License: other
-
Latest release: 1.7.11
published almost 2 years ago
Rankings
Dependencies
- bootstrap 3.4.0
- jquery 3.5.1
- jquery-validation 1.14.0
- jquery-validation-unobtrusive 3.2.6
- xunit.assert 2.4.1
- System.Text.Json 6.0.0
- xunit.assert 2.4.1
- Newtonsoft.Json 13.0.1
- Microsoft.Azure.ServiceBus 4.1.1
- Newtonsoft.Json 13.0.1
- System.Collections 4.3.0
- System.Collections 4.3.0
- System.Collections 4.3.0
- System.Collections 4.3.0
- Microsoft.AspNet.WebApi.Client 5.2.7
- System.Net.Http.Json 3.2.1
- Azure.Storage.Blobs 12.6.0
- Microsoft.Azure.Cosmos 3.12.0
- MSTest.TestAdapter 2.2.8
- MSTest.TestFramework 2.2.8
- Microsoft.AspNet.WebApi.Client 5.2.7
- Microsoft.Azure.Cosmos.Direct 3.13.0
- Microsoft.NET.Test.Sdk 17.1.0
- MSTest.TestAdapter 2.2.8
- MSTest.TestFramework 2.2.8
- Microsoft.NET.Test.Sdk 17.1.0
- Microsoft.AspNetCore.Mvc.Testing 6.0.3
- Microsoft.AspNetCore.TestHost 6.0.3
- Microsoft.NET.Test.Sdk 17.1.0
- xunit 2.4.1
- xunit.runner.visualstudio 2.4.3
- System.Threading.Tasks.Extensions 4.5.4
- System.ValueTuple 4.5.0
- Microsoft.ApplicationInsights 2.20.0
- Microsoft.AspNetCore.Http.Abstractions 2.2.0
- Microsoft.Extensions.DependencyModel 6.0.0
- Mono.Cecil 0.11.4
- System.Text.Json 6.0.0
- Microsoft.NET.Test.Sdk 17.1.0
- xunit 2.4.1
- xunit.runner.visualstudio 2.4.3
- Microsoft.NET.Test.Sdk 17.1.0
- xunit 2.4.1
- xunit.runner.visualstudio 2.4.3
- BenchmarkDotNet 0.12.1
- Microsoft.NET.Test.Sdk 17.1.0
- xunit 2.4.1
- xunit.runner.visualstudio 2.4.3
- xunit 2.4.1
- BenchmarkDotNet 0.12.1
- Microsoft.NET.Test.Sdk 17.1.0
- Mono.Reflection 2.0.0
- xunit 2.4.1
- xunit.runner.visualstudio 2.4.3
- BenchmarkDotNet 0.13.1
- Microsoft.Azure.Cosmos 3.10.1
- Newtonsoft.Json 13.0.1
- System.CommandLine 2.0.0-beta3.22114.1
- System.Configuration.ConfigurationManager 4.7.0
- System.CommandLine 2.0.0-beta3.22114.1
- XmlDocMarkdown.Core 2.8.0
- YamlDotNet 11.2.1
- azure-cosmos *
- mkdocs *
- mkdocs-macros-plugin *
- NuGet/setup-nuget v1 composite
- actions/checkout v2 composite
- actions/setup-dotnet v1 composite
- github/codeql-action/analyze v1 composite
- github/codeql-action/init v1 composite
- actions/checkout v2 composite
- NuGet/setup-nuget v1 composite
- actions/checkout v2 composite
- actions/download-artifact v3 composite
- actions/setup-dotnet v1 composite
- actions/upload-artifact v3 composite
- NuGet/setup-nuget v1 composite
- actions/checkout v2 composite
- actions/setup-dotnet v1 composite
- Microsoft.NET.Test.Sdk 17.4.0
- xunit 2.4.2
- xunit.runner.visualstudio 2.4.5
- System.CommandLine 2.0.0-beta4.22272.1
- System.Configuration.ConfigurationManager 7.0.0