alamb commented on a change in pull request #1471: URL: https://github.com/apache/arrow-datafusion/pull/1471#discussion_r774784755
########## File path: DEVELOPERS.md ########## @@ -40,6 +40,57 @@ Testing setup: - `export PARQUET_TEST_DATA=$(pwd)/parquet-testing/data/` - `export ARROW_TEST_DATA=$(pwd)/testing/data/` + +## Test Organization + +DataFusion has several levels of tests in its [Test +Pyramid](https://martinfowler.com/articles/practical-test-pyramid.html) +and tries to follow [Testing Organization](https://doc.rust-lang.org/book/ch11-03-test-organization.html) in the The Book. + +This section highlights the most important test modules that exist + +### Unit tests + +Tests for the code in an individual module are defined in the same source file with a `test` module, following Rust convention + +For example, the logic for pruning predicates is defined in [pruning.rs](https://github.com/apache/arrow-datafusion/blob/main/datafusion/src/physical_optimizer/pruning.rs#L708) using the + +```rust +#[cfg(test)] +mod tests { +... +} +``` + + +### Rust Integration Tests + +There are several tests of the public interface of the DataFusion library in the [tests](https://github.com/apache/arrow-datafusion/blob/master/datafusion/tests) directory. + +You can run these tests individually using a command such as + +```shell +cargo test -p datafusion --tests sql +``` + +The tests are: Review comment: > In addition a lot of tests are prepended with csv, which seems somewhat redundant to me, is there a purpose behind it? Not that I can remember > I think I will reorganize the tests themselves first, touch no code other than moving around and then we can talk about renaming or any actual code changes. I think that is an excellent strategy 👍 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
