Repository: storm Updated Branches: refs/heads/master 5ca7e8099 -> 05d3ccf41
Explain how to run tests selectively in the Clojure REPL Project: http://git-wip-us.apache.org/repos/asf/storm/repo Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/05d3ccf4 Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/05d3ccf4 Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/05d3ccf4 Branch: refs/heads/master Commit: 05d3ccf415f366db01249a766b9a8345c266bf70 Parents: 5ca7e80 Author: Michael G. Noll <[email protected]> Authored: Thu Feb 19 10:43:14 2015 +0100 Committer: Michael G. Noll <[email protected]> Committed: Thu Feb 19 10:43:14 2015 +0100 ---------------------------------------------------------------------- DEVELOPER.md | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/storm/blob/05d3ccf4/DEVELOPER.md ---------------------------------------------------------------------- diff --git a/DEVELOPER.md b/DEVELOPER.md index 9cd49e8..a745f63 100644 --- a/DEVELOPER.md +++ b/DEVELOPER.md @@ -227,7 +227,7 @@ To pull in a merge request you should generally follow the command line instruct The following commands must be run from the top-level directory. - # Build the code and run the tests (requires nodejs, python and ruby installed) + # Build the code and run the tests (requires nodejs, python and ruby installed) $ mvn clean install # Build the code and run the tests, with specifying default test timeout (in millisecond) @@ -237,6 +237,28 @@ The following commands must be run from the top-level directory. # Build the code but skip the tests $ mvn clean install -DskipTests=true +You can also run tests selectively via the Clojure REPL. The following example runs the tests in +[auth_test.clj](storm-core/test/clj/backtype/storm/security/auth/auth_test.clj), which has the namespace +`backtype.storm.security.auth.auth-test`. + +First, start the REPL from within the relevant sub-project (here: `storm-core`): + + $ cd storm-core/ + $ mvn clojure:repl + +Now we run the tests in `auth_test.clj` in the REPL: + +```clojure +;; You can use both absolute as well as relative paths to the .clj file. +(load-file "test/clj/backtype/storm/security/auth/auth_test.clj") +(ns backtype.storm.security.auth.auth-test) +(run-tests) +``` + +> Tip: IDEs such as IntelliJ IDEA support a built-in Clojure REPL, which you can also use to run tests selectively. +> Sometimes you may find that tests pass/fail depending on which REPL you use, which -- although frustrating -- +> can be helpful to narrow down errors. + <a name="packaging"></a>
