Summary
The project currently does not have any automated tests. I’d like to contribute by setting up a test infrastructure and adding an initial suite of tests, so we can start building confidence in future changes.
Proposed approach
I was thinking of going the standard approach.
-
Set up the project structure for tests (creating the test folder in the solution, etc.)
-
Add basic unit tests that cover critical components
-
Add test utilities/helpers to simplify writing future tests such as class fixtures for shared data between tests
Roadmap
-
Starting from unit tests and achieving acceptable coverage
-
Creating integration tests for the apis created using FastCrud, so if we change the underlying implementations we can know if the endpoints work as expected.
I was also thinking that for integration tests, the sample api project could be useful. It can have more types of endpoints which helps with two things: 1. Showing the potential of FastCrud 2. Having a more complete integration test
Benefits
Provides safety net for refactoring.
Makes it easier to contribute features without worrying about breaking anything existing.
Encourages test-driven contributions in the future.
Questions for maintainers
@ashkanRmk
Should the initial focus be unit tests only, or also some lightweight integration tests? In other words, should I separate the PR for unit tests and integration tests separate or have them all in one PR?
Summary
The project currently does not have any automated tests. I’d like to contribute by setting up a test infrastructure and adding an initial suite of tests, so we can start building confidence in future changes.
Proposed approach
I was thinking of going the standard approach.
Set up the project structure for tests (creating the
testfolder in the solution, etc.)Add basic unit tests that cover critical components
Add test utilities/helpers to simplify writing future tests such as class fixtures for shared data between tests
Roadmap
Starting from unit tests and achieving acceptable coverage
Creating integration tests for the apis created using FastCrud, so if we change the underlying implementations we can know if the endpoints work as expected.
I was also thinking that for integration tests, the sample api project could be useful. It can have more types of endpoints which helps with two things: 1. Showing the potential of FastCrud 2. Having a more complete integration test
Benefits
Provides safety net for refactoring.
Makes it easier to contribute features without worrying about breaking anything existing.
Encourages test-driven contributions in the future.
Questions for maintainers
@ashkanRmk
Should the initial focus be unit tests only, or also some lightweight integration tests? In other words, should I separate the PR for unit tests and integration tests separate or have them all in one PR?