Hi all. I'm still relatively new to Clojure and I haven't spent much time on testing before. I've recently written some libraries to talk to Bitcoin exchanges (clj-havelock, clj-btce, cryptick), and I'd like to add tests to them.
I'd like some advice around how to test against a live service (there is not test service available) where there's a financial impact if something goes wrong (someone buys/sells by accident). My manual REPL-testing usually involve creating several orders with price spreads that are unlikely to execute. For instance, selling 1 Litecoin for 1 Bitcoin. Buying 1 Bitcoin for $5 USD. My concern is if someone runs the tests with bad inputs, resulting in real orders being executed. I can write tests that pull in API credentials from a file in my home directory, and define price ranges for orders outside the normal spread. These could then be fed into the tests. However, would it be better to try and mock the trading API responses rather than do it live? Or perhaps require a flag to run dangerous tests? Ultimately I want to be able to demonstrate the libraries are mature with good test coverage, but I'm worried about the right approach. Any advice would be appreciated. Thanks in advance, JPH -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.