I want students to submit JavaScript code to our server. Then we test that JavaScript code to make sure the students solved the problem. I want to test for exceptions thrown, output, what's returned, execution time, individual variables and functions that were called.
We run Ruby on Rails in Heroku, but I'm happy to put up a node.js/io.js server to run the JavaScript code and have our Ruby on Rails code simply send over the user submitted code, wait for a response for success or problems with that user-submitted code and then respond back to the user.
What's the best solution for this? Of course, I need to have a timeout as well to make sure while (true)
s don't cause problems.