Running resource intensive JUnit tests in the cloud

1 points by judepereira ↗ HN
I was wondering whether I’m the only one who’s had the misfortune of having to deal with those pesky JUnit tests that take humongous resources to run. A little brief about why they’re intensive: certain tests spawn an instance of MongoDB, Redis, and then populate this with some data for testing, and THEN the actual tests run (expensive test harness, but worth it IMHO). The good part is that they do test stuff thoroughly :)

However, when they run, some need like 4 GB worth of memory, and consume a lot of CPU. My MacBook Pro heats up quite a bit, and then slows down to the point where I’m unable to do something else while these tests run (they run for a few minutes). Running everything in Jenkins (or something similar) isn’t really feasible, since it runs all tests from all modules, with some Sonar integration as well. That round trip is about 30 minutes or so, and doesn’t let me iterate fast enough.

Since I’m using IntelliJ, I decided to spawn up a c5.2xlarge instance on AWS, and use that as an SSH run target for IntelliJ. The IDE is able to run tests remotely in the cloud, while still making the entire experience feel like it’s running locally (yay!). However, this came with some management overhead of an AWS account, and the lifecycle of the instance in order not to pay an upwards of $250+ per month. My hack was to shutdown the instance at the top of the hour (crontab), and then write an SSH proxy command that would turn on the instance in case if it was offline.

To that end, I created a platform to address this particular use case, without the management overhead, and promote ease of use for other Java developers. It’s called RemoteRun (https://remoterun.co), and makes running resource intensive JUnit tests in the cloud easy :)

I’d love to have people who face such issues over, and give it a go!

2 comments

[ 1.9 ms ] story [ 15.9 ms ] thread
Shouldn't you use something like AWS Codebuild. A cli to abstract some of the config could be useful but don't think we need a whole service..
That still requires some management overhead :(

I’d like the experience to be: 1. Sign up 2. Add a SSH target in IntelliJ 3. Run tests :)