dotnet-testcontainers
TestFX
Our great sponsors
dotnet-testcontainers | TestFX | |
---|---|---|
6 | 5 | |
1,129 | 899 | |
- | 0.8% | |
7.3 | 6.9 | |
almost 2 years ago | 3 months ago | |
C# | Java | |
MIT License | GNU General Public License v3.0 or later |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
dotnet-testcontainers
-
How do you Unit Test a WebAPI? What do you test?
So what I usually do is: • Unit test underlying (public) services and application ‘core’ • Integration test (or w/e you call it) an entire functionality flow, by sending in ‘real’ requests on one end, and locally mocking/stubbing the application ‘edges’ that supply the response data. WireMock for requests to external services, H2 or Testcontainers for database.
-
EF Core In-Memory DB (for testing) does not allow List<int> property even though this is something Postgres does. How would I go about testing this?
I'd use testcontainers to spin up an instance of Progress and run against the actual thing. That way you get the benefit of testing against the actual database, but also that you don't have to set up a bunch of stuff locally.
Not every db support array as primitive, if you want to write integration tests and you have access to docker I suggest you testcontainers.
-
Does anyone have a good functional (integration? end to end?) automated Web API testing setup?
There is a rope which can help with this task: https://github.com/HofmeisterAn/dotnet-testcontainers
-
Integration testing with EF Core, part 2
Dotnet.Testcontainers also comes with some built-in classes that wraps various services, one of these classes actually wraps a SQL Server Docker container and there are few more that covers the most common databases e.g.
-
End to end testing is confusing
You should also check out Docker, especially TestContainers. That way you can spin up databases (and other dependencies) on the fly and do operations on them. This means that you don't need to "fake" a database, as you will have access to a new one.
TestFX
- Why won't FXRobot click my button?
-
Automating Java applications with JavaScript?
So for JavaFX the default one is TestFX. If you don't have the source code you probably need to find a tool able to locate them deierctly on your app. 5I didn't check if ti exists). Now for your initial question. TestFX is implmented in Java so if you really want to write you test in JS/TS you have to find a wrapper for your favorite language.
- JavaFX unit tests
-
What's the most interesting open-source project to study?
TestFX
-
How do I Junit test GUI applications?
Actual pure unit testing, you mock whatever the button interacts with outside of its unit with and see if they called with correct things or something. How useful this approach is, depends. Often it's more useful to test UI functionality with functional (or integration) tests, for example for javaFX with https://github.com/TestFX/TestFX or something similar.
What are some alternatives?
FluentDocker - Use docker, docker-compose local and remote in tests and your .NET core/full framework apps via a FluentAPI
JUnit - A programmer-oriented testing framework for Java.
NUnit - NUnit Framework
JFoenix - JavaFX Material Design Library
WireMock.Net - WireMock.Net is a flexible product for stubbing and mocking web HTTP responses using advanced request matching and response templating. Based on the functionality from http://WireMock.org, but extended with more functionality.
Fluent Assertions - A very extensive set of extension methods that allow you to more naturally specify the expected outcome of a TDD or BDD-style unit tests. Targets .NET Framework 4.7, as well as .NET Core 2.1, .NET Core 3.0, .NET 6, .NET Standard 2.0 and 2.1. Supports the unit test frameworks MSTest2, NUnit3, XUnit2, MSpec, and NSpec3.
xUnit - xUnit.net is a free, open source, community-focused unit testing tool for .NET.
AutoFixture - AutoFixture is an open source library for .NET designed to minimize the 'Arrange' phase of your unit tests in order to maximize maintainability. Its primary goal is to allow developers to focus on what is being tested rather than how to setup the test scenario, by making it easier to create object graphs containing test data.
harbor - Dotnet CLI tool to help easily handling development dependencies
Fine Code Coverage - Visualize unit test code coverage easily for free in Visual Studio Community Edition (and other editions too)
LocalDb - Provides a wrapper around SqlLocalDB to simplify running tests or samples that require a SQL Server Database