hntd187 commented on a change in pull request #1471: URL: https://github.com/apache/arrow-datafusion/pull/1471#discussion_r773362444
########## 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: I was going to grain it down a bit more with a module for sql but then specific modules separated by functionality such as "order_by", "group_by" things of that nature, where generally they fall under sql, but more specifically if they touch specific functionality they go deeper. I'm not sure what @matthewmturner has started so maybe I'll wait a day to see what he says. I also wanted to separate tests for internal things but the unit tests inside individual code seem fine for that. -- 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: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org