alamb commented on a change in pull request #1471:
URL: https://github.com/apache/arrow-datafusion/pull/1471#discussion_r773093645



##########
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:
       One thing I was thinking @hntd187  and @matthewmturner  would be to put 
some guidance here like "tests that run a full sql query likely belong in 
`sql.rs`" (also perhaps describe which tests should go in the "SQL / Postgres 
integration tests" and which are good to be in sql.rs)




-- 
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]


Reply via email to